diff --git a/src/dict/stardict.cc b/src/dict/stardict.cc index 8b6a0dd1..f873d54a 100644 --- a/src/dict/stardict.cc +++ b/src/dict/stardict.cc @@ -456,7 +456,7 @@ string StardictDictionary::handleResource( char type, char const * resource, siz // See "Type identifiers" at http://www.huzheng.org/stardict/StarDictFileFormat switch ( type ) { case 'x': // Xdxf content - return Xdxf2Html::convert( string( resource, size ), Xdxf2Html::STARDICT, NULL, this, &resourceZip ); + return Xdxf2Html::convert( string( resource, size ), Xdxf2Html::STARDICT, NULL, this ); case 'h': // Html content { QString articleText = QString( "
" ) + QString::fromUtf8( resource, size ) + "
"; diff --git a/src/dict/xdxf.cc b/src/dict/xdxf.cc index 5e4a27b7..e8d1e194 100644 --- a/src/dict/xdxf.cc +++ b/src/dict/xdxf.cc @@ -633,7 +633,6 @@ void XdxfDictionary::loadArticle( uint32_t address, string & articleText, QStrin Xdxf2Html::XDXF, idxHeader.hasAbrv ? &abrv : NULL, this, - &resourceZip, fType == Logical, idxHeader.revisionNumber, headword ); diff --git a/src/dict/xdxf2html.cc b/src/dict/xdxf2html.cc index e3ce30c5..24aaab64 100644 --- a/src/dict/xdxf2html.cc +++ b/src/dict/xdxf2html.cc @@ -70,7 +70,6 @@ string convert( string const & in, DICT_TYPE type, map< string, string > const * pAbrv, Dictionary::Class * dictPtr, - IndexedZip * resourceZip, bool isLogicalFormat, unsigned revisionNumber, QString * headword ) diff --git a/src/dict/xdxf2html.hh b/src/dict/xdxf2html.hh index 42e936a0..942eafba 100644 --- a/src/dict/xdxf2html.hh +++ b/src/dict/xdxf2html.hh @@ -27,7 +27,6 @@ string convert( string const &, DICT_TYPE type, map< string, string > const * pAbrv, Dictionary::Class * dictPtr, - IndexedZip * resourceZip, bool isLogicalFormat = false, unsigned revisionNumber = 0, QString * headword = 0 ); diff --git a/src/ui/articleview.cc b/src/ui/articleview.cc index 5002748b..987d2f04 100644 --- a/src/ui/articleview.cc +++ b/src/ui/articleview.cc @@ -1141,11 +1141,6 @@ void ArticleView::openLink( QUrl const & url, QUrl const & ref, QString const & } ResourceToSaveHandler * ArticleView::saveResource( const QUrl & url, const QString & fileName ) -{ - return saveResource( url, webview->url(), fileName ); -} - -ResourceToSaveHandler * ArticleView::saveResource( const QUrl & url, const QUrl & ref, const QString & fileName ) { ResourceToSaveHandler * handler = new ResourceToSaveHandler( this, fileName ); sptr< Dictionary::DataRequest > req; @@ -1659,7 +1654,7 @@ void ArticleView::contextMenuRequested( QPoint const & pos ) if ( !fileName.isEmpty() ) { QFileInfo fileInfo( fileName ); emit storeResourceSavePath( QDir::toNativeSeparators( fileInfo.absoluteDir().absolutePath() ) ); - saveResource( url, webview->url(), fileName ); + saveResource( url, fileName ); } } else if ( result == openImageAction ) { @@ -1682,7 +1677,7 @@ void ArticleView::contextMenuRequested( QPoint const & pos ) if ( !fileName.isEmpty() ) { QFileInfo fileInfo( fileName ); - auto handler = saveResource( url, webview->url(), fileName ); + auto handler = saveResource( url, fileName ); if ( !handler->isEmpty() ) { connect( handler, &ResourceToSaveHandler::done, this, [ fileName ]() { diff --git a/src/ui/articleview.hh b/src/ui/articleview.hh index 2aa82f8f..fd25f8a3 100644 --- a/src/ui/articleview.hh +++ b/src/ui/articleview.hh @@ -248,7 +248,6 @@ public: void setActiveArticleId( QString const & ); ResourceToSaveHandler * saveResource( const QUrl & url, const QString & fileName ); - ResourceToSaveHandler * saveResource( const QUrl & url, const QUrl & ref, const QString & fileName ); void findText( QString & text, const QWebEnginePage::FindFlags & f,