mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 15:24:05 +00:00
Merge pull request #1854 from xiaoyifang/opt/clean-unused-parameter
opt: remove unused parameter
This commit is contained in:
commit
3e16a0cccf
|
@ -456,7 +456,7 @@ string StardictDictionary::handleResource( char type, char const * resource, siz
|
||||||
// See "Type identifiers" at http://www.huzheng.org/stardict/StarDictFileFormat
|
// See "Type identifiers" at http://www.huzheng.org/stardict/StarDictFileFormat
|
||||||
switch ( type ) {
|
switch ( type ) {
|
||||||
case 'x': // Xdxf content
|
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
|
case 'h': // Html content
|
||||||
{
|
{
|
||||||
QString articleText = QString( "<div class=\"sdct_h\">" ) + QString::fromUtf8( resource, size ) + "</div>";
|
QString articleText = QString( "<div class=\"sdct_h\">" ) + QString::fromUtf8( resource, size ) + "</div>";
|
||||||
|
|
|
@ -633,7 +633,6 @@ void XdxfDictionary::loadArticle( uint32_t address, string & articleText, QStrin
|
||||||
Xdxf2Html::XDXF,
|
Xdxf2Html::XDXF,
|
||||||
idxHeader.hasAbrv ? &abrv : NULL,
|
idxHeader.hasAbrv ? &abrv : NULL,
|
||||||
this,
|
this,
|
||||||
&resourceZip,
|
|
||||||
fType == Logical,
|
fType == Logical,
|
||||||
idxHeader.revisionNumber,
|
idxHeader.revisionNumber,
|
||||||
headword );
|
headword );
|
||||||
|
|
|
@ -70,7 +70,6 @@ string convert( string const & in,
|
||||||
DICT_TYPE type,
|
DICT_TYPE type,
|
||||||
map< string, string > const * pAbrv,
|
map< string, string > const * pAbrv,
|
||||||
Dictionary::Class * dictPtr,
|
Dictionary::Class * dictPtr,
|
||||||
IndexedZip * resourceZip,
|
|
||||||
bool isLogicalFormat,
|
bool isLogicalFormat,
|
||||||
unsigned revisionNumber,
|
unsigned revisionNumber,
|
||||||
QString * headword )
|
QString * headword )
|
||||||
|
|
|
@ -27,7 +27,6 @@ string convert( string const &,
|
||||||
DICT_TYPE type,
|
DICT_TYPE type,
|
||||||
map< string, string > const * pAbrv,
|
map< string, string > const * pAbrv,
|
||||||
Dictionary::Class * dictPtr,
|
Dictionary::Class * dictPtr,
|
||||||
IndexedZip * resourceZip,
|
|
||||||
bool isLogicalFormat = false,
|
bool isLogicalFormat = false,
|
||||||
unsigned revisionNumber = 0,
|
unsigned revisionNumber = 0,
|
||||||
QString * headword = 0 );
|
QString * headword = 0 );
|
||||||
|
|
|
@ -1141,11 +1141,6 @@ void ArticleView::openLink( QUrl const & url, QUrl const & ref, QString const &
|
||||||
}
|
}
|
||||||
|
|
||||||
ResourceToSaveHandler * ArticleView::saveResource( const QUrl & url, const QString & fileName )
|
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 );
|
ResourceToSaveHandler * handler = new ResourceToSaveHandler( this, fileName );
|
||||||
sptr< Dictionary::DataRequest > req;
|
sptr< Dictionary::DataRequest > req;
|
||||||
|
@ -1659,7 +1654,7 @@ void ArticleView::contextMenuRequested( QPoint const & pos )
|
||||||
if ( !fileName.isEmpty() ) {
|
if ( !fileName.isEmpty() ) {
|
||||||
QFileInfo fileInfo( fileName );
|
QFileInfo fileInfo( fileName );
|
||||||
emit storeResourceSavePath( QDir::toNativeSeparators( fileInfo.absoluteDir().absolutePath() ) );
|
emit storeResourceSavePath( QDir::toNativeSeparators( fileInfo.absoluteDir().absolutePath() ) );
|
||||||
saveResource( url, webview->url(), fileName );
|
saveResource( url, fileName );
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if ( result == openImageAction ) {
|
else if ( result == openImageAction ) {
|
||||||
|
@ -1682,7 +1677,7 @@ void ArticleView::contextMenuRequested( QPoint const & pos )
|
||||||
|
|
||||||
if ( !fileName.isEmpty() ) {
|
if ( !fileName.isEmpty() ) {
|
||||||
QFileInfo fileInfo( fileName );
|
QFileInfo fileInfo( fileName );
|
||||||
auto handler = saveResource( url, webview->url(), fileName );
|
auto handler = saveResource( url, fileName );
|
||||||
|
|
||||||
if ( !handler->isEmpty() ) {
|
if ( !handler->isEmpty() ) {
|
||||||
connect( handler, &ResourceToSaveHandler::done, this, [ fileName ]() {
|
connect( handler, &ResourceToSaveHandler::done, this, [ fileName ]() {
|
||||||
|
|
|
@ -248,7 +248,6 @@ public:
|
||||||
void setActiveArticleId( QString const & );
|
void setActiveArticleId( QString const & );
|
||||||
|
|
||||||
ResourceToSaveHandler * saveResource( const QUrl & url, const QString & fileName );
|
ResourceToSaveHandler * saveResource( const QUrl & url, const QString & fileName );
|
||||||
ResourceToSaveHandler * saveResource( const QUrl & url, const QUrl & ref, const QString & fileName );
|
|
||||||
|
|
||||||
void findText( QString & text,
|
void findText( QString & text,
|
||||||
const QWebEnginePage::FindFlags & f,
|
const QWebEnginePage::FindFlags & f,
|
||||||
|
|
Loading…
Reference in a new issue