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:
parent
a3344a127f
commit
6097c3f94f
|
@ -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.
|
||||
*/
|
||||
|
|
|
@ -42,7 +42,6 @@ class Nexus : public QObject
|
|||
public:
|
||||
void start();
|
||||
void showMainGUI();
|
||||
void quit();
|
||||
|
||||
static Nexus& getInstance();
|
||||
static void destroyInstance();
|
||||
|
|
|
@ -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()
|
||||
|
|
Loading…
Reference in New Issue
Block a user