summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlex Blasche <alexander.blasche@qt.io>2017-04-12 15:45:18 +0200
committerAlex Blasche <alexander.blasche@qt.io>2017-04-12 14:24:39 +0000
commit1bee1eb0f80ca099945e60c113d24f7fa1e0ef29 (patch)
tree7b967e5956612b2c31c6b381a80c7238ff50d0eb
parent7bd7b64679c3c6d32f6eb9cce05cc42f3a6272cb (diff)
Fix forced error warnings in -no-gui buildv5.9.0-beta2
compiling main.cpp main.cpp:361:23: error: unused parameter argc [-Werror=unused-parameter] void getAppFlags(int &argc, char **argv) ^ main.cpp:361:36: error: unused parameter argv [-Werror=unused-parameter] void getAppFlags(int &argc, char **argv) ^ main.cpp:74:12: error: exitTimerId defined but not used [-Werror=unused-variable] static int exitTimerId = -1; ^ Change-Id: I3eb7aff4ab3b5f1e89fdbf6d090107efedb376dd Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
-rw-r--r--tools/qml/main.cpp7
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 03d952ee98..9b5fcc74c2 100644
--- a/tools/qml/main.cpp
+++ b/tools/qml/main.cpp
@@ -71,7 +71,9 @@
static Config *conf = 0;
static QQmlApplicationEngine *qae = 0;
+#if defined(Q_OS_DARWIN) || defined(QT_GUI_LIB)
static int exitTimerId = -1;
+#endif
bool verboseMode = false;
static void loadConf(const QString &override, bool quiet) // Terminates app on failure
@@ -388,6 +390,9 @@ void getAppFlags(int &argc, char **argv)
argc -= 2;
}
}
+#else
+ Q_UNUSED(argc)
+ Q_UNUSED(argv)
#endif // QT_GUI_LIB
}
@@ -552,7 +557,7 @@ int main(int argc, char *argv[])
qInstallMessageHandler(quietMessageHandler);
if (files.count() <= 0) {
-#if defined(Q_OS_MAC)
+#if defined(Q_OS_DARWIN)
if (applicationType == QmlApplicationTypeGui)
exitTimerId = static_cast<LoaderApplication *>(app)->startTimer(FILE_OPEN_EVENT_WAIT_TIME);
else