aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/v4
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 /src/qml/qml/v4
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 'src/qml/qml/v4')
-rw-r--r--src/qml/qml/v4/qv4include_p.h3
-rw-r--r--src/qml/qml/v4/qv4qobjectwrapper.cpp5
-rw-r--r--src/qml/qml/v4/qv4qobjectwrapper_p.h6
-rw-r--r--src/qml/qml/v4/qv4sequenceobject.cpp2
4 files changed, 7 insertions, 9 deletions
diff --git a/src/qml/qml/v4/qv4include_p.h b/src/qml/qml/v4/qv4include_p.h
index 76f5ec3e9a..d6bbcd1a60 100644
--- a/src/qml/qml/v4/qv4include_p.h
+++ b/src/qml/qml/v4/qv4include_p.h
@@ -57,7 +57,6 @@
#include <QtCore/qurl.h>
#include <private/qqmlcontext_p.h>
-#include <private/qqmlguard_p.h>
#include <private/qv4value_p.h>
#include <private/qv4context_p.h>
@@ -96,7 +95,7 @@ private:
QV4::ExecutionEngine *v4;
QNetworkAccessManager *m_network;
- QQmlGuard<QNetworkReply> m_reply;
+ QPointer<QNetworkReply> m_reply;
QUrl m_url;
int m_redirectCount;
diff --git a/src/qml/qml/v4/qv4qobjectwrapper.cpp b/src/qml/qml/v4/qv4qobjectwrapper.cpp
index dc7b50edd3..f79675845b 100644
--- a/src/qml/qml/v4/qv4qobjectwrapper.cpp
+++ b/src/qml/qml/v4/qv4qobjectwrapper.cpp
@@ -41,7 +41,6 @@
#include "qv4qobjectwrapper_p.h"
-#include <private/qqmlguard_p.h>
#include <private/qqmlpropertycache_p.h>
#include <private/qqmlengine_p.h>
#include <private/qqmlvmemetaobject_p.h>
@@ -924,7 +923,7 @@ namespace {
void QObjectWrapper::collectDeletables(Managed *m, GCDeletable **deletable)
{
QObjectWrapper *This = static_cast<QObjectWrapper*>(m);
- QQmlGuard<QObject> &object = This->m_object;
+ QPointer<QObject> &object = This->m_object;
if (!object)
return;
@@ -1652,7 +1651,7 @@ QV4::Value QObjectMethod::method_toString(QV4::ExecutionContext *ctx)
result += QString::fromUtf8(m_object->metaObject()->className());
result += QLatin1String("(0x");
- result += QString::number((quintptr)m_object.object(),16);
+ result += QString::number((quintptr)m_object.data(),16);
if (!objectName.isEmpty()) {
result += QLatin1String(", \"");
diff --git a/src/qml/qml/v4/qv4qobjectwrapper_p.h b/src/qml/qml/v4/qv4qobjectwrapper_p.h
index 73f19acb3f..6580d19fe9 100644
--- a/src/qml/qml/v4/qv4qobjectwrapper_p.h
+++ b/src/qml/qml/v4/qv4qobjectwrapper_p.h
@@ -101,7 +101,7 @@ private:
QQmlPropertyData *findProperty(ExecutionEngine *engine, QQmlContextData *qmlContext, String *name, RevisionMode revisionMode, QQmlPropertyData *local) const;
- QQmlGuard<QObject> m_object;
+ QPointer<QObject> m_object;
String *m_destroy;
String *m_toString;
@@ -137,7 +137,7 @@ private:
QV4::Value method_toString(QV4::ExecutionContext *ctx);
QV4::Value method_destroy(QV4::ExecutionContext *ctx, Value *args, int argc);
- QQmlGuard<QObject> m_object;
+ QPointer<QObject> m_object;
int m_index;
QV4::PersistentValue m_qmlGlobal;
@@ -161,7 +161,7 @@ struct QmlSignalHandler : public QV4::Object
QObject *object() const { return m_object.data(); }
private:
- QQmlGuard<QObject> m_object;
+ QPointer<QObject> m_object;
int m_signalIndex;
static void destroy(Managed *that)
diff --git a/src/qml/qml/v4/qv4sequenceobject.cpp b/src/qml/qml/v4/qv4sequenceobject.cpp
index 454b327efb..be431e3c19 100644
--- a/src/qml/qml/v4/qv4sequenceobject.cpp
+++ b/src/qml/qml/v4/qv4sequenceobject.cpp
@@ -480,7 +480,7 @@ private:
}
mutable Container m_container;
- QQmlGuard<QObject> m_object;
+ QPointer<QObject> m_object;
int m_propertyIndex;
bool m_isReference;