Show version number in Cppcheck GUI's title bar (#2615)
Also don't mark the string "Cppcheck" as translatable, as it is questionable whether the product's name is supposed to be translated ever.
This commit is contained in:
parent
d88557bc18
commit
e8c5c2b154
|
@ -1363,11 +1363,18 @@ void MainWindow::toggleFilterToolBar()
|
|||
|
||||
void MainWindow::formatAndSetTitle(const QString &text)
|
||||
{
|
||||
QString nameWithVersion = QString("Cppcheck %1").arg(CppCheck::version());
|
||||
|
||||
QString extraVersion = CppCheck::extraVersion();
|
||||
if (!extraVersion.isEmpty()) {
|
||||
nameWithVersion += " (" + extraVersion + ")";
|
||||
}
|
||||
|
||||
QString title;
|
||||
if (text.isEmpty())
|
||||
title = tr("Cppcheck");
|
||||
title = nameWithVersion;
|
||||
else
|
||||
title = QString(tr("Cppcheck - %1")).arg(text);
|
||||
title = QString("%1 - %2").arg(nameWithVersion, text);
|
||||
setWindowTitle(title);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue