aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlengine.cpp
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2014-03-04 09:45:13 +0100
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-03-04 15:22:58 +0100
commit588da94cce7ee0d9e03908fd5be211a5b629511c (patch)
tree70f9077e90e3254979280860373bc511397d78e3 /src/qml/qml/qqmlengine.cpp
parent94d003c59b346c078e4aa8233c29c2c2c3467e3b (diff)
Combine the source file, line and column number triplet in a common structure
This avoids unnecessary function calls when all of the three pieces need to be retrieved from a QQmlBoundSignalExpression. Change-Id: Ibcd498c907ea723baf6439cf32ca5fc704f204b5 Reviewed-by: Ulf Hermann <ulf.hermann@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/qml/qml/qqmlengine.cpp')
-rw-r--r--src/qml/qml/qqmlengine.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlengine.cpp b/src/qml/qml/qqmlengine.cpp
index 6554ddc740..e9a0858474 100644
--- a/src/qml/qml/qqmlengine.cpp
+++ b/src/qml/qml/qqmlengine.cpp
@@ -1617,11 +1617,11 @@ void QQmlData::destroyed(QObject *object)
QString locationString;
QQmlBoundSignalExpression *expr = signalHandler->expression();
if (expr) {
- QString fileName = expr->sourceFile();
- if (fileName.isEmpty())
- fileName = QStringLiteral("<Unknown File>");
- locationString.append(fileName);
- locationString.append(QString::fromLatin1(":%0: ").arg(expr->lineNumber()));
+ QQmlSourceLocation location = expr->sourceLocation();
+ if (location.sourceFile.isEmpty())
+ location.sourceFile = QStringLiteral("<Unknown File>");
+ locationString.append(location.sourceFile);
+ locationString.append(QString::fromLatin1(":%0: ").arg(location.line));
QString source = expr->expression();
if (source.size() > 100) {
source.truncate(96);