Commit 8589376e authored by Daan De Meyer's avatar Daan De Meyer Committed by Nate Graham
Browse files

ksplashqml: Fix QCoreApplication warning

Fixes the "QCoreApplication::arguments: Please instantiate the
QApplication object first" warning.
parent c3f635a1
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
#include <QTextStream> #include <QTextStream>
#include <KQuickAddons/QtQuickSettings>
#include <kworkspace.h> #include <kworkspace.h>
#include <iostream> #include <iostream>
...@@ -64,8 +62,6 @@ int main(int argc, char **argv) ...@@ -64,8 +62,6 @@ int main(int argc, char **argv)
if (strcmp("--test", argv[i]) == 0 || strcmp("--help", argv[i]) == 0) if (strcmp("--test", argv[i]) == 0 || strcmp("--help", argv[i]) == 0)
test = true; test = true;
} }
KQuickAddons::QtQuickSettings::init();
//enable to send log output to /tmp/ksplash //enable to send log output to /tmp/ksplash
//which is useful for debugging //which is useful for debugging
// qInstallMsgHandler(myMessageHandler); // qInstallMsgHandler(myMessageHandler);
......
...@@ -29,6 +29,7 @@ ...@@ -29,6 +29,7 @@
#include <QDebug> #include <QDebug>
#include <QCommandLineParser> #include <QCommandLineParser>
#include <KQuickAddons/QtQuickSettings>
#include <KWindowSystem> #include <KWindowSystem>
#include <KWayland/Client/connection_thread.h> #include <KWayland/Client/connection_thread.h>
#include <KWayland/Client/registry.h> #include <KWayland/Client/registry.h>
...@@ -53,6 +54,8 @@ SplashApp::SplashApp(int &argc, char ** argv) ...@@ -53,6 +54,8 @@ SplashApp::SplashApp(int &argc, char ** argv)
m_testing(false), m_testing(false),
m_window(false) m_window(false)
{ {
KQuickAddons::QtQuickSettings::init();
QCommandLineParser parser; QCommandLineParser parser;
parser.addOption(QCommandLineOption(QStringLiteral("test"), QStringLiteral("Run in test mode"))); parser.addOption(QCommandLineOption(QStringLiteral("test"), QStringLiteral("Run in test mode")));
parser.addOption(QCommandLineOption(QStringLiteral("window"), QStringLiteral("Run in windowed mode"))); parser.addOption(QCommandLineOption(QStringLiteral("window"), QStringLiteral("Run in windowed mode")));
......
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