summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorMikhail Svetkin <mikhail.svetkin@qt.io>2019-06-11 15:20:03 +0200
committerMikhail Svetkin <mikhail.svetkin@qt.io>2019-07-03 23:15:40 +0200
commitf883f8409f6867a9f16d1916bebc29f1debfaff0 (patch)
treee845ef3a24329ab78afb13848ff748b3fc38b53f /src
parentf70905448f612f52d4c3034faee61fc103b9eb7c (diff)
qtlite: Fix build with -no-feature-commandlineparser
Change-Id: Ie7b7b119073691c0d3b6358f876298fc86cfe9e9 Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qbc.io> Reviewed-by: Timo Aarnipuro <timo.aarnipuro@qt.io> Reviewed-by: Kari Oikarinen <kari.oikarinen@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qcoreapplication.cpp2
-rw-r--r--src/corelib/kernel/qcoreapplication_p.h4
-rw-r--r--src/gui/kernel/qguiapplication.cpp2
-rw-r--r--src/gui/kernel/qguiapplication_p.h2
4 files changed, 10 insertions, 0 deletions
diff --git a/src/corelib/kernel/qcoreapplication.cpp b/src/corelib/kernel/qcoreapplication.cpp
index e5b88c3c26..9d8da70e47 100644
--- a/src/corelib/kernel/qcoreapplication.cpp
+++ b/src/corelib/kernel/qcoreapplication.cpp
@@ -227,12 +227,14 @@ bool QCoreApplicationPrivate::checkInstance(const char *function)
return b;
}
+#if QT_CONFIG(commandlineparser)
void QCoreApplicationPrivate::addQtOptions(QList<QCommandLineOption> *options)
{
options->append(QCommandLineOption(QStringLiteral("qmljsdebugger"),
QStringLiteral("Activates the QML/JS debugger with a specified port. The value must be of format port:1234[,block]. \"block\" makes the application wait for a connection."),
QStringLiteral("value")));
}
+#endif
void QCoreApplicationPrivate::processCommandLineArguments()
{
diff --git a/src/corelib/kernel/qcoreapplication_p.h b/src/corelib/kernel/qcoreapplication_p.h
index 0b9029b5fe..3bad42d076 100644
--- a/src/corelib/kernel/qcoreapplication_p.h
+++ b/src/corelib/kernel/qcoreapplication_p.h
@@ -52,7 +52,9 @@
//
#include "QtCore/qcoreapplication.h"
+#if QT_CONFIG(commandlineparser)
#include "QtCore/qcommandlineoption.h"
+#endif
#include "QtCore/qtranslator.h"
#if QT_CONFIG(settings)
#include "QtCore/qsettings.h"
@@ -105,7 +107,9 @@ public:
static bool checkInstance(const char *method);
+#if QT_CONFIG(commandlineparser)
virtual void addQtOptions(QList<QCommandLineOption> *options);
+#endif
#ifndef QT_NO_QOBJECT
bool sendThroughApplicationEventFilters(QObject *, QEvent *);
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index b8bfad4f16..ceb5055a9d 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -1306,6 +1306,7 @@ static void init_plugins(const QList<QByteArray> &pluginList)
}
}
+#if QT_CONFIG(commandlineparser)
void QGuiApplicationPrivate::addQtOptions(QList<QCommandLineOption> *options)
{
QCoreApplicationPrivate::addQtOptions(options);
@@ -1357,6 +1358,7 @@ void QGuiApplicationPrivate::addQtOptions(QList<QCommandLineOption> *options)
QGuiApplication::tr("Alias for --windowtitle."), QStringLiteral("title")));
}
}
+#endif // QT_CONFIG(commandlineparser)
void QGuiApplicationPrivate::createPlatformIntegration()
{
diff --git a/src/gui/kernel/qguiapplication_p.h b/src/gui/kernel/qguiapplication_p.h
index 2ecde0354a..afca7579ea 100644
--- a/src/gui/kernel/qguiapplication_p.h
+++ b/src/gui/kernel/qguiapplication_p.h
@@ -92,7 +92,9 @@ public:
virtual void notifyLayoutDirectionChange();
virtual void notifyActiveWindowChange(QWindow *previous);
+#if QT_CONFIG(commandlineparser)
void addQtOptions(QList<QCommandLineOption> *options) override;
+#endif
virtual bool shouldQuit() override;
bool shouldQuitInternal(const QWindowList &processedWindows);