summaryrefslogtreecommitdiffstats
path: root/tests/auto/gui/qopengl/tst_qopengl.cpp
diff options
context:
space:
mode:
authorJani Heikkinen <jani.heikkinen@theqtcompany.com>2016-01-21 04:27:06 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2016-01-21 04:27:06 +0000
commit7b2fb038ae4b8b9231ae989ad309b6eca107a858 (patch)
tree04001416e9589b7e79a6a5b1490e7eaabc22e82a /tests/auto/gui/qopengl/tst_qopengl.cpp
parent9c0de96454570aec3fe88ba6b5d7c61b666b5753 (diff)
parent8f569c740a91b98365dcdaee2444038ce4957a76 (diff)
Merge "Merge remote-tracking branch 'origin/5.5' into 5.6" into refs/staging/5.6
Diffstat (limited to 'tests/auto/gui/qopengl/tst_qopengl.cpp')
-rw-r--r--tests/auto/gui/qopengl/tst_qopengl.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/tests/auto/gui/qopengl/tst_qopengl.cpp b/tests/auto/gui/qopengl/tst_qopengl.cpp
index 8103f27911..e2ad502a52 100644
--- a/tests/auto/gui/qopengl/tst_qopengl.cpp
+++ b/tests/auto/gui/qopengl/tst_qopengl.cpp
@@ -39,6 +39,7 @@
#include <QtGui/QOpenGLVertexArrayObject>
#include <QtGui/QOpenGLBuffer>
#include <QtGui/QOpenGLPaintDevice>
+#include <QtGui/QOpenGLTexture>
#include <QtGui/QPainter>
#include <QtGui/QScreen>
#include <QtGui/QWindow>
@@ -99,8 +100,8 @@ private slots:
void textureblitterFullTargetRectTransform();
void textureblitterPartTargetRectTransform();
void defaultSurfaceFormat();
-
void imageFormatPainting();
+ void nullTextureInitializtion();
#ifdef USE_GLX
void glxContextWrap();
@@ -1524,6 +1525,18 @@ void tst_QOpenGL::bufferMapRange()
ctx->doneCurrent();
}
+void tst_QOpenGL::nullTextureInitializtion()
+{
+ QScopedPointer<QSurface> surface(createSurface(QSurface::Window));
+ QOpenGLContext ctx;
+ ctx.create();
+ ctx.makeCurrent(surface.data());
+
+ QImage i;
+ QOpenGLTexture t(i);
+ QVERIFY(!t.isCreated());
+}
+
QTEST_MAIN(tst_QOpenGL)
#include "tst_qopengl.moc"