mirror of
https://github.com/xiaoyifang/goldendict-ng.git
synced 2024-11-27 23:34: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();
|
auto font = QApplication::font();
|
||||||
if ( !cfg.preferences.interfaceFont.isEmpty() && font.family() != cfg.preferences.interfaceFont ) {
|
if ( !cfg.preferences.interfaceFont.isEmpty() && font.family() != cfg.preferences.interfaceFont ) {
|
||||||
font.setFamily( cfg.preferences.interfaceFont );
|
font.setFamily( cfg.preferences.interfaceFont );
|
||||||
app.setFont( font );
|
QApplication::setFont( font );
|
||||||
}
|
}
|
||||||
|
|
||||||
QLocale locale( localeName );
|
QLocale locale( localeName );
|
||||||
|
|
|
@ -1224,8 +1224,9 @@ void MainWindow::commitData()
|
||||||
for ( auto & file : entries ) {
|
for ( auto & file : entries ) {
|
||||||
QString const fileName = file.fileName();
|
QString const fileName = file.fileName();
|
||||||
|
|
||||||
|
if ( dictMap.contains( fileName.toStdString() ) )
|
||||||
|
continue;
|
||||||
//remove both normal index and fts index.
|
//remove both normal index and fts index.
|
||||||
if ( !dictMap.contains( fileName.toStdString() ) ) {
|
|
||||||
auto filePath = file.absoluteFilePath();
|
auto filePath = file.absoluteFilePath();
|
||||||
qDebug() << "remove invalid index files & fts dirs";
|
qDebug() << "remove invalid index files & fts dirs";
|
||||||
|
|
||||||
|
@ -1236,7 +1237,6 @@ void MainWindow::commitData()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in a new issue