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>
bb10
Mikhail Svetkin 2019-06-11 15:20:03 +02:00
parent f70905448f
commit f883f8409f
4 changed files with 10 additions and 0 deletions

View File

@ -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()
{

View File

@ -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 *);

View File

@ -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()
{

View File

@ -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);