Commit 86f2e800 authored by David Faure's avatar David Faure

akonaditest: port "app.disableSessionManagement" to Qt5

... after seeing /tmp/akonadi_testrunner-13136/ stuff in my startup logs
:)
parent 033667a6
......@@ -30,6 +30,7 @@
#include <QApplication>
#include <QCommandLineParser>
#include <QCommandLineOption>
#include <QSessionManager>
static SetupTest *setup = nullptr;
static TestRunner *runner = nullptr;
......@@ -78,7 +79,11 @@ int main(int argc, char **argv)
parser.process(app);
aboutdata.processCommandLine(&parser);
//QT5 app.disableSessionManagement();
auto disableSessionManagement = [](QSessionManager &sm) {
sm.setRestartHint(QSessionManager::RestartNever);
};
QObject::connect(qApp, &QGuiApplication::commitDataRequest, disableSessionManagement);
QObject::connect(qApp, &QGuiApplication::saveStateRequest, disableSessionManagement);
if (parser.isSet(QStringLiteral("config"))) {
Config::instance(parser.value(QStringLiteral("config")));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment