aboutsummaryrefslogtreecommitdiffstats
path: root/tools/qml
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@qt.io>2016-11-16 14:22:36 +0100
committerSimon Hausmann <simon.hausmann@qt.io>2016-11-29 10:10:27 +0000
commite579076bb36e6594003b2ade7f3d062944ef6f47 (patch)
tree1c00c8a02c638582d342504f3bebd45dbcd46be1 /tools/qml
parent4e1463c20aa6ec52f23e1e5f6426b68edb2255f0 (diff)
Get rid of most QT_NO_FOO usages
Instead use QT_CONFIG(foo). This change actually detected a few mis-spelled macros and invalid usages. Change-Id: I06ac327098dd1a458e6bc379d637b8e2dac52f85 Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Diffstat (limited to 'tools/qml')
-rw-r--r--tools/qml/main.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tools/qml/main.cpp b/tools/qml/main.cpp
index 071908e78e..31fd9b383f 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);