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: 6 additions & 2 deletions gui/mainwindow.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@
#include <QDir>
#include <QDesktopServices>
#include <QUrl>
#include <QAction>
#include <QActionGroup>
#include "mainwindow.h"
#include "aboutdialog.h"
#include "threadhandler.h"
Expand All @@ -48,6 +50,7 @@ MainWindow::MainWindow() :
mTranslation(new TranslationHandler(this)),
mLogView(NULL),
mProject(NULL),
mPlatformActions(new QActionGroup(this)),
mExiting(false)
{
mUI.setupUi(this);
Expand Down Expand Up @@ -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);
Expand All @@ -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()));
}
Expand Down Expand Up @@ -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);
Expand All @@ -520,6 +523,7 @@ void MainWindow::CheckLockDownUI()
mUI.mActionOpenXML->setEnabled(false);
EnableProjectActions(false);
EnableProjectOpenActions(false);
mPlatformActions->setEnabled(false);
}

void MainWindow::ProgramSettings()
Expand Down
6 changes: 6 additions & 0 deletions gui/mainwindow.h
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ class Project;
class ErrorItem;
class StatsDialog;
class QAction;
class QActionGroup;

/// @addtogroup GUI
/// @{
Expand Down Expand Up @@ -473,6 +474,11 @@ protected slots:
*/
QTimer* mFilterTimer;

/**
* @brief GUI actions for selecting the checked platform.
*/
QActionGroup *mPlatformActions;

private:

/**
Expand Down