summary refs log tree commit diff
diff options
context:
space:
mode:
authorNicolas Werner <nicolas.werner@hotmail.de>2019-12-14 23:48:02 +0100
committerNicolas Werner <nicolas.werner@hotmail.de>2019-12-14 23:48:28 +0100
commit7d6a015f36625269fe4d11e3c08c93f4d72c0976 (patch)
treea3aea48e0c97d587306c8206485595974840bd0f
parentIncrease max cache size and remove const from lmdb constants (diff)
downloadnheko-7d6a015f36625269fe4d11e3c08c93f4d72c0976.tar.xz
Add qml debugging option
-rw-r--r--CMakeLists.txt5
-rw-r--r--src/CommunitiesList.h1
-rw-r--r--src/main.cpp5
3 files changed, 10 insertions, 1 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt

index 39dadc64..1e86ee14 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt
@@ -2,6 +2,7 @@ cmake_minimum_required(VERSION 3.11) option(APPVEYOR_BUILD "Build on appveyor" OFF) option(ASAN "Compile with address sanitizers" OFF) +option(QML_DEBUGGING "Enable qml debugging" OFF) set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake) @@ -450,6 +451,10 @@ else() target_link_libraries (nheko ${NHEKO_LIBS} Qt5::DBus) endif() +if(QML_DEBUGGING) + target_compile_definitions(nheko PRIVATE QML_DEBUGGING) +endif() + if(EXTERNAL_PROJECT_DEPS) add_dependencies(nheko ${EXTERNAL_PROJECT_DEPS}) endif() diff --git a/src/CommunitiesList.h b/src/CommunitiesList.h
index fbb63ff0..49eaeaf6 100644 --- a/src/CommunitiesList.h +++ b/src/CommunitiesList.h
@@ -53,4 +53,3 @@ private: std::map<QString, QSharedPointer<CommunitiesListItem>> communities_; }; - diff --git a/src/main.cpp b/src/main.cpp
index 60bb6c76..87bef75b 100644 --- a/src/main.cpp +++ b/src/main.cpp
@@ -47,6 +47,11 @@ #include <boost/stacktrace.hpp> #include <signal.h> +#ifdef QML_DEBUGGING +#include <QQmlDebuggingEnabler> +QQmlDebuggingEnabler enabler; +#endif + void stacktraceHandler(int signum) {