diff options
author | Alan Alpert <alan.alpert@nokia.com> | 2010-04-19 12:36:42 (GMT) |
---|---|---|
committer | Alan Alpert <alan.alpert@nokia.com> | 2010-04-19 12:36:42 (GMT) |
commit | 096c7d37ec67a4db7b812debed5f51737ec38900 (patch) | |
tree | 9276b3b8d92d6b935da1b63dac352a8d96c70e58 /tests/auto | |
parent | 813f10c861d14a9c2af2832f597bc3987756221d (diff) | |
parent | 4676dd62871da2b58452ebda477a04c25158bec4 (diff) | |
download | Qt-096c7d37ec67a4db7b812debed5f51737ec38900.zip Qt-096c7d37ec67a4db7b812debed5f51737ec38900.tar.gz Qt-096c7d37ec67a4db7b812debed5f51737ec38900.tar.bz2 |
Merge branch '4.7' of scm.dev.nokia.troll.no:qt/qt into 4.7
Conflicts:
doc/src/template/style/style.css
tools/qdoc3/htmlgenerator.cpp
Diffstat (limited to 'tests/auto')
-rw-r--r-- | tests/auto/bic/tst_bic.cpp | 3 | ||||
-rw-r--r-- | tests/auto/macgui/tst_macgui.cpp | 27 | ||||
-rw-r--r-- | tests/auto/macnativeevents/tst_macnativeevents.cpp | 24 | ||||
-rw-r--r-- | tests/auto/qfileinfo/tst_qfileinfo.cpp | 2 | ||||
-rw-r--r-- | tests/auto/qlocale/tst_qlocale.cpp | 6 | ||||
-rw-r--r-- | tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro | 2 | ||||
-rw-r--r-- | tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp | 15 | ||||
-rw-r--r-- | tests/auto/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro | 2 | ||||
-rw-r--r-- | tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp | 13 | ||||
-rw-r--r-- | tests/auto/qnetworksession/lackey/main.cpp | 7 | ||||
-rw-r--r-- | tests/auto/qnetworksession/test/test.pro | 2 | ||||
-rw-r--r-- | tests/auto/qnetworksession/test/tst_qnetworksession.cpp | 32 | ||||
-rw-r--r-- | tests/auto/qthread/tst_qthread.cpp | 32 | ||||
-rw-r--r-- | tests/auto/qwidget/tst_qwidget.cpp | 3 | ||||
-rw-r--r-- | tests/auto/qwindowsurface/tst_qwindowsurface.cpp | 48 |
15 files changed, 145 insertions, 73 deletions
diff --git a/tests/auto/bic/tst_bic.cpp b/tests/auto/bic/tst_bic.cpp index 2349afa..28129c5 100644 --- a/tests/auto/bic/tst_bic.cpp +++ b/tests/auto/bic/tst_bic.cpp @@ -239,6 +239,9 @@ QBic::Info tst_Bic::getCurrentInfo(const QString &libName) QStringList args; args << "-c" << "-I" + qtDir + "/include" +#ifdef Q_OS_MAC + << "-arch" << "i386" // Always use 32-bit data on Mac. +#endif #ifndef Q_OS_WIN << "-I/usr/X11R6/include/" #endif diff --git a/tests/auto/macgui/tst_macgui.cpp b/tests/auto/macgui/tst_macgui.cpp index 847ba4b..7f558a3 100644 --- a/tests/auto/macgui/tst_macgui.cpp +++ b/tests/auto/macgui/tst_macgui.cpp @@ -60,7 +60,6 @@ private slots: void dummy(); void splashScreenModality(); - void dialogModality(); void nonModalOrder(); void spinBoxArrowButtons(); @@ -157,32 +156,6 @@ void tst_MacGui::splashScreenModality() QVERIFY(QTestEventLoop::instance().timeout() == false); } - -/* - Test that a non-modal dialog created as a child of a modal dialog is - shown in front. -*/ -void tst_MacGui::dialogModality() -{ - QDialog d; - d.setModal(true); - d.show(); - - QProgressDialog progress(&d); - progress.setValue(2); - - InterfaceChildPair interface = wn.find(QAccessible::Name, "Cancel", &progress); - QVERIFY(interface.iface); - const int delay = 2000; - clickLater(interface, Qt::LeftButton, delay); - - connect(&progress, SIGNAL(canceled()), SLOT(exitLoopSlot())); - - const int timeout = 3; - QTestEventLoop::instance().enterLoop(timeout); - QVERIFY(QTestEventLoop::instance().timeout() == false); -} - class PrimaryWindowDialog : public QDialog { Q_OBJECT diff --git a/tests/auto/macnativeevents/tst_macnativeevents.cpp b/tests/auto/macnativeevents/tst_macnativeevents.cpp index 08ab9e6..70a14f5 100644 --- a/tests/auto/macnativeevents/tst_macnativeevents.cpp +++ b/tests/auto/macnativeevents/tst_macnativeevents.cpp @@ -41,6 +41,7 @@ #include <QApplication> #include <QWidget> +#include <QDialog> #include <QPushButton> #include <QtTest/QtTest> @@ -65,6 +66,7 @@ private slots: void testMouseDragToNonClientArea(); void testDragWindow(); void testMouseEnter(); + void testChildDialogInFrontOfModalParent(); }; void tst_MacNativeEvents::testMouseMoveLocation() @@ -282,6 +284,28 @@ void tst_MacNativeEvents::testMouseEnter() QVERIFY2(expected.waitForAllEvents(), "the test did not receive all expected events!"); } +void tst_MacNativeEvents::testChildDialogInFrontOfModalParent() +{ + // Test that a child dialog of a modal parent dialog is + // in front of the parent, and active: + QDialog parent; + parent.setWindowModality(Qt::ApplicationModal); + QDialog child(&parent); + QPushButton button("close", &child); + connect(&button, SIGNAL(clicked()), &child, SLOT(close())); + parent.show(); + child.show(); + QPoint inside = button.mapToGlobal(button.geometry().center()); + + // Post a click on the button to close the child dialog: + NativeEventList native; + native.append(new QNativeMouseButtonEvent(inside, Qt::LeftButton, 1, Qt::NoModifier)); + native.append(new QNativeMouseButtonEvent(inside, Qt::LeftButton, 0, Qt::NoModifier)); + + native.play(); + QTest::qWait(100); + QVERIFY(!child.isVisible()); +} #include "tst_macnativeevents.moc" diff --git a/tests/auto/qfileinfo/tst_qfileinfo.cpp b/tests/auto/qfileinfo/tst_qfileinfo.cpp index da5c772..403c5f9 100644 --- a/tests/auto/qfileinfo/tst_qfileinfo.cpp +++ b/tests/auto/qfileinfo/tst_qfileinfo.cpp @@ -1189,7 +1189,7 @@ void tst_QFileInfo::isLocalFs() void tst_QFileInfo::refresh() { -#if defined(Q_OS_WINCE) +#if defined(Q_OS_WINCE) || defined(Q_OS_WIN) int sleepTime = 3000; #else int sleepTime = 2000; diff --git a/tests/auto/qlocale/tst_qlocale.cpp b/tests/auto/qlocale/tst_qlocale.cpp index 182f73b..7a5d8a6 100644 --- a/tests/auto/qlocale/tst_qlocale.cpp +++ b/tests/auto/qlocale/tst_qlocale.cpp @@ -1921,7 +1921,7 @@ void tst_QLocale::dateFormat() const QLocale no("no_NO"); QCOMPARE(no.dateFormat(QLocale::NarrowFormat), QLatin1String("dd.MM.yy")); QCOMPARE(no.dateFormat(QLocale::ShortFormat), QLatin1String("dd.MM.yy")); - QCOMPARE(no.dateFormat(QLocale::LongFormat), QLatin1String("dddd d. MMMM y")); + QCOMPARE(no.dateFormat(QLocale::LongFormat), QLatin1String("dddd d. MMMM yyyy")); } void tst_QLocale::timeFormat() @@ -1933,7 +1933,7 @@ void tst_QLocale::timeFormat() const QLocale no("no_NO"); QCOMPARE(no.timeFormat(QLocale::NarrowFormat), QLatin1String("HH:mm")); QCOMPARE(no.timeFormat(QLocale::ShortFormat), QLatin1String("HH:mm")); - QCOMPARE(no.timeFormat(QLocale::LongFormat), QLatin1String("'kl'. HH:mm:ss tttt")); + QCOMPARE(no.timeFormat(QLocale::LongFormat), QLatin1String("'kl'. HH:mm:ss t")); } void tst_QLocale::dateTimeFormat() @@ -1945,7 +1945,7 @@ void tst_QLocale::dateTimeFormat() const QLocale no("no_NO"); QCOMPARE(no.dateTimeFormat(QLocale::NarrowFormat), QLatin1String("dd.MM.yy HH:mm")); QCOMPARE(no.dateTimeFormat(QLocale::ShortFormat), QLatin1String("dd.MM.yy HH:mm")); - QCOMPARE(no.dateTimeFormat(QLocale::LongFormat), QLatin1String("dddd d. MMMM y 'kl'. HH:mm:ss tttt")); + QCOMPARE(no.dateTimeFormat(QLocale::LongFormat), QLatin1String("dddd d. MMMM yyyy 'kl'. HH:mm:ss t")); } void tst_QLocale::monthName() diff --git a/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro b/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro index df2d2d9..ca463bd 100644 --- a/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro +++ b/tests/auto/qnetworkconfiguration/qnetworkconfiguration.pro @@ -8,7 +8,7 @@ symbian { TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData } -maemo6 { +maemo6|maemo5 { CONFIG += link_pkgconfig PKGCONFIG += conninet diff --git a/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp b/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp index 70f4447..ce3acb7 100644 --- a/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp +++ b/tests/auto/qnetworkconfiguration/tst_qnetworkconfiguration.cpp @@ -1,6 +1,6 @@ /**************************************************************************** ** -** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies). +** Copyright (C) 2010 Nokia Corporation and/or its subsidiary(-ies). ** All rights reserved. ** Contact: Nokia Corporation (qt-info@nokia.com) ** @@ -41,10 +41,11 @@ #include <QtTest/QtTest> #include "../qbearertestcommon.h" -#include "qnetworkconfiguration.h" -#include "qnetworkconfigmanager.h" -#ifdef Q_WS_MAEMO_6 +#include <QtNetwork/qnetworkconfiguration.h> +#include <QtNetwork/qnetworkconfigmanager.h> + +#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5) #include <stdio.h> #include <iapconf.h> #endif @@ -65,7 +66,7 @@ private slots: void isRoamingAvailable(); private: -#ifdef Q_WS_MAEMO_6 +#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5) Maemo::IAPConf *iapconf; Maemo::IAPConf *iapconf2; Maemo::IAPConf *gprsiap; @@ -77,7 +78,7 @@ private: void tst_QNetworkConfiguration::initTestCase() { -#ifdef Q_WS_MAEMO_6 +#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5) iapconf = new Maemo::IAPConf("007"); iapconf->setValue("ipv4_type", "AUTO"); iapconf->setValue("wlan_wepkey1", "connt"); @@ -150,7 +151,7 @@ void tst_QNetworkConfiguration::initTestCase() void tst_QNetworkConfiguration::cleanupTestCase() { -#ifdef Q_WS_MAEMO_6 +#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5) iapconf->clear(); delete iapconf; iapconf2->clear(); diff --git a/tests/auto/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro b/tests/auto/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro index e0028e5..d9c1d6b 100644 --- a/tests/auto/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro +++ b/tests/auto/qnetworkconfigurationmanager/qnetworkconfigurationmanager.pro @@ -8,7 +8,7 @@ symbian { TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData } -maemo6 { +maemo6|maemo5 { CONFIG += link_pkgconfig PKGCONFIG += conninet diff --git a/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp b/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp index 30c5a74..7cc527c 100644 --- a/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp +++ b/tests/auto/qnetworkconfigurationmanager/tst_qnetworkconfigurationmanager.cpp @@ -41,10 +41,11 @@ #include <QtTest/QtTest> #include "../qbearertestcommon.h" -#include "qnetworkconfiguration.h" -#include "qnetworkconfigmanager.h" -#ifdef Q_WS_MAEMO_6 +#include <QtNetwork/qnetworkconfiguration.h> +#include <QtNetwork/qnetworkconfigmanager.h> + +#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5) #include <stdio.h> #include <iapconf.h> #endif @@ -66,7 +67,7 @@ private slots: void configurationFromIdentifier(); private: -#ifdef Q_WS_MAEMO_6 +#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5) Maemo::IAPConf *iapconf; Maemo::IAPConf *iapconf2; Maemo::IAPConf *gprsiap; @@ -78,7 +79,7 @@ private: void tst_QNetworkConfigurationManager::initTestCase() { -#ifdef Q_WS_MAEMO_6 +#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5) iapconf = new Maemo::IAPConf("007"); iapconf->setValue("ipv4_type", "AUTO"); iapconf->setValue("wlan_wepkey1", "connt"); @@ -152,7 +153,7 @@ void tst_QNetworkConfigurationManager::initTestCase() void tst_QNetworkConfigurationManager::cleanupTestCase() { -#ifdef Q_WS_MAEMO_6 +#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5) iapconf->clear(); delete iapconf; iapconf2->clear(); diff --git a/tests/auto/qnetworksession/lackey/main.cpp b/tests/auto/qnetworksession/lackey/main.cpp index 66d6dd4..8759b52 100644 --- a/tests/auto/qnetworksession/lackey/main.cpp +++ b/tests/auto/qnetworksession/lackey/main.cpp @@ -42,9 +42,10 @@ #include <QCoreApplication> #include <QStringList> #include <QLocalSocket> -#include <qnetworkconfigmanager.h> -#include <qnetworkconfiguration.h> -#include <qnetworksession.h> + +#include <QtNetwork/qnetworkconfiguration.h> +#include <QtNetwork/qnetworkconfigmanager.h> +#include <QtNetwork/qnetworksession.h> #include <QDebug> diff --git a/tests/auto/qnetworksession/test/test.pro b/tests/auto/qnetworksession/test/test.pro index d248b10..bfffe90 100644 --- a/tests/auto/qnetworksession/test/test.pro +++ b/tests/auto/qnetworksession/test/test.pro @@ -19,7 +19,7 @@ symbian { TARGET.CAPABILITY = NetworkServices NetworkControl ReadUserData PowerMgmt } -maemo6 { +maemo6|maemo5 { CONFIG += link_pkgconfig PKGCONFIG += conninet diff --git a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp index 58b0576..23cdc6a 100644 --- a/tests/auto/qnetworksession/test/tst_qnetworksession.cpp +++ b/tests/auto/qnetworksession/test/tst_qnetworksession.cpp @@ -44,10 +44,11 @@ #include <QLocalSocket> #include <QTimer> #include "../../qbearertestcommon.h" -#include <qnetworkconfigmanager.h> -#include <qnetworksession.h> -#ifdef Q_WS_MAEMO_6 +#include <QtNetwork/qnetworkconfigmanager.h> +#include <QtNetwork/qnetworksession.h> + +#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5) #include <stdio.h> #include <iapconf.h> #endif @@ -72,6 +73,8 @@ public slots: private slots: + void robustnessBombing(); + void outOfProcessSession(); void invalidSession(); @@ -100,7 +103,7 @@ private: int inProcessSessionManagementCount; -#ifdef Q_WS_MAEMO_6 +#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5) Maemo::IAPConf *iapconf; Maemo::IAPConf *iapconf2; Maemo::IAPConf *gprsiap; @@ -123,7 +126,7 @@ void tst_QNetworkSession::initTestCase() qRegisterMetaType<QNetworkConfiguration>("QNetworkConfiguration"); qRegisterMetaType<QNetworkConfiguration::Type>("QNetworkConfiguration::Type"); -#ifdef Q_WS_MAEMO_6 +#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5) iapconf = new Maemo::IAPConf("007"); iapconf->setValue("ipv4_type", "AUTO"); iapconf->setValue("wlan_wepkey1", "connt"); @@ -209,7 +212,7 @@ void tst_QNetworkSession::cleanupTestCase() "inProcessSessionManagement()"); } -#ifdef Q_WS_MAEMO_6 +#if defined(Q_WS_MAEMO_6) || defined(Q_WS_MAEMO_5) iapconf->clear(); delete iapconf; iapconf2->clear(); @@ -232,6 +235,23 @@ void tst_QNetworkSession::cleanupTestCase() #endif } +// Robustness test for calling interfaces in nonsense order / with nonsense parameters +void tst_QNetworkSession::robustnessBombing() +{ + QNetworkConfigurationManager mgr; + QNetworkSession testSession(mgr.defaultConfiguration()); + // Should not reset even session is not opened + testSession.migrate(); + testSession.accept(); + testSession.ignore(); + testSession.reject(); + quint64 temp; + temp = testSession.bytesWritten(); + temp = testSession.bytesReceived(); + temp = testSession.activeTime(); +} + + void tst_QNetworkSession::invalidSession() { // 1. Verify that session created with invalid configuration remains in invalid state diff --git a/tests/auto/qthread/tst_qthread.cpp b/tests/auto/qthread/tst_qthread.cpp index 871578e..9a4397e 100644 --- a/tests/auto/qthread/tst_qthread.cpp +++ b/tests/auto/qthread/tst_qthread.cpp @@ -174,8 +174,8 @@ public: void run() { + Simple_Thread::run(); if (object) { - Simple_Thread::run(); object->thread = this; object->code = code; QTimer::singleShot(100, object, SLOT(slot())); @@ -218,8 +218,8 @@ public: void run() { + Simple_Thread::run(); if (object) { - Simple_Thread::run(); object->thread = this; QTimer::singleShot(100, object, SLOT(slot())); } @@ -443,22 +443,24 @@ void tst_QThread::exit() thread2.code = 53; thread2.result = 0; thread2.start(); - thread2.exit(thread.code); + thread2.exit(thread2.code); + QMutexLocker locker2(&thread2.mutex); + thread2.cond.wait(locker2.mutex()); QVERIFY(thread2.wait(five_minutes)); - QCOMPARE(thread.result, thread.code); + QCOMPARE(thread2.result, thread2.code); } void tst_QThread::start() { QThread::Priority priorities[] = { - QThread::IdlePriority, - QThread::LowestPriority, - QThread::LowPriority, - QThread::NormalPriority, - QThread::HighPriority, - QThread::HighestPriority, - QThread::TimeCriticalPriority, - QThread::InheritPriority + QThread::IdlePriority, + QThread::LowestPriority, + QThread::LowPriority, + QThread::NormalPriority, + QThread::HighPriority, + QThread::HighestPriority, + QThread::TimeCriticalPriority, + QThread::InheritPriority }; const int prio_count = sizeof(priorities) / sizeof(QThread::Priority); @@ -514,8 +516,10 @@ void tst_QThread::quit() thread2.result = -1; thread2.start(); thread2.quit(); + QMutexLocker locker2(&thread2.mutex); + thread2.cond.wait(locker2.mutex()); QVERIFY(thread2.wait(five_minutes)); - QCOMPARE(thread.result, 0); + QCOMPARE(thread2.result, 0); } void tst_QThread::wait() @@ -692,7 +696,7 @@ void NativeThreadWrapper::start(FunctionPointer functionPointer, void *data) const int state = pthread_create(&nativeThreadHandle, 0, NativeThreadWrapper::runUnix, this); Q_UNUSED(state); #elif defined(Q_OS_WINCE) - nativeThreadHandle = CreateThread(NULL, 0 , (LPTHREAD_START_ROUTINE)NativeThreadWrapper::runWin , this, 0, NULL); + nativeThreadHandle = CreateThread(NULL, 0 , (LPTHREAD_START_ROUTINE)NativeThreadWrapper::runWin , this, 0, NULL); #elif defined Q_OS_WIN unsigned thrdid = 0; nativeThreadHandle = (Qt::HANDLE) _beginthreadex(NULL, 0, NativeThreadWrapper::runWin, this, 0, &thrdid); diff --git a/tests/auto/qwidget/tst_qwidget.cpp b/tests/auto/qwidget/tst_qwidget.cpp index 1b2944e..76e20b9 100644 --- a/tests/auto/qwidget/tst_qwidget.cpp +++ b/tests/auto/qwidget/tst_qwidget.cpp @@ -6056,9 +6056,6 @@ void tst_QWidget::setToolTip() #ifdef Q_OS_WINCE_WM QSKIP("Mouse over doesn't work on Windows mobile.", SkipAll); #endif -#ifdef QT_MAC_USE_COCOA - QSKIP("Temporarily disable the rest on cocoa due to QCursor::setPos problems.", SkipAll); -#endif for (int pass = 0; pass < 2; ++pass) { QWidget *popup = new QWidget(0, Qt::Popup); diff --git a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp index dd985ca..7dde402 100644 --- a/tests/auto/qwindowsurface/tst_qwindowsurface.cpp +++ b/tests/auto/qwindowsurface/tst_qwindowsurface.cpp @@ -66,6 +66,7 @@ private slots: void getSetWindowSurface(); void flushOutsidePaintEvent(); void grabWidget(); + void staticContentsAndPartialUpdateSupport(); }; class MyWindowSurface : public QWindowSurface @@ -81,6 +82,8 @@ public: /* nothing */ } + using QWindowSurface::setStaticContentsSupport; + using QWindowSurface::setPartialUpdateSupport; private: QImage image; }; @@ -280,6 +283,51 @@ void tst_QWindowSurface::grabWidget() QVERIFY(QColor(childInvalidSubImage.pixel(0, 0)) == QColor(Qt::white)); } +void tst_QWindowSurface::staticContentsAndPartialUpdateSupport() +{ + QWidget widget; + MyWindowSurface surface(&widget); + + // Default values. + QVERIFY(surface.hasPartialUpdateSupport()); + QVERIFY(!surface.hasStaticContentsSupport()); + + // Partial: YES, Static: YES + surface.setStaticContentsSupport(true); + QVERIFY(surface.hasPartialUpdateSupport()); + QVERIFY(surface.hasStaticContentsSupport()); + + // Static contents requires support for partial updates. + // We simply ingore bad combinations and spit out a warning. + + // CONFLICT: Partial: NO, Static: YES + QTest::ignoreMessage(QtWarningMsg, "QWindowSurface::setPartialUpdateSupport: static contents support requires partial update support"); + surface.setPartialUpdateSupport(false); + QVERIFY(surface.hasPartialUpdateSupport()); + QVERIFY(surface.hasStaticContentsSupport()); + + // Partial: YES, Static: NO + surface.setStaticContentsSupport(false); + QVERIFY(surface.hasPartialUpdateSupport()); + QVERIFY(!surface.hasStaticContentsSupport()); + + // Partial: NO, Static: NO + surface.setPartialUpdateSupport(false); + QVERIFY(!surface.hasPartialUpdateSupport()); + QVERIFY(!surface.hasStaticContentsSupport()); + + // CONFLICT: Partial: NO, Static: YES + QTest::ignoreMessage(QtWarningMsg, "QWindowSurface::setStaticContentsSupport: static contents support requires partial update support"); + surface.setStaticContentsSupport(true); + QVERIFY(!surface.hasPartialUpdateSupport()); + QVERIFY(!surface.hasStaticContentsSupport()); + + // Partial: YES, Static: NO + surface.setPartialUpdateSupport(true); + QVERIFY(surface.hasPartialUpdateSupport()); + QVERIFY(!surface.hasStaticContentsSupport()); +} + QTEST_MAIN(tst_QWindowSurface) #else // Q_WS_MAC |