Tidy up some code to keep SonarQube happy.

This commit is contained in:
Akshay Joshi
2020-06-15 12:12:19 +01:00
committed by Dave Page
parent 18277543b6
commit a23fad0ba8
12 changed files with 55 additions and 86 deletions

View File

@@ -15,16 +15,13 @@
#include <QClipboard>
#include <QMessageBox>
MenuActions::MenuActions()
MenuActions::MenuActions():
m_appServerUrl(""),
m_logFile(""),
m_logWindow(Q_NULLPTR)
{
m_logWindow = Q_NULLPTR;
m_logFile = "";
m_appServerUrl = "";
}
MenuActions::~MenuActions()
{
}
void MenuActions::setAppServerUrl(QString appServerUrl)
{
@@ -106,12 +103,9 @@ void MenuActions::onConfig()
settings.setValue("PythonPath", pythonpath);
settings.setValue("ApplicationPath", applicationpath);
if (needRestart)
if (needRestart && QMessageBox::Yes == QMessageBox::question(Q_NULLPTR, tr("Shut down server?"), QString(tr("The %1 server must be restarted for changes to take effect. Do you want to shut down the server now?")).arg(PGA_APP_NAME), QMessageBox::Yes | QMessageBox::No))
{
if (QMessageBox::Yes == QMessageBox::question(Q_NULLPTR, tr("Shut down server?"), QString(tr("The %1 server must be restarted for changes to take effect. Do you want to shut down the server now?")).arg(PGA_APP_NAME), QMessageBox::Yes | QMessageBox::No))
{
exit(0);
}
exit(0);
}
}
}