refactor: MainWindow remove test menu
This commit is contained in:
parent
07219ed431
commit
83c8d295d4
2 changed files with 1 additions and 27 deletions
|
|
@ -81,9 +81,7 @@ MainWindow::MainWindow()
|
||||||
m_actionRestore{new QAction(tr("&Open Deskflow"), this)},
|
m_actionRestore{new QAction(tr("&Open Deskflow"), this)},
|
||||||
m_actionSettings{new QAction(tr("Preferences"), this)},
|
m_actionSettings{new QAction(tr("Preferences"), this)},
|
||||||
m_actionStartCore{new QAction(tr("&Start"), this)},
|
m_actionStartCore{new QAction(tr("&Start"), this)},
|
||||||
m_actionStopCore{new QAction(tr("S&top"), this)},
|
m_actionStopCore{new QAction(tr("S&top"), this)}
|
||||||
m_actionTestCriticalError{new QAction(tr("Test Critical Error"), this)},
|
|
||||||
m_actionTestFatalError{new QAction(tr("Test Fatal Error"), this)}
|
|
||||||
{
|
{
|
||||||
const auto themeName = QStringLiteral("deskflow-%1").arg(iconMode());
|
const auto themeName = QStringLiteral("deskflow-%1").arg(iconMode());
|
||||||
if (QIcon::themeName().isEmpty())
|
if (QIcon::themeName().isEmpty())
|
||||||
|
|
@ -303,8 +301,6 @@ void MainWindow::connectSlots()
|
||||||
connect(m_actionSettings, &QAction::triggered, this, &MainWindow::openSettings);
|
connect(m_actionSettings, &QAction::triggered, this, &MainWindow::openSettings);
|
||||||
connect(m_actionStartCore, &QAction::triggered, this, &MainWindow::startCore);
|
connect(m_actionStartCore, &QAction::triggered, this, &MainWindow::startCore);
|
||||||
connect(m_actionStopCore, &QAction::triggered, this, &MainWindow::stopCore);
|
connect(m_actionStopCore, &QAction::triggered, this, &MainWindow::stopCore);
|
||||||
connect(m_actionTestFatalError, &QAction::triggered, this, &MainWindow::testFatalError);
|
|
||||||
connect(m_actionTestCriticalError, &QAction::triggered, this, &MainWindow::testCriticalError);
|
|
||||||
|
|
||||||
connect(&m_versionChecker, &VersionChecker::updateFound, this, &MainWindow::versionCheckerUpdateFound);
|
connect(&m_versionChecker, &VersionChecker::updateFound, this, &MainWindow::versionCheckerUpdateFound);
|
||||||
|
|
||||||
|
|
@ -439,16 +435,6 @@ void MainWindow::stopCore()
|
||||||
m_coreProcess.stop();
|
m_coreProcess.stop();
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::testFatalError() const
|
|
||||||
{
|
|
||||||
qFatal() << "test fatal error";
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::testCriticalError() const
|
|
||||||
{
|
|
||||||
qCritical() << "test critical error";
|
|
||||||
}
|
|
||||||
|
|
||||||
void MainWindow::clearSettings()
|
void MainWindow::clearSettings()
|
||||||
{
|
{
|
||||||
if (!messages::showClearSettings(this)) {
|
if (!messages::showClearSettings(this)) {
|
||||||
|
|
@ -676,14 +662,6 @@ void MainWindow::createMenuBar()
|
||||||
menuBar->addMenu(menuEdit);
|
menuBar->addMenu(menuEdit);
|
||||||
menuBar->addMenu(menuHelp);
|
menuBar->addMenu(menuHelp);
|
||||||
|
|
||||||
const auto enableTestMenu = QVariant(qEnvironmentVariable("DESKFLOW_TEST_MENU")).toBool();
|
|
||||||
if (enableTestMenu || kDebugBuild) {
|
|
||||||
auto testMenu = new QMenu(tr("Test"));
|
|
||||||
menuBar->addMenu(testMenu);
|
|
||||||
testMenu->addAction(m_actionTestFatalError);
|
|
||||||
testMenu->addAction(m_actionTestCriticalError);
|
|
||||||
}
|
|
||||||
|
|
||||||
setMenuBar(menuBar);
|
setMenuBar(menuBar);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -115,8 +115,6 @@ private:
|
||||||
void startCore();
|
void startCore();
|
||||||
void stopCore();
|
void stopCore();
|
||||||
bool saveServerConfig();
|
bool saveServerConfig();
|
||||||
void testFatalError() const;
|
|
||||||
void testCriticalError() const;
|
|
||||||
void resetCore();
|
void resetCore();
|
||||||
|
|
||||||
void showMyFingerprint();
|
void showMyFingerprint();
|
||||||
|
|
@ -206,6 +204,4 @@ private:
|
||||||
QAction *m_actionSettings = nullptr;
|
QAction *m_actionSettings = nullptr;
|
||||||
QAction *m_actionStartCore = nullptr;
|
QAction *m_actionStartCore = nullptr;
|
||||||
QAction *m_actionStopCore = nullptr;
|
QAction *m_actionStopCore = nullptr;
|
||||||
QAction *m_actionTestCriticalError = nullptr;
|
|
||||||
QAction *m_actionTestFatalError = nullptr;
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue