diff options
Diffstat (limited to 'tools/qmlprofiler')
-rw-r--r-- | tools/qmlprofiler/qmlprofiler.pro | 9 | ||||
-rw-r--r-- | tools/qmlprofiler/qmlprofilerdata.cpp | 10 |
2 files changed, 6 insertions, 13 deletions
diff --git a/tools/qmlprofiler/qmlprofiler.pro b/tools/qmlprofiler/qmlprofiler.pro index b5bb1dcc46..a2522e9267 100644 --- a/tools/qmlprofiler/qmlprofiler.pro +++ b/tools/qmlprofiler/qmlprofiler.pro @@ -14,13 +14,6 @@ HEADERS += \ qmlprofilerdata.h \ qmlprofilerclient.h -QMAKE_TARGET_PRODUCT = qmlprofiler -QMAKE_TARGET_DESCRIPTION = QML profiler - -win32 { - VERSION = $${QT_VERSION}.0 -} else { - VERSION = $${QT_VERSION} -} +QMAKE_TARGET_DESCRIPTION = QML Profiler load(qt_tool) diff --git a/tools/qmlprofiler/qmlprofilerdata.cpp b/tools/qmlprofiler/qmlprofilerdata.cpp index 0044af0b52..7dcfa4cdaa 100644 --- a/tools/qmlprofiler/qmlprofilerdata.cpp +++ b/tools/qmlprofiler/qmlprofilerdata.cpp @@ -33,7 +33,7 @@ #include <QHash> #include <QFile> #include <QXmlStreamReader> -#include <QRegExp> +#include <QRegularExpression> #include <limits> @@ -232,10 +232,10 @@ void QmlProfilerData::addQmlEvent(QQmlProfilerDefinitions::RangeType type, if (!data.isEmpty()) { details = data.join(QLatin1Char(' ')).replace( QLatin1Char('\n'), QLatin1Char(' ')).simplified(); - QRegExp rewrite(QStringLiteral("\\(function \\$(\\w+)\\(\\) \\{ (return |)(.+) \\}\\)")); - bool match = rewrite.exactMatch(details); - if (match) { - details = rewrite.cap(1) +QLatin1String(": ") + rewrite.cap(3); + QRegularExpression rewrite(QStringLiteral("^\\(function \\$(\\w+)\\(\\) \\{ (return |)(.+) \\}\\)$")); + QRegularExpressionMatch match = rewrite.match(details); + if (match.hasMatch()) { + details = match.captured(1) +QLatin1String(": ") + match.captured(3); } if (details.startsWith(QLatin1String("file://"))) details = details.mid(details.lastIndexOf(QLatin1Char('/')) + 1); |