diff options
author | Liang Qi <liang.qi@qt.io> | 2016-12-14 19:01:23 +0100 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2016-12-14 19:01:23 +0100 |
commit | 0e80d28aa5892d6bbb4d0017b1bc9a33489f4176 (patch) | |
tree | 0db2e10c8776d172bccaeaa7ee1fab3934b93073 /tools | |
parent | ed32558d6280cae40578f735fd326327d571d993 (diff) | |
parent | 16c81bb0d493af00bc376784bcb7e03a4a037b04 (diff) |
Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
src/plugins/qmltooling/qmldbg_debugger/qv4debugjob.cpp
src/plugins/qmltooling/qmldbg_inspector/globalinspector.cpp
src/plugins/qmltooling/qmldbg_nativedebugger/qqmlnativedebugservice.cpp
src/qml/qml/qqmlimport.cpp
src/quick/items/context2d/qquickcontext2dtexture_p.h
tools/qmleasing/splineeditor.h
Change-Id: I8f6630fcac243824350986c8e9f4bd6483bf20b5
Diffstat (limited to 'tools')
-rw-r--r-- | tools/qml/main.cpp | 10 | ||||
-rw-r--r-- | tools/qmleasing/splineeditor.cpp | 4 | ||||
-rw-r--r-- | tools/qmleasing/splineeditor.h | 4 | ||||
-rw-r--r-- | tools/qmlplugindump/main.cpp | 11 | ||||
-rw-r--r-- | tools/qmlscene/main.cpp | 16 |
5 files changed, 24 insertions, 21 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp index e185fc41a9..5e8b872821 100644 --- a/tools/qml/main.cpp +++ b/tools/qml/main.cpp @@ -215,7 +215,7 @@ public Q_SLOTS: returnCode = retCode; } -#if defined(QT_GUI_LIB) && !defined(QT_NO_OPENGL) +#if defined(QT_GUI_LIB) && QT_CONFIG(opengl) void onOpenGlContextCreated(QOpenGLContext *context); #endif }; @@ -237,7 +237,7 @@ void LoadWatcher::contain(QObject *o, const QUrl &containPath) void LoadWatcher::checkForWindow(QObject *o) { -#if defined(QT_GUI_LIB) && !defined(QT_NO_OPENGL) +#if defined(QT_GUI_LIB) && QT_CONFIG(opengl) if (verboseMode && o->isWindowType() && o->inherits("QQuickWindow")) { connect(o, SIGNAL(openglContextCreated(QOpenGLContext*)), this, SLOT(onOpenGlContextCreated(QOpenGLContext*))); @@ -247,7 +247,7 @@ void LoadWatcher::checkForWindow(QObject *o) #endif // QT_GUI_LIB && !QT_NO_OPENGL } -#if defined(QT_GUI_LIB) && !defined(QT_NO_OPENGL) +#if defined(QT_GUI_LIB) && QT_CONFIG(opengl) void LoadWatcher::onOpenGlContextCreated(QOpenGLContext *context) { context->makeCurrent(qobject_cast<QWindow *>(sender())); @@ -524,7 +524,7 @@ int main(int argc, char *argv[]) if (quietMode && verboseMode) verboseMode = false; -#ifndef QT_NO_TRANSLATION +#if QT_CONFIG(translation) //qt_ translations loaded by QQmlApplicationEngine QString sysLocale = QLocale::system().name(); @@ -569,7 +569,7 @@ int main(int argc, char *argv[]) for (const QString &path : qAsConst(files)) { //QUrl::fromUserInput doesn't treat no scheme as relative file paths -#ifndef QT_NO_REGULAREXPRESSION +#if QT_CONFIG(regularexpression) QRegularExpression urlRe("[[:word:]]+://.*"); if (urlRe.match(path).hasMatch()) { //Treat as a URL QUrl url = QUrl::fromUserInput(path); diff --git a/tools/qmleasing/splineeditor.cpp b/tools/qmleasing/splineeditor.cpp index d54a101b69..cd0c0b3ae0 100644 --- a/tools/qmleasing/splineeditor.cpp +++ b/tools/qmleasing/splineeditor.cpp @@ -224,7 +224,7 @@ void SplineEditor::mouseReleaseEvent(QMouseEvent *e) } } -#ifndef QT_NO_CONTEXTMENU +#if QT_CONFIG(contextmenu) void SplineEditor::contextMenuEvent(QContextMenuEvent *e) { int index = findControlPoint(e->pos()); @@ -244,7 +244,7 @@ void SplineEditor::contextMenuEvent(QContextMenuEvent *e) addPoint(e->pos()); } } -#endif // QT_NO_CONTEXTMENU +#endif // contextmenu void SplineEditor::invalidate() { diff --git a/tools/qmleasing/splineeditor.h b/tools/qmleasing/splineeditor.h index f21713d6a7..8dd47c3a89 100644 --- a/tools/qmleasing/splineeditor.h +++ b/tools/qmleasing/splineeditor.h @@ -79,9 +79,9 @@ protected: void mousePressEvent(QMouseEvent *) override; void mouseMoveEvent(QMouseEvent *) override; void mouseReleaseEvent(QMouseEvent *) override; -#ifndef QT_NO_CONTEXTMENU +#if QT_CONFIG(contextmenu) void contextMenuEvent(QContextMenuEvent *) override; -#endif // QT_NO_CONTEXTMENU +#endif // contextmenu void invalidate(); void invalidateSmoothList(); diff --git a/tools/qmlplugindump/main.cpp b/tools/qmlplugindump/main.cpp index 88660e46bb..92a8465d9f 100644 --- a/tools/qmlplugindump/main.cpp +++ b/tools/qmlplugindump/main.cpp @@ -72,11 +72,12 @@ #include <qt_windows.h> #endif +namespace { -static const uint qtQmlMajorVersion = 2; -static const uint qtQmlMinorVersion = 2; -static const uint qtQuickMajorVersion = 2; -static const uint qtQuickMinorVersion = 8; +const uint qtQmlMajorVersion = 2; +const uint qtQmlMinorVersion = 2; +const uint qtQuickMajorVersion = 2; +const uint qtQuickMinorVersion = 8; const QString qtQuickQualifiedName = QString::fromLatin1("QtQuick %1.%2") .arg(qtQuickMajorVersion) @@ -89,6 +90,8 @@ bool creatable = true; QString currentProperty; QString inObjectInstantiation; +} + static QString enquote(const QString &string) { QString s = string; diff --git a/tools/qmlscene/main.cpp b/tools/qmlscene/main.cpp index db0af1d071..1e8d91a95b 100644 --- a/tools/qmlscene/main.cpp +++ b/tools/qmlscene/main.cpp @@ -289,7 +289,7 @@ static bool checkVersion(const QUrl &url) static void displayFileDialog(Options *options) { -#if defined(QT_WIDGETS_LIB) && !defined(QT_NO_FILEDIALOG) +#if defined(QT_WIDGETS_LIB) && QT_CONFIG(filedialog) QString fileName = QFileDialog::getOpenFileName(0, "Open QML file", QString(), "QML Files (*.qml)"); if (!fileName.isEmpty()) { QFileInfo fi(fileName); @@ -301,7 +301,7 @@ static void displayFileDialog(Options *options) #endif } -#ifndef QT_NO_TRANSLATION +#if QT_CONFIG(translation) static void loadTranslationFile(QTranslator &translator, const QString& directory) { translator.load(QLatin1String("qml_" )+QLocale::system().name(), directory + QLatin1String("/i18n")); @@ -361,7 +361,7 @@ static void usage() puts(" "); exit(1); } -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) // Listen on GL context creation of the QQuickWindow in order to print diagnostic output. class DiagnosticGlContextCreationListener : public QObject { Q_OBJECT @@ -405,7 +405,7 @@ static void setWindowTitle(bool verbose, const QObject *topLevel, QWindow *windo if (verbose) { newTitle += QLatin1String(" [Qt ") + QLatin1String(QT_VERSION_STR) + QLatin1Char(' ') + QGuiApplication::platformName() + QLatin1Char(' '); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) newTitle += QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGL ? QLatin1String("GL") : QLatin1String("GLES"); #endif @@ -509,7 +509,7 @@ int main(int argc, char ** argv) } } -#ifndef QT_NO_TRANSLATION +#if QT_CONFIG(translation) QTranslator translator; QTranslator qtTranslator; QString sysLocale = QLocale::system().name(); @@ -545,7 +545,7 @@ int main(int argc, char ** argv) if (!options.url.isEmpty()) { if (!options.versionDetection || checkVersion(options.url)) { -#ifndef QT_NO_TRANSLATION +#if QT_CONFIG(translation) QTranslator translator; #endif @@ -559,7 +559,7 @@ int main(int argc, char ** argv) engine.addPluginPath(pluginPaths.at(i)); if (options.url.isLocalFile()) { QFileInfo fi(options.url.toLocalFile()); -#ifndef QT_NO_TRANSLATION +#if QT_CONFIG(translation) loadTranslationFile(translator, fi.path()); #endif loadDummyDataFiles(engine, fi.path()); @@ -598,7 +598,7 @@ int main(int argc, char ** argv) if (window) { setWindowTitle(options.verbose, topLevel, window.data()); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) if (options.verbose) new DiagnosticGlContextCreationListener(window.data()); #endif |