Commit cbd8b21d authored by Christoph Cullmann's avatar Christoph Cullmann 🐮
Browse files

fix parser lifetime issues during testing

parent a3d3009b
Pipeline #169669 failed with stage
in 5 minutes and 9 seconds
......@@ -18,7 +18,8 @@ QTEST_MAIN(LocationHistoryTest)
LocationHistoryTest::LocationHistoryTest(QObject *parent)
: QObject(parent)
{
app = new KateApp(QCommandLineParser());
static QCommandLineParser parser;
app = new KateApp(parser);
app->sessionManager()->activateAnonymousSession();
// create some usable example
......
......@@ -20,7 +20,8 @@ QTEST_MAIN(KateSessionManagerTest)
void KateSessionManagerTest::initTestCase()
{
// we need an application object, as session loading will trigger modifications to that
m_app = new KateApp(QCommandLineParser());
static QCommandLineParser parser;
m_app = new KateApp(parser);
m_app->sessionManager()->activateAnonymousSession();
}
......
......@@ -19,7 +19,8 @@ QTEST_MAIN(KateSessionsActionTest)
void KateSessionsActionTest::initTestCase()
{
// we need an application object, as session loading will trigger modifications to that
m_app = new KateApp(QCommandLineParser());
static QCommandLineParser parser;
m_app = new KateApp(parser);
m_app->sessionManager()->activateAnonymousSession();
}
......
Supports Markdown
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