diff --git a/gui/mainwindow.cpp b/gui/mainwindow.cpp index e9b2ff39f..25caed592 100644 --- a/gui/mainwindow.cpp +++ b/gui/mainwindow.cpp @@ -28,6 +28,8 @@ #include #include #include +#include +#include #include "mainwindow.h" #include "aboutdialog.h" #include "threadhandler.h" @@ -48,6 +50,7 @@ MainWindow::MainWindow() : mTranslation(new TranslationHandler(this)), mLogView(NULL), mProject(NULL), + mPlatformActions(new QActionGroup(this)), mExiting(false) { mUI.setupUi(this); @@ -148,7 +151,6 @@ MainWindow::MainWindow() : mUI.mActionProjectMRU->setVisible(false); UpdateMRUMenuItems(); - QActionGroup* platformGroup = new QActionGroup(this); for (int i = 0; i < mPlatforms.getCount(); i++) { Platform plat = mPlatforms.mPlatforms[i]; QAction *act = new QAction(this); @@ -157,7 +159,7 @@ MainWindow::MainWindow() : act->setText(plat.mTitle); act->setData(plat.mType); act->setCheckable(true); - act->setActionGroup(platformGroup); + act->setActionGroup(mPlatformActions); mUI.mMenuCheck->insertAction(mUI.mActionPlatforms, act); connect(act, SIGNAL(triggered()), this, SLOT(SelectPlatform())); } @@ -503,6 +505,7 @@ void MainWindow::CheckDone() mUI.mActionOpenXML->setEnabled(true); EnableProjectActions(true); EnableProjectOpenActions(true); + mPlatformActions->setEnabled(true); if (mUI.mResults->HasResults()) { mUI.mActionClearResults->setEnabled(true); @@ -520,6 +523,7 @@ void MainWindow::CheckLockDownUI() mUI.mActionOpenXML->setEnabled(false); EnableProjectActions(false); EnableProjectOpenActions(false); + mPlatformActions->setEnabled(false); } void MainWindow::ProgramSettings() diff --git a/gui/mainwindow.h b/gui/mainwindow.h index 6b733bb6e..f5c2d6b13 100644 --- a/gui/mainwindow.h +++ b/gui/mainwindow.h @@ -41,6 +41,7 @@ class Project; class ErrorItem; class StatsDialog; class QAction; +class QActionGroup; /// @addtogroup GUI /// @{ @@ -473,6 +474,11 @@ protected: */ QTimer* mFilterTimer; + /** + * @brief GUI actions for selecting the checked platform. + */ + QActionGroup *mPlatformActions; + private: /**