1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor: remove Nexus::quit() and replace with qApp->quit()

They are doing the same.
This commit is contained in:
sudden6 2018-10-31 01:51:20 +01:00
parent a3344a127f
commit 6097c3f94f
No known key found for this signature in database
GPG Key ID: 279509B499E032B9
3 changed files with 3 additions and 12 deletions

View File

@ -163,7 +163,7 @@ void Nexus::showLogin()
Settings::getInstance().setCurrentProfile(profile->getName());
showMainGUI();
} else {
quit();
qApp->quit();
}
}
@ -225,14 +225,6 @@ void Nexus::showMainGUI()
GUI::setEnabled(true);
}
/**
* @brief Calls QApplication::quit(), and causes Nexus::isRunning() to return false
*/
void Nexus::quit()
{
qApp->quit();
}
/**
* @brief Returns the singleton instance.
*/

View File

@ -42,7 +42,6 @@ class Nexus : public QObject
public:
void start();
void showMainGUI();
void quit();
static Nexus& getInstance();
static void destroyInstance();

View File

@ -589,7 +589,7 @@ void Widget::closeEvent(QCloseEvent* event)
saveWindowGeometry();
saveSplitterGeometry();
QWidget::closeEvent(event);
Nexus::getInstance().quit();
qApp->quit();
}
}
@ -638,7 +638,7 @@ void Widget::onFailedToStartCore()
"toxcore failed to start, the application will terminate after you close this message."));
critical.setIcon(QMessageBox::Critical);
critical.exec();
Nexus::getInstance().quit();
qApp->exit(EXIT_FAILURE);
}
void Widget::onBadProxyCore()