mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
MainApplication: Sync settings after writing isRunning value
Fixes correctly detecting crashes during session restore.
This commit is contained in:
parent
e41b0edf0a
commit
ad3780e8df
@ -291,6 +291,7 @@ MainApplication::MainApplication(int &argc, char** argv)
|
||||
settings.setValue(QSL("isRunning"), true);
|
||||
settings.setValue(QSL("isRestoring"), wasRunning);
|
||||
settings.endGroup();
|
||||
settings.sync();
|
||||
|
||||
m_isStartingAfterCrash = wasRunning && wasRestoring;
|
||||
|
||||
|
@ -76,6 +76,11 @@ void Settings::endGroup()
|
||||
s_settings->endGroup();
|
||||
}
|
||||
|
||||
void Settings::sync()
|
||||
{
|
||||
s_settings->sync();
|
||||
}
|
||||
|
||||
QSettings* Settings::globalSettings()
|
||||
{
|
||||
return s_settings;
|
||||
|
@ -47,6 +47,8 @@ public:
|
||||
void beginGroup(const QString &prefix);
|
||||
void endGroup();
|
||||
|
||||
void sync();
|
||||
|
||||
private:
|
||||
static QSettings* s_settings;
|
||||
static QzSettings* s_qzSettings;
|
||||
|
Loading…
Reference in New Issue
Block a user