aboutsummaryrefslogtreecommitdiffstats
path: root/src/qml/qml/qqmlmemoryprofiler.cpp
diff options
context:
space:
mode:
authorUlf Hermann <ulf.hermann@theqtcompany.com>2015-06-11 17:59:02 +0200
committerUlf Hermann <ulf.hermann@theqtcompany.com>2015-06-26 08:22:48 +0000
commit9dd373913cab364c03a4a772517082cad6e511b6 (patch)
tree9789ff5e14c7abff5e923529f9a2df4976645846 /src/qml/qml/qqmlmemoryprofiler.cpp
parent77fa80f1edbcfa81e6364b1b7d410854ce036447 (diff)
Disable the memory profiler if we cannot load libraries.
Change-Id: I24c28ae2a79f382e10fa6cc5ad16f97f2806c1eb Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Diffstat (limited to 'src/qml/qml/qqmlmemoryprofiler.cpp')
-rw-r--r--src/qml/qml/qqmlmemoryprofiler.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/qml/qml/qqmlmemoryprofiler.cpp b/src/qml/qml/qqmlmemoryprofiler.cpp
index cdd60e2dec..531666340b 100644
--- a/src/qml/qml/qqmlmemoryprofiler.cpp
+++ b/src/qml/qml/qqmlmemoryprofiler.cpp
@@ -63,11 +63,13 @@ static qmlmemprofile_pop_location *memprofile_pop_location;
static qmlmemprofile_save *memprofile_save;
static qmlmemprofile_is_enabled *memprofile_is_enabled;
+#ifndef QT_NO_LIBRARY
extern QFunctionPointer qt_linux_find_symbol_sys(const char *symbol);
+#endif
static bool openLibrary()
{
-#ifdef Q_OS_LINUX
+#if defined(Q_OS_LINUX) && !defined(QT_NO_LIBRARY)
if (state == Unloaded) {
memprofile_stats = (qmlmemprofile_stats *) qt_linux_find_symbol_sys("qmlmemprofile_stats");
memprofile_clear = (qmlmemprofile_clear *) qt_linux_find_symbol_sys("qmlmemprofile_clear");