mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-24 00:14:06 +00:00
Merge pull request #1210 from xiaoyifang/opt/code-smell
refactor: use static class method instead of instance method
This commit is contained in:
commit
8798f04312
|
@ -534,7 +534,7 @@ int main( int argc, char ** argv )
|
|||
auto font = QApplication::font();
|
||||
if ( !cfg.preferences.interfaceFont.isEmpty() && font.family() != cfg.preferences.interfaceFont ) {
|
||||
font.setFamily( cfg.preferences.interfaceFont );
|
||||
app.setFont( font );
|
||||
QApplication::setFont( font );
|
||||
}
|
||||
|
||||
QLocale locale( localeName );
|
||||
|
|
|
@ -1224,8 +1224,9 @@ void MainWindow::commitData()
|
|||
for ( auto & file : entries ) {
|
||||
QString const fileName = file.fileName();
|
||||
|
||||
if ( dictMap.contains( fileName.toStdString() ) )
|
||||
continue;
|
||||
//remove both normal index and fts index.
|
||||
if ( !dictMap.contains( fileName.toStdString() ) ) {
|
||||
auto filePath = file.absoluteFilePath();
|
||||
qDebug() << "remove invalid index files & fts dirs";
|
||||
|
||||
|
@ -1236,7 +1237,6 @@ void MainWindow::commitData()
|
|||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
try {
|
||||
|
|
Loading…
Reference in a new issue