diff options
author | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-21 04:51:19 (GMT) |
---|---|---|
committer | Aaron Kennedy <aaron.kennedy@nokia.com> | 2010-04-21 04:51:19 (GMT) |
commit | d363b2ed7517dbbc8a54c02d8b606f4b52b54047 (patch) | |
tree | cb005c991ccf33aa99b8faed04d75c8e47526519 /src/declarative/qml/qdeclarativeinfo.h | |
parent | e79202be457298c48b13eef4f8c35df186216aea (diff) | |
download | Qt-d363b2ed7517dbbc8a54c02d8b606f4b52b54047.zip Qt-d363b2ed7517dbbc8a54c02d8b606f4b52b54047.tar.gz Qt-d363b2ed7517dbbc8a54c02d8b606f4b52b54047.tar.bz2 |
Fix crash when QDeclarativeInfo objects are copied
Diffstat (limited to 'src/declarative/qml/qdeclarativeinfo.h')
-rw-r--r-- | src/declarative/qml/qdeclarativeinfo.h | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/src/declarative/qml/qdeclarativeinfo.h b/src/declarative/qml/qdeclarativeinfo.h index 3d5a111..82f44f2 100644 --- a/src/declarative/qml/qdeclarativeinfo.h +++ b/src/declarative/qml/qdeclarativeinfo.h @@ -56,9 +56,7 @@ class QDeclarativeInfoPrivate; class Q_DECLARATIVE_EXPORT QDeclarativeInfo : public QDebug { public: - QDeclarativeInfo(const QObject *); - QDeclarativeInfo(const QObject *, const QDeclarativeError &); - QDeclarativeInfo(const QObject *, const QList<QDeclarativeError> &); + QDeclarativeInfo(const QDeclarativeInfo &); ~QDeclarativeInfo(); inline QDeclarativeInfo &operator<<(QChar t) { QDebug::operator<<(t); return *this; } @@ -86,23 +84,17 @@ public: inline QDeclarativeInfo &operator<<(const QUrl &t) { static_cast<QDebug &>(*this) << t; return *this; } private: + friend QDeclarativeInfo qmlInfo(const QObject *me); + friend QDeclarativeInfo qmlInfo(const QObject *me, const QDeclarativeError &error); + friend QDeclarativeInfo qmlInfo(const QObject *me, const QList<QDeclarativeError> &errors); + + QDeclarativeInfo(QDeclarativeInfoPrivate *); QDeclarativeInfoPrivate *d; }; -Q_DECLARATIVE_EXPORT inline QDeclarativeInfo qmlInfo(const QObject *me) -{ - return QDeclarativeInfo(me); -} - -Q_DECLARATIVE_EXPORT inline QDeclarativeInfo qmlInfo(const QObject *me, const QDeclarativeError &error) -{ - return QDeclarativeInfo(me, error); -} - -Q_DECLARATIVE_EXPORT inline QDeclarativeInfo qmlInfo(const QObject *me, const QList<QDeclarativeError> &errors) -{ - return QDeclarativeInfo(me, errors); -} +Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me); +Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me, const QDeclarativeError &error); +Q_DECLARATIVE_EXPORT QDeclarativeInfo qmlInfo(const QObject *me, const QList<QDeclarativeError> &errors); QT_END_NAMESPACE |