Make --batch run Dolphin in headless mode, provided --exec is also passed

This commit is contained in:
Silent
2019-08-11 20:58:04 +02:00
parent 80e8037e0b
commit b6df0bff93
3 changed files with 11 additions and 5 deletions

View File

@ -138,7 +138,7 @@ int main(int argc, char* argv[])
UICommon::CreateDirectories();
UICommon::Init();
Resources::Init();
Settings::Instance().SetBatchModeEnabled(options.is_set("batch"));
Settings::Instance().SetBatchModeEnabled(options.is_set("batch") && options.is_set("exec"));
// Hook up alerts from core
Common::RegisterMsgAlertHandler(QtMsgAlertHandler);
@ -217,8 +217,11 @@ int main(int argc, char* argv[])
}
#endif
auto* updater = new Updater(&win);
updater->start();
if (!Settings::Instance().IsBatchModeEnabled())
{
auto* updater = new Updater(&win);
updater->start();
}
retval = app.exec();
}