diff --git a/gui/aboutdialog.cpp b/gui/aboutdialog.cpp index ec79fc6bf..41b45ae1c 100644 --- a/gui/aboutdialog.cpp +++ b/gui/aboutdialog.cpp @@ -21,12 +21,17 @@ #include #include "aboutdialog.h" -AboutDialog::AboutDialog(const QString &version, QWidget *parent) +AboutDialog::AboutDialog(const QString &version, const QString &extraVersion, QWidget *parent) : QDialog(parent) { mUI.setupUi(this); - mUI.mVersion->setText(mUI.mVersion->text().arg(version)); + QString fmtVersion(version); + if (!extraVersion.isEmpty()) + { + fmtVersion += " (" + extraVersion + ")"; + } + mUI.mVersion->setText(mUI.mVersion->text().arg(fmtVersion)); QString url = "http://cppcheck.sourceforge.net/"; mUI.mHomepage->setText(mUI.mHomepage->text().arg(url)); connect(mUI.mButtons, SIGNAL(accepted()), this, SLOT(accept())); diff --git a/gui/aboutdialog.h b/gui/aboutdialog.h index 6e08358a1..f8bc58c92 100644 --- a/gui/aboutdialog.h +++ b/gui/aboutdialog.h @@ -36,7 +36,8 @@ class AboutDialog : public QDialog { Q_OBJECT public: - AboutDialog(const QString &version, QWidget *parent = 0); + AboutDialog(const QString &version, const QString &extraVersion, + QWidget *parent = 0); private: Ui::About mUI; diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index 57b6284bf..ae4a1fb94 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -680,7 +680,7 @@ void MainWindow::ToggleAllChecked(bool checked) void MainWindow::About() { - AboutDialog *dlg = new AboutDialog(CppCheck::version(), this); + AboutDialog *dlg = new AboutDialog(CppCheck::version(), CppCheck::extraVersion(), this); dlg->exec(); }