summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlinfo.cpp
diff options
context:
space:
mode:
authorWarwick Allison <warwick.allison@nokia.com>2009-11-10 07:34:31 (GMT)
committerWarwick Allison <warwick.allison@nokia.com>2009-11-10 07:34:31 (GMT)
commita3627a496c3b7c6c007fe01cabcba65bc073f0a7 (patch)
tree2c2bc4db3ce82308d5657321effaf29f3c07e211 /src/declarative/qml/qmlinfo.cpp
parentbdfccf48dc66a49a8adc3a160d6a873bf2b48adf (diff)
downloadQt-a3627a496c3b7c6c007fe01cabcba65bc073f0a7.zip
Qt-a3627a496c3b7c6c007fe01cabcba65bc073f0a7.tar.gz
Qt-a3627a496c3b7c6c007fe01cabcba65bc073f0a7.tar.bz2
Return qmlInfo(obj) << syntax.
Fixes QTBUG-5480
Diffstat (limited to 'src/declarative/qml/qmlinfo.cpp')
-rw-r--r--src/declarative/qml/qmlinfo.cpp15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/declarative/qml/qmlinfo.cpp b/src/declarative/qml/qmlinfo.cpp
index 5ebcd8d..9a19b80 100644
--- a/src/declarative/qml/qmlinfo.cpp
+++ b/src/declarative/qml/qmlinfo.cpp
@@ -63,7 +63,7 @@ QT_BEGIN_NAMESPACE
For example,
\code
- qmlInfo(tr("component property is a write-once property"), object);
+ qmlInfo(object) << tr("component property is a write-once property");
\endcode
prints
@@ -73,7 +73,8 @@ QT_BEGIN_NAMESPACE
\endcode
*/
-void qmlInfo(const QString& msg, const QObject* object)
+QmlInfo::QmlInfo(const QObject *object)
+: QDebug(QtWarningMsg)
{
QString pos = QLatin1String("QML");
if (object) {
@@ -95,8 +96,14 @@ void qmlInfo(const QString& msg, const QObject* object)
} else {
pos += qApp->translate("QmlInfo","unknown location");
}
- pos += QLatin1String(") ");
- qWarning((pos + msg).toLocal8Bit()); // XXX allow other processing?
+ pos += QLatin1String(")");
+ *this << pos;
+ nospace();
}
+QmlInfo::~QmlInfo()
+{
+}
+
+
QT_END_NAMESPACE