X-Git-Url: https://git.quassel-irc.org/?p=quassel.git;a=blobdiff_plain;f=src%2Fcommon%2Fmain.cpp;h=cb935e72cb3b150b3cdae93b7a031ae06f0e07ce;hp=00d7c86ecb2e4f84b79382e19fa64a1fa93a0ab8;hb=9ac6ae4ee26819874d8843ba09f38a24088d663d;hpb=45d9ea6ed5d64eec3ca351fdcf7610c7cff3529d diff --git a/src/common/main.cpp b/src/common/main.cpp index 00d7c86e..cb935e72 100644 --- a/src/common/main.cpp +++ b/src/common/main.cpp @@ -98,8 +98,18 @@ int main(int argc, char **argv) { gui->init(); #endif +#ifndef BUILD_QTUI + if(!QCoreApplication::arguments().contains("--norestore")) { + Core::restoreState(); + } +#endif + int exitCode = app.exec(); +#ifndef BUILD_QTUI + Core::saveState(); +#endif + #ifndef BUILD_CORE // the mainWin has to be deleted before the Core // if not Quassel will crash on exit under certain conditions since the gui