aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorLars Knoll <lars.knoll@digia.com>2013-07-05 13:29:57 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-07-05 15:02:58 +0200
commit5d6f8b18fe77d2fc17a3c1d77d1c4baeff0e9704 (patch)
tree507f652c897825a7f6b3a09a5dd2c09d6c1797f4 /tests
parent2e4d1ccb18aba13f94670d3d1104839fecf2ab5c (diff)
Get rid of the first half of QQmlGuard usage
QQmlGuard was being used as a more performant replacement for QPointer. QPointer got now fixed in Qt 5.0, making this class obsolete. Change-Id: I77eef066c4823af4b074ef32d4d78dbd67c36cd0 Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Diffstat (limited to 'tests')
-rw-r--r--tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp13
1 files changed, 6 insertions, 7 deletions
diff --git a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
index 03d553c49c..3ac88dd086 100644
--- a/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
+++ b/tests/auto/qml/qqmlecmascript/tst_qqmlecmascript.cpp
@@ -45,7 +45,6 @@
#include <QtQml/qqmlcontext.h>
#include <QtCore/qfileinfo.h>
#include <QtCore/qdebug.h>
-#include <QtQml/private/qqmlguard_p.h>
#include <QtCore/qdir.h>
#include <QtCore/qnumeric.h>
#include <private/qqmlengine_p.h>
@@ -1575,9 +1574,9 @@ void tst_qqmlecmascript::dynamicDestruction()
{
{
QQmlComponent component(&engine, testFileUrl("dynamicDeletion.qml"));
- QQmlGuard<MyQmlObject> object = qobject_cast<MyQmlObject*>(component.create());
+ QPointer<MyQmlObject> object = qobject_cast<MyQmlObject*>(component.create());
QVERIFY(object != 0);
- QQmlGuard<QObject> createdQmlObject = 0;
+ QPointer<QObject> createdQmlObject = 0;
QMetaObject::invokeMethod(object, "create");
createdQmlObject = object->objectProperty();
@@ -1630,7 +1629,7 @@ void tst_qqmlecmascript::dynamicDestruction()
{
// QTBUG-23451
- QQmlGuard<QObject> createdQmlObject = 0;
+ QPointer<QObject> createdQmlObject = 0;
QQmlComponent component(&engine, testFileUrl("dynamicDeletion.3.qml"));
QObject *o = component.create();
QVERIFY(o != 0);
@@ -3274,7 +3273,7 @@ void tst_qqmlecmascript::ownershipRootObject()
context->setContextObject(&own);
QQmlComponent component(&engine, testFileUrl("ownershipRootObject.qml"));
- QQmlGuard<QObject> object = component.create(context);
+ QPointer<QObject> object = component.create(context);
QVERIFY(object);
engine.collectGarbage();
@@ -3304,7 +3303,7 @@ void tst_qqmlecmascript::ownershipConsistency()
QTest::ignoreMessage(QtWarningMsg, qPrintable(expectedWarning)); // we expect a meaningful warning to be printed.
QQmlComponent component(&engine, testFileUrl("ownershipConsistency.qml"));
- QQmlGuard<QObject> object = component.create(context);
+ QPointer<QObject> object = component.create(context);
QVERIFY(object);
engine.collectGarbage();
@@ -5613,7 +5612,7 @@ void tst_qqmlecmascript::qtbug_9792()
delete object;
}
-// Verifies that QQmlGuard<>s used in the vmemetaobject are cleaned correctly
+// Verifies that QPointer<>s used in the vmemetaobject are cleaned correctly
void tst_qqmlecmascript::qtcreatorbug_1289()
{
QQmlComponent component(&engine, testFileUrl("qtcreatorbug_1289.qml"));