diff options
author | Kevin Simons <kevin.simons@nokia.com> | 2012-04-24 16:12:25 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-04-24 16:28:06 +0200 |
commit | 8b596071c868770d9dd8cb95e76420fe23047a38 (patch) | |
tree | 94bbd2c6d6386fe3e3eebc2de5d3de4473baeeee /tools | |
parent | 71b9b4d20fa066aaf2ac382f0e83761ce4a795e8 (diff) |
Make jsondb-client a QCoreApplication
QQmlEngine no longer requires a QGuiApplication, so we can remove the
horrible platform plugin hackery from jsondb-client.
Change-Id: I2579bc59b9c7c45faaeb89021c005b8307b25fba
Reviewed-by: Jamey Hicks <jamey.hicks@nokia.com>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/jsondb-client/main.cpp | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/tools/jsondb-client/main.cpp b/tools/jsondb-client/main.cpp index b389131..385e0a5 100644 --- a/tools/jsondb-client/main.cpp +++ b/tools/jsondb-client/main.cpp @@ -40,7 +40,7 @@ ****************************************************************************/ #include <QtCore> -#include <QGuiApplication> +#include <QCoreApplication> #include <iostream> #include "client.h" @@ -61,22 +61,11 @@ static void usage(const QString &name, int exitCode = 0) int main(int argc, char * argv[]) { - // Hack to avoid making people specify a platform plugin. - // We only need QGuiApplication so that we can use QQmlEngine. - bool platformSpecified = false; - for (int i = 0; i < argc; i++) { - if (strcmp(argv[i], "-platform") == 0) - platformSpecified = true; - } - - if (!platformSpecified) - setenv("QT_QPA_PLATFORM", "minimal", false); - - QGuiApplication::setOrganizationName("Nokia"); - QGuiApplication::setOrganizationDomain("qt.nokia.com"); - QGuiApplication::setApplicationName("jclient"); - QGuiApplication::setApplicationVersion("1.0"); - QGuiApplication app(argc, argv); + QCoreApplication::setOrganizationName("Nokia"); + QCoreApplication::setOrganizationDomain("qt.nokia.com"); + QCoreApplication::setApplicationName("jclient"); + QCoreApplication::setApplicationVersion("1.0"); + QCoreApplication app(argc, argv); QStringList args = QCoreApplication::arguments(); qDebug() << "args: " << args; @@ -86,7 +75,6 @@ int main(int argc, char * argv[]) bool terminate = false; bool debug = false; - while (args.size()) { QString arg = args.takeFirst(); if (!arg.startsWith("-")) { |