diff options
author | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-04 03:43:47 (GMT) |
---|---|---|
committer | Qt Continuous Integration System <qt-info@nokia.com> | 2010-06-04 03:43:47 (GMT) |
commit | 1448e19b3613ab7c5498c17c619586d03ec46d18 (patch) | |
tree | a6ce8079bf05a0692c3370c7fc88887711edd7a2 /tests/auto | |
parent | 58c591974bf34577e27638f1328a04c4f7c698f8 (diff) | |
parent | a039a3a53d0a07b04e3b30ba2a73150ea5d2522a (diff) | |
download | Qt-1448e19b3613ab7c5498c17c619586d03ec46d18.zip Qt-1448e19b3613ab7c5498c17c619586d03ec46d18.tar.gz Qt-1448e19b3613ab7c5498c17c619586d03ec46d18.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2 into 4.7-integration
* '4.7' of scm.dev.nokia.troll.no:qt/oslo-staging-2:
tst_qgraphicsitem: stabilize on X11
Added OpenGL 3.3 and 4.0 recognition to QGLFormat
Fix compilation: disable -no-feature-* for bootstrapped
QString: Fix severals bugs when comparing with QStringRef
QProgressBar: make accessors const.
Changes: add patch for artificial emboldening
Added static version of QGLFramebufferObject::release().
Fix compilation on WinXP MinGW32;
Add a new qconfig feature GESTURES
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp | 1 | ||||
-rw-r--r-- | tests/auto/qstring/tst_qstring.cpp | 33 |
2 files changed, 34 insertions, 0 deletions
diff --git a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp index 5547b02..fe68c8e 100644 --- a/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp +++ b/tests/auto/qgraphicsitem/tst_qgraphicsitem.cpp @@ -7584,6 +7584,7 @@ void tst_QGraphicsItem::itemUsesExtendedStyleOption() scene.addItem(rect); rect->setPos(200, 200); QGraphicsView view(&scene); + view.setWindowFlags(Qt::X11BypassWindowManagerHint); rect->startTrack = false; view.show(); QTest::qWaitForWindowShown(&view); diff --git a/tests/auto/qstring/tst_qstring.cpp b/tests/auto/qstring/tst_qstring.cpp index 1bea4b7..c887936 100644 --- a/tests/auto/qstring/tst_qstring.cpp +++ b/tests/auto/qstring/tst_qstring.cpp @@ -207,6 +207,7 @@ private slots: void repeated() const; void repeated_data() const; void task262677remove(); + void QTBUG10404_compareRef(); }; typedef QList<int> IntList; @@ -4828,6 +4829,38 @@ void tst_QString::task262677remove() QVERIFY(driveName == QLatin1String("V:")); } +void tst_QString::QTBUG10404_compareRef() +{ + QString a = "ABCDEFGH"; + + QCOMPARE(QStringRef(&a, 1, 2).compare(QLatin1String("BC")), 0); + QVERIFY(QStringRef(&a, 1, 2).compare(QLatin1String("BCD")) < 0); + QCOMPARE(QStringRef(&a, 1, 2).compare(QLatin1String("Bc"), Qt::CaseInsensitive), 0); + QVERIFY(QStringRef(&a, 1, 2).compare(QLatin1String("bCD"), Qt::CaseInsensitive) < 0); + + QCOMPARE(QStringRef(&a, 1, 2).compare(QString::fromLatin1("BC")), 0); + QVERIFY(QStringRef(&a, 1, 2).compare(QString::fromLatin1("BCD")) < 0); + QCOMPARE(QStringRef(&a, 1, 2).compare(QString::fromLatin1("Bc"), Qt::CaseInsensitive), 0); + QVERIFY(QStringRef(&a, 1, 2).compare(QString::fromLatin1("bCD"), Qt::CaseInsensitive) < 0); + + QCOMPARE(QString::fromLatin1("BC").compare(QStringRef(&a, 1, 2)), 0); + QVERIFY(QString::fromLatin1("BCD").compare(QStringRef(&a, 1, 2)) > 0); + QCOMPARE(QString::fromLatin1("Bc").compare(QStringRef(&a, 1, 2), Qt::CaseInsensitive), 0); + QVERIFY(QString::fromLatin1("bCD").compare(QStringRef(&a, 1, 2), Qt::CaseInsensitive) > 0); + + QCOMPARE(QStringRef(&a, 1, 2).compare(QStringRef(&a, 1, 2)), 0); + QVERIFY(QStringRef(&a, 1, 2).compare(QStringRef(&a, 1, 3)) < 0); + QCOMPARE(QStringRef(&a, 1, 2).compare(QStringRef(&a, 1, 2), Qt::CaseInsensitive), 0); + QVERIFY(QStringRef(&a, 1, 2).compare(QStringRef(&a, 1, 3), Qt::CaseInsensitive) < 0); + + QString a2 = "ABCDEFGh"; + QCOMPARE(QStringRef(&a2, 1, 2).compare(QStringRef(&a, 1, 2)), 0); + QVERIFY(QStringRef(&a2, 1, 2).compare(QStringRef(&a, 1, 3)) < 0); + QCOMPARE(QStringRef(&a2, 1, 2).compare(QStringRef(&a, 1, 2), Qt::CaseInsensitive), 0); + QVERIFY(QStringRef(&a2, 1, 2).compare(QStringRef(&a, 1, 3), Qt::CaseInsensitive) < 0); +} + + QTEST_APPLESS_MAIN(tst_QString) |