From 588da94cce7ee0d9e03908fd5be211a5b629511c Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Tue, 4 Mar 2014 09:45:13 +0100 Subject: 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 Reviewed-by: Lars Knoll --- src/qml/qml/qqmlglobal_p.h | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/qml/qml/qqmlglobal_p.h') diff --git a/src/qml/qml/qqmlglobal_p.h b/src/qml/qml/qqmlglobal_p.h index eca13e8fb8..8a17c81895 100644 --- a/src/qml/qml/qqmlglobal_p.h +++ b/src/qml/qml/qqmlglobal_p.h @@ -368,6 +368,16 @@ public: QStringList args; }; +struct QQmlSourceLocation +{ + QQmlSourceLocation() : line(0), column(0) {} + QQmlSourceLocation(const QString &sourceFile, quint16 line, quint16 column) + : sourceFile(sourceFile), line(line), column(column) {} + QString sourceFile; + quint16 line; + quint16 column; +}; + QT_END_NAMESPACE #endif // QQMLGLOBAL_H -- cgit v1.2.3