diff options
author | Sergio Ahumada <sergio.ahumada@digia.com> | 2013-10-09 15:50:11 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-10-09 15:50:11 +0200 |
commit | da0cb32b8ee7cc4a991a59420a411898e63a660e (patch) | |
tree | 9ed8e190a6543518f9b082afc5a380f659da0220 /tests/auto/gui | |
parent | 7f3e3c1099f42cff46bbd267c70587bcf72024fc (diff) | |
parent | d8fc0da235b2bd566b2b6f1e21218afdf2f34eb3 (diff) |
Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev
Diffstat (limited to 'tests/auto/gui')
-rw-r--r-- | tests/auto/gui/kernel/qguiapplication/qguiapplication.pro | 11 | ||||
-rw-r--r-- | tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp | 4 | ||||
-rw-r--r-- | tests/auto/gui/qopengl/tst_qopengl.cpp | 28 |
3 files changed, 25 insertions, 18 deletions
diff --git a/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro b/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro index a9baf29996..79acb9e5f1 100644 --- a/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro +++ b/tests/auto/gui/kernel/qguiapplication/qguiapplication.pro @@ -1,4 +1,9 @@ -CONFIG += testcase +CORE_TEST_PATH = ../../../corelib/kernel/qcoreapplication + +VPATH += $$CORE_TEST_PATH +include($${CORE_TEST_PATH}/qcoreapplication.pro) +INCLUDEPATH += $$CORE_TEST_PATH + TARGET = tst_qguiapplication -QT += core gui gui-private testlib -SOURCES = tst_qguiapplication.cpp +QT += gui gui-private +SOURCES += tst_qguiapplication.cpp diff --git a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp index 7884426d68..d4237b135f 100644 --- a/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp +++ b/tests/auto/gui/kernel/qguiapplication/tst_qguiapplication.cpp @@ -50,9 +50,11 @@ #include <QDebug> +#include "tst_qcoreapplication.h" + enum { spacing = 50, windowSize = 200 }; -class tst_QGuiApplication: public QObject +class tst_QGuiApplication: public tst_QCoreApplication { Q_OBJECT diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp index 97f3ec128d..4defbe181f 100644 --- a/tests/auto/gui/qopengl/tst_qopengl.cpp +++ b/tests/auto/gui/qopengl/tst_qopengl.cpp @@ -171,8 +171,8 @@ void tst_QOpenGL::sharedResourceCleanup() QScopedPointer<QSurface> surface(createSurface(surfaceClass)); QOpenGLContext *ctx = new QOpenGLContext; - ctx->create(); - ctx->makeCurrent(surface.data()); + QVERIFY(ctx->create()); + QVERIFY(ctx->makeCurrent(surface.data())); SharedResourceTracker tracker; SharedResource *resource = new SharedResource(&tracker); @@ -188,7 +188,7 @@ void tst_QOpenGL::sharedResourceCleanup() QOpenGLContext *ctx2 = new QOpenGLContext; ctx2->setShareContext(ctx); - ctx2->create(); + QVERIFY(ctx2->create()); delete ctx; @@ -238,7 +238,7 @@ void tst_QOpenGL::multiGroupSharedResourceCleanup() for (int i = 0; i < 10; ++i) { QOpenGLContext *gl = new QOpenGLContext(); - gl->create(); + QVERIFY(gl->create()); gl->makeCurrent(surface.data()); { // Cause QOpenGLMultiGroupSharedResource instantiation. @@ -262,8 +262,8 @@ void tst_QOpenGL::multiGroupSharedResourceCleanupCustom() QScopedPointer<QSurface> surface(createSurface(surfaceClass)); QOpenGLContext *ctx = new QOpenGLContext(); - ctx->create(); - ctx->makeCurrent(surface.data()); + QVERIFY(ctx->create()); + QVERIFY(ctx->makeCurrent(surface.data())); QOpenGLMultiGroupSharedResource multiGroupSharedResource; SharedResource *resource = multiGroupSharedResource.value<SharedResource>(ctx); @@ -401,7 +401,7 @@ void tst_QOpenGL::fboSimpleRendering() QScopedPointer<QSurface> surface(createSurface(surfaceClass)); QOpenGLContext ctx; - ctx.create(); + QVERIFY(ctx.create()); ctx.makeCurrent(surface.data()); @@ -449,7 +449,7 @@ void tst_QOpenGL::fboRendering() QScopedPointer<QSurface> surface(createSurface(surfaceClass)); QOpenGLContext ctx; - ctx.create(); + QVERIFY(ctx.create()); ctx.makeCurrent(surface.data()); @@ -493,7 +493,7 @@ void tst_QOpenGL::fboHandleNulledAfterContextDestroyed() { QOpenGLContext ctx; - ctx.create(); + QVERIFY(ctx.create()); ctx.makeCurrent(&window); @@ -523,7 +523,7 @@ void tst_QOpenGL::openGLPaintDevice() QScopedPointer<QSurface> surface(createSurface(surfaceClass)); QOpenGLContext ctx; - ctx.create(); + QVERIFY(ctx.create()); QSurfaceFormat format = ctx.format(); if (format.majorVersion() < 2) @@ -576,8 +576,8 @@ void tst_QOpenGL::aboutToBeDestroyed() QOpenGLContext *context = new QOpenGLContext; QSignalSpy spy(context, SIGNAL(aboutToBeDestroyed())); - context->create(); - context->makeCurrent(&window); + QVERIFY(context->create()); + QVERIFY(context->makeCurrent(&window)); QCOMPARE(spy.size(), 0); @@ -598,8 +598,8 @@ void tst_QOpenGL::QTBUG15621_triangulatingStrokerDivZero() window.create(); QOpenGLContext ctx; - ctx.create(); - ctx.makeCurrent(&window); + QVERIFY(ctx.create()); + QVERIFY(ctx.makeCurrent(&window)); if (!QOpenGLFramebufferObject::hasOpenGLFramebufferObjects()) QSKIP("QOpenGLFramebufferObject not supported on this platform"); |