From f973bb1730e1138f9c745d142c1f2f5d9c53b456 Mon Sep 17 00:00:00 2001 From: Andrew den Exter Date: Tue, 31 Jan 2012 13:58:44 +1000 Subject: Fix compile failures. Remove uses of QLineControl, QTextControl and QBool and forward declared QGraphicsWidget. Change-Id: Ic5184a1d5aebfb1100ad0e24444b6773f4e617e8 Reviewed-by: Matthew Vogt --- .../qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp | 14 +++++++------- .../qdeclarativeimage/tst_qdeclarativeimage.cpp | 2 +- .../declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp | 6 +----- .../qdeclarativetextedit/tst_qdeclarativetextedit.cpp | 6 +++--- .../qdeclarativetextinput/tst_qdeclarativetextinput.cpp | 6 +++--- 5 files changed, 15 insertions(+), 19 deletions(-) (limited to 'tests/auto') diff --git a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp index f8731f9f..6952dc91 100644 --- a/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp +++ b/tests/auto/declarative/qdeclarativeecmascript/tst_qdeclarativeecmascript.cpp @@ -992,12 +992,12 @@ void tst_qdeclarativeecmascript::dynamicDestruction() QMetaObject::invokeMethod(object, "killOther"); QVERIFY(createdQmlObject); - QCoreApplication::instance()->processEvents(QEventLoop::DeferredDeletion); + QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); QVERIFY(createdQmlObject); for (int ii = 0; createdQmlObject && ii < 50; ++ii) { // After 5 seconds we should give up if (createdQmlObject) { QTest::qWait(100); - QCoreApplication::instance()->processEvents(QEventLoop::DeferredDeletion); + QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); } } QVERIFY(!createdQmlObject); @@ -1006,7 +1006,7 @@ void tst_qdeclarativeecmascript::dynamicDestruction() QMetaObject::invokeMethod(object, "killMe"); QVERIFY(object); QTest::qWait(0); - QCoreApplication::instance()->processEvents(QEventLoop::DeferredDeletion); + QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); QVERIFY(!object); } @@ -2129,7 +2129,7 @@ void tst_qdeclarativeecmascript::ownership() QObject *object = component.create(context); QDeclarativeEnginePrivate::getScriptEngine(&engine)->collectGarbage(); - QCoreApplication::processEvents(QEventLoop::DeferredDeletion); + QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); QVERIFY(own.object == 0); @@ -2146,7 +2146,7 @@ void tst_qdeclarativeecmascript::ownership() QObject *object = component.create(context); QDeclarativeEnginePrivate::getScriptEngine(&engine)->collectGarbage(); - QCoreApplication::processEvents(QEventLoop::DeferredDeletion); + QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); QVERIFY(own.object != 0); @@ -2199,7 +2199,7 @@ void tst_qdeclarativeecmascript::cppOwnershipReturnValue() delete object; } - QCoreApplication::instance()->processEvents(QEventLoop::DeferredDeletion); + QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); QVERIFY(source.value != 0); } @@ -2226,7 +2226,7 @@ void tst_qdeclarativeecmascript::ownershipCustomReturnValue() delete object; } - QCoreApplication::instance()->processEvents(QEventLoop::DeferredDeletion); + QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); QVERIFY(source.value == 0); } diff --git a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp index ab82f805..05ff292d 100644 --- a/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp +++ b/tests/auto/declarative/qdeclarativeimage/tst_qdeclarativeimage.cpp @@ -782,7 +782,7 @@ void tst_qdeclarativeimage::readerCrash_QTBUG_22125() // shouldn't crash when deleting cancelled QDeclarativePixmapReplys. QTest::qWait(1000); - qApp->processEvents(QEventLoop::DeferredDeletion); + QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete); } { diff --git a/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp b/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp index 11671363..94958b2e 100644 --- a/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp +++ b/tests/auto/declarative/qdeclarativeinfo/tst_qdeclarativeinfo.cpp @@ -161,9 +161,6 @@ void tst_qdeclarativeinfo::types() QTest::ignoreMessage(QtWarningMsg, ": \"Qt\""); qmlInfo(0) << QByteArray("Qt"); - QTest::ignoreMessage(QtWarningMsg, ": true"); - qmlInfo(0) << QBool(true); - //### do we actually want QUrl to show up in the output? //### why the extra space at the end? QTest::ignoreMessage(QtWarningMsg, ": QUrl(\"http://qt.nokia.com\") "); @@ -189,7 +186,7 @@ void tst_qdeclarativeinfo::chaining() //### should more of these be automatically inserting spaces? QString str("Hello World"); QStringRef ref(&str, 6, 5); - QTest::ignoreMessage(QtWarningMsg, ": false 1.1 1.2 15 hello 'b' QUrl(\"http://qt.nokia.com\") World \"Qt\" true Quick "); + QTest::ignoreMessage(QtWarningMsg, ": false 1.1 1.2 15 hello 'b' QUrl(\"http://qt.nokia.com\") World \"Qt\" Quick "); qmlInfo(0) << false << ' ' << 1.1 << ' ' << 1.2f << ' ' @@ -199,7 +196,6 @@ void tst_qdeclarativeinfo::chaining() << QUrl("http://qt.nokia.com") << ref << QByteArray("Qt") - << QBool(true) << QString ("Quick"); } diff --git a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp index c165e624..5ddabc05 100644 --- a/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp +++ b/tests/auto/declarative/qdeclarativetextedit/tst_qdeclarativetextedit.cpp @@ -58,7 +58,7 @@ #include #include #include -#include +#include #include "../shared/platforminputcontext.h" #ifdef Q_OS_SYMBIAN @@ -2022,7 +2022,7 @@ void tst_qdeclarativetextedit::canPaste() { QVERIFY(textEdit != 0); // check initial value - QTBUG-17765 - QTextControl tc; + QWidgetTextControl tc; QCOMPARE(textEdit->canPaste(), tc.canPaste()); #endif @@ -2040,7 +2040,7 @@ void tst_qdeclarativetextedit::canPasteEmpty() { QVERIFY(textEdit != 0); // check initial value - QTBUG-17765 - QTextControl tc; + QWidgetTextControl tc; QCOMPARE(textEdit->canPaste(), tc.canPaste()); #endif diff --git a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp index ee81e4c8..9d9ec69b 100644 --- a/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp +++ b/tests/auto/declarative/qdeclarativetextinput/tst_qdeclarativetextinput.cpp @@ -51,7 +51,7 @@ #include #include #include -#include +#include #include "../shared/platforminputcontext.h" #include "qplatformdefs.h" @@ -1757,7 +1757,7 @@ void tst_qdeclarativetextinput::canPasteEmpty() { QDeclarativeTextInput *textInput = qobject_cast(textInputComponent.create()); QVERIFY(textInput != 0); - QLineControl lc; + QWidgetLineControl lc; bool cp = !lc.isReadOnly() && QApplication::clipboard()->text().length() != 0; QCOMPARE(textInput->canPaste(), cp); @@ -1775,7 +1775,7 @@ void tst_qdeclarativetextinput::canPaste() { QDeclarativeTextInput *textInput = qobject_cast(textInputComponent.create()); QVERIFY(textInput != 0); - QLineControl lc; + QWidgetLineControl lc; bool cp = !lc.isReadOnly() && QApplication::clipboard()->text().length() != 0; QCOMPARE(textInput->canPaste(), cp); -- cgit v1.2.3