Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,7 @@
#include <QCloseEvent>
#include <QCoreApplication>
#include <QDateTime>
#include <QDesktopServices>
#include <QDebug>
#include <QDialog>
#include <QDir>
Expand Down Expand Up @@ -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()));
Expand Down Expand Up @@ -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);
Expand Down
3 changes: 3 additions & 0 deletions gui/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -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();

Expand Down
8 changes: 7 additions & 1 deletion gui/mainwindow.ui
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@
<x>0</x>
<y>0</y>
<width>640</width>
<height>30</height>
<height>22</height>
</rect>
</property>
<widget class="QMenu" name="mMenuFile">
Expand Down Expand Up @@ -200,6 +200,7 @@
<addaction name="mActionHelpContents"/>
<addaction name="mActionLicense"/>
<addaction name="mActionAuthors"/>
<addaction name="mActionEULA"/>
<addaction name="separator"/>
<addaction name="mActionAbout"/>
</widget>
Expand Down Expand Up @@ -1025,6 +1026,11 @@
<string>Autosar</string>
</property>
</action>
<action name="mActionEULA">
<property name="text">
<string>EULA...</string>
</property>
</action>
</widget>
<customwidgets>
<customwidget>
Expand Down