diff options
Diffstat (limited to 'tests/auto/quick')
15 files changed, 55 insertions, 55 deletions
diff --git a/tests/auto/quick/examples/tst_examples.cpp b/tests/auto/quick/examples/tst_examples.cpp index 872a71011d..1ca809c05f 100644 --- a/tests/auto/quick/examples/tst_examples.cpp +++ b/tests/auto/quick/examples/tst_examples.cpp @@ -103,7 +103,7 @@ tst_examples::tst_examples() excludedFiles << "views/visualdatamodel/slideshow.qml"; #endif -#ifdef QT_NO_OPENGL +#if !QT_CONFIG(opengl) //No support for Particles excludedFiles << "examples/qml/dynamicscene/dynamicscene.qml"; excludedFiles << "examples/quick/animation/basics/color-animation.qml"; diff --git a/tests/auto/quick/nokeywords/tst_nokeywords.cpp b/tests/auto/quick/nokeywords/tst_nokeywords.cpp index 6c94b484ae..ad77743ddd 100644 --- a/tests/auto/quick/nokeywords/tst_nokeywords.cpp +++ b/tests/auto/quick/nokeywords/tst_nokeywords.cpp @@ -48,7 +48,7 @@ #include <QtQuick/private/qsgadaptationlayer_p.h> #include <QtQuick/private/qsgcontext_p.h> #include <QtQuick/private/qsgcontextplugin_p.h> -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) #include <QtQuick/private/qsgdefaultdistancefieldglyphcache_p.h> #include <QtQuick/private/qsgdefaultglyphnode_p.h> #include <QtQuick/private/qsgdefaultinternalimagenode_p.h> diff --git a/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp b/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp index 5d242fab9e..71b0160c8e 100644 --- a/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp +++ b/tests/auto/quick/qquickborderimage/tst_qquickborderimage.cpp @@ -76,7 +76,7 @@ private slots: void statusChanges_data(); void sourceSizeChanges(); void progressAndStatusChanges(); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) void borderImageMesh(); #endif @@ -583,7 +583,7 @@ void tst_qquickborderimage::progressAndStatusChanges() delete obj; } -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) void tst_qquickborderimage::borderImageMesh() { QQuickView *window = new QQuickView; diff --git a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp index b774481592..942e99018f 100644 --- a/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp +++ b/tests/auto/quick/qquickflickable/tst_qquickflickable.cpp @@ -1225,7 +1225,7 @@ void tst_qquickflickable::flickOnRelease() QTRY_VERIFY(!flickable->isMoving()); #ifdef Q_OS_MAC -# ifndef QT_NO_OPENGL +# if QT_CONFIG(opengl) QEXPECT_FAIL("", "QTBUG-26094 stopping on a full pixel doesn't work on OS X", Continue); # endif #endif diff --git a/tests/auto/quick/qquickgraphicsinfo/tst_qquickgraphicsinfo.cpp b/tests/auto/quick/qquickgraphicsinfo/tst_qquickgraphicsinfo.cpp index 256fa43d2e..650892d650 100644 --- a/tests/auto/quick/qquickgraphicsinfo/tst_qquickgraphicsinfo.cpp +++ b/tests/auto/quick/qquickgraphicsinfo/tst_qquickgraphicsinfo.cpp @@ -35,7 +35,7 @@ #include "../../shared/util.h" -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) #include <QtGui/qopenglcontext.h> #include <QtGui/qsurfaceformat.h> #endif @@ -67,7 +67,7 @@ void tst_QQuickGraphicsInfo::testProperties() QCOMPARE(obj->property("api").toInt(), expectedAPI); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) if (expectedAPI == QSGRendererInterface::OpenGL) { QCOMPARE(obj->property("shaderType").toInt(), int(QSGRendererInterface::GLSL)); QVERIFY(view.openglContext()); diff --git a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp index 78322b44a1..cc74b7e07d 100644 --- a/tests/auto/quick/qquickitem2/tst_qquickitem.cpp +++ b/tests/auto/quick/qquickitem2/tst_qquickitem.cpp @@ -3133,7 +3133,7 @@ void tst_QQuickItem::parentLoop() { QQuickView *window = new QQuickView(0); -#ifndef QT_NO_REGULAREXPRESSION +#if QT_CONFIG(regularexpression) QRegularExpression msgRegexp = QRegularExpression("QQuickItem::setParentItem: Parent QQuickItem\\(.*\\) is already part of the subtree of QQuickItem\\(.*\\)"); QTest::ignoreMessage(QtWarningMsg, msgRegexp); #endif @@ -3304,7 +3304,7 @@ void tst_QQuickItem::grab() QVERIFY(root); QQuickItem *item = root->findChild<QQuickItem *>("myItem"); QVERIFY(item); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) { // Default size (item is 100x100) QSharedPointer<QQuickItemGrabResult> result = item->grabToImage(); QSignalSpy spy(result.data(), SIGNAL(ready())); diff --git a/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp b/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp index 2576a1b0fc..44310008d6 100644 --- a/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp +++ b/tests/auto/quick/qquickitemlayer/tst_qquickitemlayer.cpp @@ -61,7 +61,7 @@ private slots: void initTestCase() Q_DECL_OVERRIDE; void layerEnabled(); void layerSmooth(); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) void layerMipmap(); void layerEffect(); #endif @@ -105,7 +105,7 @@ tst_QQuickItemLayer::tst_QQuickItemLayer() void tst_QQuickItemLayer::initTestCase() { QQmlDataTest::initTestCase(); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) QWindow window; QOpenGLContext context; window.setSurfaceType(QWindow::OpenGLSurface); @@ -177,7 +177,7 @@ void tst_QQuickItemLayer::layerEnabled() QVERIFY(fb.pixel(0, 0) != fb.pixel(0, fb.height() - 1)); } -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) // The test draws a one pixel wide line and scales it down by more than a a factor 2 // If mipmpping works, the pixels should be gray, not white or black diff --git a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp index f22528a8a0..e1f903123b 100644 --- a/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp +++ b/tests/auto/quick/qquickmousearea/tst_qquickmousearea.cpp @@ -59,7 +59,7 @@ static bool initView(QQuickView &v, const QUrl &url, bool moveMouseOut, QByteArr const QSize size = v.size(); const QPoint offset = QPoint(size.width() / 2, size.height() / 2); v.setFramePosition(screenGeometry.center() - offset); -#ifndef QT_NO_CURSOR // Get the cursor out of the way. +#if QT_CONFIG(cursor) // Get the cursor out of the way. if (moveMouseOut) QCursor::setPos(v.geometry().topRight() + QPoint(100, 100)); #else @@ -116,7 +116,7 @@ private slots: void pressedMultipleButtons_data(); void pressedMultipleButtons(); void changeAxis(); -#ifndef QT_NO_CURSOR +#if QT_CONFIG(cursor) void cursorShape(); #endif void moveAndReleaseWithoutPress(); @@ -1692,7 +1692,7 @@ void tst_QQuickMouseArea::changeAxis() QCOMPARE(blackRect->y(), 94.0); } -#ifndef QT_NO_CURSOR +#if QT_CONFIG(cursor) void tst_QQuickMouseArea::cursorShape() { QQmlEngine engine; diff --git a/tests/auto/quick/qquickpainteditem/tst_qquickpainteditem.cpp b/tests/auto/quick/qquickpainteditem/tst_qquickpainteditem.cpp index 44d7b40ed9..1716bdeafb 100644 --- a/tests/auto/quick/qquickpainteditem/tst_qquickpainteditem.cpp +++ b/tests/auto/quick/qquickpainteditem/tst_qquickpainteditem.cpp @@ -32,7 +32,7 @@ #include <QtQuick/qquickview.h> #include <private/qquickitem_p.h> -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) #include <private/qsgdefaultpainternode_p.h> #else #include <private/qsgsoftwarepainternode_p.h> @@ -73,7 +73,7 @@ public: ++paintRequests; clipRect = painter->clipBoundingRect(); } -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) { paintNode = static_cast<QSGDefaultPainterNode *>(QQuickPaintedItem::updatePaintNode(oldNode, data)); diff --git a/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp b/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp index 80c6c9e553..e854a109a1 100644 --- a/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp +++ b/tests/auto/quick/qquickpixmapcache/tst_qquickpixmapcache.cpp @@ -35,7 +35,7 @@ #include "testhttpserver.h" #include <QtNetwork/QNetworkConfigurationManager> -#ifndef QT_NO_CONCURRENT +#if QT_CONFIG(concurrent) #include <qtconcurrentrun.h> #include <qfuture.h> #endif @@ -57,7 +57,7 @@ private slots: void massive(); void cancelcrash(); void shrinkcache(); -#ifndef QT_NO_CONCURRENT +#if QT_CONFIG(concurrent) void networkCrash(); #endif void lockingCrash(); @@ -105,7 +105,7 @@ void tst_qquickpixmapcache::initTestCase() QVERIFY2(server.listen(), qPrintable(server.errorString())); -#ifndef QT_NO_BEARERMANAGEMENT +#if QT_CONFIG(bearermanagement) // This avoids a race condition/deadlock bug in network config // manager when it is accessed by the HTTP server thread before // anything else. Bug report can be found at: @@ -372,7 +372,7 @@ void tst_qquickpixmapcache::shrinkcache() } } -#ifndef QT_NO_CONCURRENT +#if QT_CONFIG(concurrent) void createNetworkServer(TestHTTPServer *server) { @@ -382,7 +382,7 @@ void createNetworkServer(TestHTTPServer *server) eventLoop.exec(); } -#ifndef QT_NO_CONCURRENT +#if QT_CONFIG(concurrent) // QT-3957 void tst_qquickpixmapcache::networkCrash() { diff --git a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp index 5d30cc8c94..765523316f 100644 --- a/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp +++ b/tests/auto/quick/qquicktextedit/tst_qquicktextedit.cpp @@ -143,7 +143,7 @@ private slots: void cursorDelegateHeight(); void navigation(); void readOnly(); -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void copyAndPaste(); void canPaste(); void canPasteEmpty(); @@ -153,7 +153,7 @@ private slots: void inputMethodUpdate(); void openInputPanel(); void geometrySignals(); -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void pastingRichText_QTBUG_14003(); #endif void implicitSize_data(); @@ -2924,7 +2924,7 @@ void tst_qquicktextedit::navigation() QCOMPARE(input->hasActiveFocus(), false); } -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void tst_qquicktextedit::copyAndPaste() { if (!PlatformQuirks::isClipboardAvailable()) @@ -3001,7 +3001,7 @@ void tst_qquicktextedit::copyAndPaste() } #endif -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void tst_qquicktextedit::canPaste() { QGuiApplication::clipboard()->setText("Some text"); @@ -3019,7 +3019,7 @@ void tst_qquicktextedit::canPaste() } #endif -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void tst_qquicktextedit::canPasteEmpty() { QGuiApplication::clipboard()->clear(); @@ -3037,7 +3037,7 @@ void tst_qquicktextedit::canPasteEmpty() } #endif -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void tst_qquicktextedit::middleClickPaste() { if (!PlatformQuirks::isClipboardAvailable()) @@ -3339,7 +3339,7 @@ void tst_qquicktextedit::geometrySignals() delete o; } -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void tst_qquicktextedit::pastingRichText_QTBUG_14003() { QString componentStr = "import QtQuick 2.0\nTextEdit { textFormat: TextEdit.PlainText }"; diff --git a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp index 8dc3053d89..1451f8e2fc 100644 --- a/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp +++ b/tests/auto/quick/qquicktextinput/tst_qquicktextinput.cpp @@ -145,7 +145,7 @@ private slots: void cursorRectangle(); void navigation(); void navigation_RTL(); -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void copyAndPaste(); void copyAndPasteKeySequence(); void canPasteEmpty(); @@ -2532,7 +2532,7 @@ void tst_qquicktextinput::navigation_RTL() QVERIFY(input->hasActiveFocus()); } -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void tst_qquicktextinput::copyAndPaste() { if (!PlatformQuirks::isClipboardAvailable()) @@ -2630,7 +2630,7 @@ void tst_qquicktextinput::copyAndPaste() } #endif -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void tst_qquicktextinput::copyAndPasteKeySequence() { if (!PlatformQuirks::isClipboardAvailable()) @@ -2698,7 +2698,7 @@ void tst_qquicktextinput::copyAndPasteKeySequence() } #endif -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void tst_qquicktextinput::canPasteEmpty() { QGuiApplication::clipboard()->clear(); @@ -2714,7 +2714,7 @@ void tst_qquicktextinput::canPasteEmpty() } #endif -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void tst_qquicktextinput::canPaste() { QGuiApplication::clipboard()->setText("Some text"); @@ -2730,7 +2730,7 @@ void tst_qquicktextinput::canPaste() } #endif -#ifndef QT_NO_CLIPBOARD +#if QT_CONFIG(clipboard) void tst_qquicktextinput::middleClickPaste() { if (!PlatformQuirks::isClipboardAvailable()) @@ -3052,7 +3052,7 @@ void tst_qquicktextinput::cursorRectangle_data() << false; } -#ifndef QT_NO_IM +#if QT_CONFIG(im) #define COMPARE_INPUT_METHOD_QUERY(type, input, property, method, result) \ QCOMPARE((type) input->inputMethodQuery(property).method(), result); #else diff --git a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp index acccac8eca..8d021d92da 100644 --- a/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp +++ b/tests/auto/quick/qquickwindow/tst_qquickwindow.cpp @@ -284,7 +284,7 @@ public: private slots: void cleanup(); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) void openglContextCreatedSignal(); #endif void aboutToStopSignal(); @@ -350,7 +350,7 @@ private slots: void qobjectEventFilter_key(); void qobjectEventFilter_mouse(); -#ifndef QT_NO_CURSOR +#if QT_CONFIG(cursor) void cursor(); #endif @@ -373,14 +373,14 @@ private: QTouchDevice *touchDevice; QTouchDevice *touchDeviceWithVelocity; }; -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) Q_DECLARE_METATYPE(QOpenGLContext *); #endif void tst_qquickwindow::cleanup() { QVERIFY(QGuiApplication::topLevelWindows().isEmpty()); } -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) void tst_qquickwindow::openglContextCreatedSignal() { qRegisterMetaType<QOpenGLContext *>(); @@ -1327,7 +1327,7 @@ void tst_qquickwindow::headless() if (isGL) QVERIFY(!window->isSceneGraphInitialized()); } -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) if (QGuiApplication::platformName() == QLatin1String("windows") && QOpenGLContext::openGLModuleType() == QOpenGLContext::LibGLES) { QSKIP("Crashes on Windows/ANGLE, QTBUG-42967"); @@ -1515,7 +1515,7 @@ void tst_qquickwindow::ownershipRootItem() QVERIFY(!accessor->isRootItemDestroyed()); } -#ifndef QT_NO_CURSOR +#if QT_CONFIG(cursor) void tst_qquickwindow::cursor() { QQuickWindow window; @@ -1688,7 +1688,7 @@ void tst_qquickwindow::hideThenDelete() QTest::qWaitForWindowExposed(&window); const bool threaded = QQuickWindowPrivate::get(&window)->context->thread() != QGuiApplication::instance()->thread(); const bool isGL = window.rendererInterface()->graphicsApi() == QSGRendererInterface::OpenGL; -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) if (isGL) openglDestroyed = new QSignalSpy(window.openglContext(), SIGNAL(aboutToBeDestroyed())); #endif @@ -1717,7 +1717,7 @@ void tst_qquickwindow::hideThenDelete() } QVERIFY(sgInvalidated->size() > 0); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) if (openglDestroyed) QVERIFY(openglDestroyed->size() > 0); #endif @@ -2128,7 +2128,7 @@ void tst_qquickwindow::defaultSurfaceFormat() QCOMPARE(format.profile(), reqFmt.profile()); QCOMPARE(int(format.options()), int(reqFmt.options())); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) // Depth and stencil should be >= what has been requested. For real. But use // the context since the window's surface format is only partially updated // on most platforms. @@ -2183,7 +2183,7 @@ public: } static int deleted; }; -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) class GlRenderJob : public QRunnable { public: @@ -2254,7 +2254,7 @@ void tst_qquickwindow::testRenderJob() QTRY_COMPARE(RenderJob::deleted, 1); QCOMPARE(completedJobs.size(), 1); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) if (window.rendererInterface()->graphicsApi() == QSGRendererInterface::OpenGL) { // Do a synchronized GL job. GLubyte readPixel[4] = {0, 0, 0, 0}; diff --git a/tests/auto/quick/scenegraph/tst_scenegraph.cpp b/tests/auto/quick/scenegraph/tst_scenegraph.cpp index f6d624d871..2cd3a041c8 100644 --- a/tests/auto/quick/scenegraph/tst_scenegraph.cpp +++ b/tests/auto/quick/scenegraph/tst_scenegraph.cpp @@ -28,7 +28,7 @@ #include <qtest.h> -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) #include <QOffscreenSurface> #include <QOpenGLContext> #include <QOpenGLFunctions> @@ -37,7 +37,7 @@ #include <QtQuick> #include <QtQml> -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) #include <private/qopenglcontext_p.h> #endif @@ -105,7 +105,7 @@ private slots: void render_data(); void render(); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) void hideWithOtherContext(); #endif void createTextureFromImage_data(); @@ -130,7 +130,7 @@ void tst_SceneGraph::initTestCase() QSGRenderLoop *loop = QSGRenderLoop::instance(); qDebug() << "RenderLoop: " << loop; -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) QOpenGLContext context; context.setFormat(loop->sceneGraphContext()->defaultSurfaceFormat()); context.create(); @@ -222,7 +222,7 @@ void tst_SceneGraph::manyWindows_data() QTest::newRow("rects,subwindow,sharing") << QStringLiteral("manyWindows_rects.qml") << false << true; } -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) struct ShareContextResetter { public: ~ShareContextResetter() { qt_gl_set_global_share_context(0); } @@ -234,7 +234,7 @@ void tst_SceneGraph::manyWindows() QFETCH(QString, file); QFETCH(bool, toplevel); QFETCH(bool, shared); -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) QOpenGLContext sharedGLContext; ShareContextResetter cleanup; // To avoid dangling pointer in case of test-failure. if (shared) { @@ -479,7 +479,7 @@ void tst_SceneGraph::render() } } -#ifndef QT_NO_OPENGL +#if QT_CONFIG(opengl) // Testcase for QTBUG-34898. We make another context current on another surface // in the GUI thread and hide the QQuickWindow while the other context is // current on the other window. diff --git a/tests/auto/quick/shared/viewtestutil.cpp b/tests/auto/quick/shared/viewtestutil.cpp index ab58aee648..cb2b8be97a 100644 --- a/tests/auto/quick/shared/viewtestutil.cpp +++ b/tests/auto/quick/shared/viewtestutil.cpp @@ -61,7 +61,7 @@ void QQuickViewTestUtil::centerOnScreen(QQuickView *window) void QQuickViewTestUtil::moveMouseAway(QQuickView *window) { -#ifndef QT_NO_CURSOR // Get the cursor out of the way. +#if QT_CONFIG(cursor) // Get the cursor out of the way. QCursor::setPos(window->geometry().topRight() + QPoint(100, 100)); #else Q_UNUSED(window) |