Fix update of some translations after application language switch. (#3049)

This commit is contained in:
Mathias Schmid 2021-01-15 18:19:51 +01:00 committed by GitHub
parent 503662f625
commit 583ee7b70e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,6 @@
/* /*
* Cppcheck - A tool for static C/C++ code analysis * Cppcheck - A tool for static C/C++ code analysis
* Copyright (C) 2007-2020 Cppcheck team. * Copyright (C) 2007-2021 Cppcheck team.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -1459,6 +1459,9 @@ void MainWindow::setLanguage(const QString &code)
//Translate everything that is visible here //Translate everything that is visible here
mUI.retranslateUi(this); mUI.retranslateUi(this);
mUI.mResults->translate(); mUI.mResults->translate();
mLineEditFilter->setPlaceholderText(QCoreApplication::translate("MainWindow", "Quick Filter:"));
if (mProjectFile)
formatAndSetTitle(tr("Project:") + ' ' + mProjectFile->getFilename());
} }
} }

View File

@ -1,6 +1,6 @@
/* /*
* Cppcheck - A tool for static C/C++ code analysis * Cppcheck - A tool for static C/C++ code analysis
* Copyright (C) 2007-2020 Cppcheck team. * Copyright (C) 2007-2021 Cppcheck team.
* *
* This program is free software: you can redistribute it and/or modify * This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by * it under the terms of the GNU General Public License as published by
@ -364,6 +364,7 @@ void ResultsView::saveSettings(QSettings *settings)
void ResultsView::translate() void ResultsView::translate()
{ {
mUI.retranslateUi(this);
mUI.mTree->translate(); mUI.mTree->translate();
} }