diff options
author | Andy Nichols <andy.nichols@qt.io> | 2016-04-26 11:49:52 +0200 |
---|---|---|
committer | Andy Nichols <andy.nichols@qt.io> | 2016-05-06 19:17:28 +0000 |
commit | 928915cabe4b8efacf9766962b60f895f51b6b98 (patch) | |
tree | 708242f045390621702d3c94251cfdea7ab36ab7 /tests/auto/quick/qquickpainteditem | |
parent | 11e788c9a555694f3ec5c4839eb98c4048801bf2 (diff) |
Fix some test failures with QT_NO_OPENGL builds
Change-Id: I4154084b4a0e0709ee8cb39a856a37a611e2d537
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Diffstat (limited to 'tests/auto/quick/qquickpainteditem')
-rw-r--r-- | tests/auto/quick/qquickpainteditem/tst_qquickpainteditem.cpp | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/tests/auto/quick/qquickpainteditem/tst_qquickpainteditem.cpp b/tests/auto/quick/qquickpainteditem/tst_qquickpainteditem.cpp index 1a04526f61..44d7b40ed9 100644 --- a/tests/auto/quick/qquickpainteditem/tst_qquickpainteditem.cpp +++ b/tests/auto/quick/qquickpainteditem/tst_qquickpainteditem.cpp @@ -32,8 +32,11 @@ #include <QtQuick/qquickview.h> #include <private/qquickitem_p.h> +#ifndef QT_NO_OPENGL #include <private/qsgdefaultpainternode_p.h> - +#else +#include <private/qsgsoftwarepainternode_p.h> +#endif class tst_QQuickPaintedItem: public QObject { Q_OBJECT @@ -70,7 +73,7 @@ public: ++paintRequests; clipRect = painter->clipBoundingRect(); } - +#ifndef QT_NO_OPENGL QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) { paintNode = static_cast<QSGDefaultPainterNode *>(QQuickPaintedItem::updatePaintNode(oldNode, data)); @@ -78,6 +81,15 @@ public: } QSGDefaultPainterNode *paintNode; +#else + QSGNode *updatePaintNode(QSGNode *oldNode, UpdatePaintNodeData *data) + { + paintNode = static_cast<QSGSoftwarePainterNode *>(QQuickPaintedItem::updatePaintNode(oldNode, data)); + return paintNode; + } + + QSGSoftwarePainterNode *paintNode; +#endif int paintRequests; QRectF clipRect; }; |