aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlmemoryprofiler.cpp
diff options
context:
space:
mode:
authorFriedemann Kleint <Friedemann.Kleint@qt.io>2016-05-06 09:01:09 +0200
committerFriedemann Kleint <Friedemann.Kleint@qt.io>2016-05-06 07:27:07 +0000
commitd54f7f520ab876e86db3ddc895ddba7f685aec1d (patch)
treea9ba7a83dc734568d69266969529929961e0d797 /src/qml/qml/qqmlmemoryprofiler.cpp
parent7c287efccc1fc2432de206c339af60a3fee9fe04 (diff)
Introduce delegating constructors.
Reduce code duplication by chaining constructors. Change-Id: I8a0afd20ed13d4eb938536dcb05787ba2565a4cc Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlmemoryprofiler.cpp')
-rw-r--r--src/qml/qml/qqmlmemoryprofiler.cpp7
1 files changed, 2 insertions, 5 deletions
diff --git a/src/qml/qml/qqmlmemoryprofiler.cpp b/src/qml/qml/qqmlmemoryprofiler.cpp
index d9e121bb1b..60f6d96eaf 100644
--- a/src/qml/qml/qqmlmemoryprofiler.cpp
+++ b/src/qml/qml/qqmlmemoryprofiler.cpp
@@ -97,12 +97,9 @@ static bool openLibrary()
return state == Loaded;
}
-QQmlMemoryScope::QQmlMemoryScope(const QUrl &url) : pushed(false)
+QQmlMemoryScope::QQmlMemoryScope(const QUrl &url)
+ : QQmlMemoryScope(url.path().toUtf8().constData())
{
- if (openLibrary() && memprofile_is_enabled()) {
- memprofile_push_location(url.path().toUtf8().constData(), 0);
- pushed = true;
- }
}
QQmlMemoryScope::QQmlMemoryScope(const char *string) : pushed(false)