summaryrefslogtreecommitdiffstats
path: root/src/declarative/qml/qmlinfo.cpp
diff options
context:
space:
mode:
authorAaron Kennedy <aaron.kennedy@nokia.com>2009-11-06 01:11:35 (GMT)
committerAaron Kennedy <aaron.kennedy@nokia.com>2009-11-06 01:11:35 (GMT)
commitf18031dba7860289342a0d11ead1d2b20c971664 (patch)
tree5ceccdb93e8c56e8de390e3cc7a45a4e85129f85 /src/declarative/qml/qmlinfo.cpp
parent4266b0616bb5d67244173dbe4d9d417dbf4d302f (diff)
downloadQt-f18031dba7860289342a0d11ead1d2b20c971664.zip
Qt-f18031dba7860289342a0d11ead1d2b20c971664.tar.gz
Qt-f18031dba7860289342a0d11ead1d2b20c971664.tar.bz2
qmlinfo test
Diffstat (limited to 'src/declarative/qml/qmlinfo.cpp')
-rw-r--r--src/declarative/qml/qmlinfo.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/declarative/qml/qmlinfo.cpp b/src/declarative/qml/qmlinfo.cpp
index c0d9eca..f62f5fd 100644
--- a/src/declarative/qml/qmlinfo.cpp
+++ b/src/declarative/qml/qmlinfo.cpp
@@ -80,18 +80,18 @@ void qmlInfo(const QString& msg, QObject* object)
pos += QLatin1Char(' ');
pos += QLatin1String(object->metaObject()->className());
}
- QmlDeclarativeData *ddata = QmlDeclarativeData::get(object);
+ QmlDeclarativeData *ddata = object?QmlDeclarativeData::get(object):0;
pos += QLatin1String(" (");
if (ddata) {
if (ddata->outerContext) {
pos += ddata->outerContext->baseUrl().toString();
+ pos += QLatin1String(":");
+ pos += QString::number(ddata->lineNumber);
+ pos += QLatin1String(":");
+ pos += QString::number(ddata->columnNumber);
} else {
- pos += qApp->translate("QmlInfo","unknown");
+ pos += qApp->translate("QmlInfo","unknown location");
}
- pos += QLatin1String(":");
- pos += QString::number(ddata->lineNumber);
- pos += QLatin1String(":");
- pos += QString::number(ddata->columnNumber);
} else {
pos += qApp->translate("QmlInfo","unknown location");
}