mirror of
https://github.com/qTox/qTox.git
synced 2024-03-22 14:00:36 +08:00
Disable the GUI until a profile is active
There are small instants on startup and while profile switching during which no profile is loaded but the GUI could still receive events, e.g. between two modal windows. Disable the GUI to prevent that.
This commit is contained in:
parent
e682dada3b
commit
7eb9370c0b
|
@ -327,6 +327,9 @@ void Core::start()
|
|||
emit idSet(getSelfId().toString());
|
||||
}
|
||||
|
||||
if (isReady())
|
||||
GUI::setEnabled(true);
|
||||
|
||||
process(); // starts its own timer
|
||||
}
|
||||
|
||||
|
@ -988,8 +991,6 @@ void Core::switchConfiguration(const QString& _profile)
|
|||
HistoryKeeper::resetInstance();
|
||||
|
||||
start();
|
||||
if (isReady())
|
||||
GUI::setEnabled(true);
|
||||
}
|
||||
|
||||
void Core::loadFriends()
|
||||
|
|
|
@ -79,6 +79,12 @@ void Nexus::start()
|
|||
#endif
|
||||
GUI::getInstance();
|
||||
|
||||
// Zetok protection
|
||||
// There are small instants on startup during which no
|
||||
// profile is loaded but the GUI could still receive events,
|
||||
// e.g. between two modal windows. Disable the GUI to prevent that.
|
||||
GUI::setEnabled(false);
|
||||
|
||||
// Connections
|
||||
#ifdef Q_OS_ANDROID
|
||||
connect(core, &Core::connected, androidgui, &AndroidGUI::onConnected);
|
||||
|
|
Loading…
Reference in New Issue
Block a user