diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index d4dbc69bf9d..05212db30f8 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -77,6 +77,7 @@ #include #include #include +#include #include #include #include @@ -194,6 +195,8 @@ MainWindow::MainWindow(TranslationHandler* th, QSettings* settings) : // About menu connect(mUI->mActionAbout, &QAction::triggered, this, &MainWindow::about); connect(mUI->mActionLicense, &QAction::triggered, this, &MainWindow::showLicense); + mUI->mActionEULA->setVisible(isCppcheckPremium()); + connect(mUI->mActionEULA, &QAction::triggered, this, &MainWindow::showEULA); // View > Toolbar menu connect(mUI->mActionToolBarMain, SIGNAL(toggled(bool)), this, SLOT(toggleMainToolBar())); @@ -1646,6 +1649,11 @@ void MainWindow::showAuthors() dlg->exec(); } +void MainWindow::showEULA() +{ + QDesktopServices::openUrl(QUrl("https://www.cppcheck.com/EULA")); +} + void MainWindow::performSelectedFilesCheck(const QStringList &selectedFilesList) { reAnalyzeSelected(selectedFilesList); diff --git a/gui/mainwindow.h b/gui/mainwindow.h index 4999f101f80..76fda4f0de6 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -170,6 +170,9 @@ public slots: /** @brief Slot to to show authors list */ void showAuthors(); + /** @brief Slot to to show EULA */ + void showEULA(); + /** @brief Slot to save results */ void save(); diff --git a/gui/mainwindow.ui b/gui/mainwindow.ui index 6fb74bc0cb2..bf83b86a65e 100644 --- a/gui/mainwindow.ui +++ b/gui/mainwindow.ui @@ -124,7 +124,7 @@ 0 0 640 - 30 + 22 @@ -200,6 +200,7 @@ + @@ -1025,6 +1026,11 @@ Autosar + + + EULA... + +