From 583ee7b70e51e71fcae6104ab5ff5b8cc9637857 Mon Sep 17 00:00:00 2001 From: Mathias Schmid <50880400+matzeschmid@users.noreply.github.com> Date: Fri, 15 Jan 2021 18:19:51 +0100 Subject: [PATCH] Fix update of some translations after application language switch. (#3049) --- gui/mainwindow.cpp | 5 ++++- gui/resultsview.cpp | 3 ++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index e5f234ad6..7c3716644 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -1,6 +1,6 @@ /* * 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 * 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 mUI.retranslateUi(this); mUI.mResults->translate(); + mLineEditFilter->setPlaceholderText(QCoreApplication::translate("MainWindow", "Quick Filter:")); + if (mProjectFile) + formatAndSetTitle(tr("Project:") + ' ' + mProjectFile->getFilename()); } } diff --git a/gui/resultsview.cpp b/gui/resultsview.cpp index 2fc7b621c..e724c14f4 100644 --- a/gui/resultsview.cpp +++ b/gui/resultsview.cpp @@ -1,6 +1,6 @@ /* * 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 * 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() { + mUI.retranslateUi(this); mUI.mTree->translate(); }