summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorQt Continuous Integration System <qt-info@nokia.com>2010-03-04 12:30:23 (GMT)
committerQt Continuous Integration System <qt-info@nokia.com>2010-03-04 12:30:23 (GMT)
commit30dba6b22f907ba36ed8f71568ab2489536f8f43 (patch)
tree37b73324d4871aa41b53dadd4d270f1c2764d699 /tests
parent352f9e629666b6a1743fafc42c16bb51a6ad3df9 (diff)
parentf1e39e7dea8634695263435f0bf912ce19c43195 (diff)
downloadQt-30dba6b22f907ba36ed8f71568ab2489536f8f43.zip
Qt-30dba6b22f907ba36ed8f71568ab2489536f8f43.tar.gz
Qt-30dba6b22f907ba36ed8f71568ab2489536f8f43.tar.bz2
Merge branch '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.6-integration
* '4.6' of scm.dev.nokia.troll.no:qt/oslo-staging-2: Make tablet detection work with new wacom drivers Fixed an exit crash that could occur in the GL 2 engine under X11. Fix tst_QVariant::operator_eq_eq(UserType) SqlBrowser not respecting casings. Remove vgClearPath() change to OpenVG paint engine QVariant: Fix crash when comparing two variant with the same undefined type. Fix compositing when QWS background is completely transparent. Fixes wrong composition mode for cached backgrounds in Graphics View. Support keypad input with vnc driver
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qgraphicsview/tst_qgraphicsview.cpp34
-rw-r--r--tests/auto/qvariant/tst_qvariant.cpp4
2 files changed, 38 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
index c77f76d..1c19fab 100644
--- a/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
+++ b/tests/auto/qgraphicsview/tst_qgraphicsview.cpp
@@ -219,6 +219,7 @@ private slots:
void inputMethodSensitivity();
void inputContextReset();
void indirectPainting();
+ void compositionModeInDrawBackground();
// task specific tests below me
void task172231_untransformableItems();
@@ -3825,6 +3826,39 @@ void tst_QGraphicsView::indirectPainting()
QTRY_VERIFY(scene.drawCount > 0);
}
+void tst_QGraphicsView::compositionModeInDrawBackground()
+{
+ class MyView : public QGraphicsView
+ { public:
+ MyView(QGraphicsScene *scene) : QGraphicsView(scene),
+ painted(false), compositionMode(QPainter::CompositionMode_SourceOver) {}
+ bool painted;
+ QPainter::CompositionMode compositionMode;
+ void drawBackground(QPainter *painter, const QRectF &)
+ {
+ compositionMode = painter->compositionMode();
+ painted = true;
+ }
+ };
+
+ QGraphicsScene dummy;
+ MyView view(&dummy);
+ view.show();
+ QTest::qWaitForWindowShown(&view);
+
+ // Make sure the painter's composition mode is SourceOver in drawBackground.
+ QTRY_VERIFY(view.painted);
+ QCOMPARE(view.compositionMode, QPainter::CompositionMode_SourceOver);
+
+ view.painted = false;
+ view.setCacheMode(QGraphicsView::CacheBackground);
+ view.viewport()->update();
+
+ // Make sure the painter's composition mode is SourceOver in drawBackground
+ // with background cache enabled.
+ QTRY_VERIFY(view.painted);
+ QCOMPARE(view.compositionMode, QPainter::CompositionMode_SourceOver);
+}
void tst_QGraphicsView::task253415_reconnectUpdateSceneOnSceneChanged()
{
QGraphicsView view;
diff --git a/tests/auto/qvariant/tst_qvariant.cpp b/tests/auto/qvariant/tst_qvariant.cpp
index a316dda..1fd6564 100644
--- a/tests/auto/qvariant/tst_qvariant.cpp
+++ b/tests/auto/qvariant/tst_qvariant.cpp
@@ -1968,6 +1968,10 @@ void tst_QVariant::operator_eq_eq_data()
QTest::newRow("HashSecondLarger") << QVariant(hash1) << QVariant(hash2) << false;
}
+
+ QTest::newRow( "UserType" ) << QVariant(QVariant::UserType) << QVariant(QVariant::UserType) << true;
+ QVariant mUserType(QVariant::UserType);
+ QTest::newRow( "Shared UserType" ) << mUserType << mUserType << true;
}
void tst_QVariant::operator_eq_eq()