diff --git a/src/app/CMakeLists.txt b/src/app/CMakeLists.txt index cd0e5e761..2bf2daae0 100644 --- a/src/app/CMakeLists.txt +++ b/src/app/CMakeLists.txt @@ -107,21 +107,6 @@ if (STACKTRACE) if (CMAKE_SYSTEM_NAME STREQUAL "Windows") target_sources(qbt_app PRIVATE stacktrace_win.h) - if (GUI) - qt_wrap_ui(STACKTRACE_UI_HEADERS stacktracedialog.ui) - - target_sources(qbt_app PRIVATE - stacktracedialog.h - stacktracedialog.cpp - ${STACKTRACE_UI_HEADERS} - ) - - # UI headers will be generated in ${CMAKE_CURRENT_BINARY_DIR} - target_include_directories(qbt_app PRIVATE - ${CMAKE_CURRENT_BINARY_DIR} - ) - endif() - # i686 arch on Windows requires frame pointer preservation if (MSVC) target_compile_options(qbt_app PRIVATE /Zi) diff --git a/src/app/app.pri b/src/app/app.pri index 94956d11d..5fa6e0473 100644 --- a/src/app/app.pri +++ b/src/app/app.pri @@ -23,12 +23,7 @@ stacktrace { unix { HEADERS += $$PWD/stacktrace.h } - else { + win32 { HEADERS += $$PWD/stacktrace_win.h - !nogui { - HEADERS += $$PWD/stacktracedialog.h - SOURCES += $$PWD/stacktracedialog.cpp - FORMS += $$PWD/stacktracedialog.ui - } } } diff --git a/src/app/signalhandler.cpp b/src/app/signalhandler.cpp index 939b88514..b3d9cb41a 100644 --- a/src/app/signalhandler.cpp +++ b/src/app/signalhandler.cpp @@ -54,7 +54,7 @@ #else #include "stacktrace_win.h" #ifndef DISABLE_GUI -#include "stacktracedialog.h" +#include "gui/stacktracedialog.h" #endif // DISABLE_GUI #endif // Q_OS_UNIX #endif //STACKTRACE diff --git a/src/gui/CMakeLists.txt b/src/gui/CMakeLists.txt index 7745e66e1..eacdf58de 100644 --- a/src/gui/CMakeLists.txt +++ b/src/gui/CMakeLists.txt @@ -221,6 +221,16 @@ if (DBUS) ) endif() +if (STACKTRACE) + qt_wrap_ui(STACKTRACE_UI_HEADERS stacktracedialog.ui) + + target_sources(qbt_gui PRIVATE + stacktracedialog.h + stacktracedialog.cpp + ${STACKTRACE_UI_HEADERS} + ) +endif() + if ((CMAKE_SYSTEM_NAME STREQUAL "Windows") OR (CMAKE_SYSTEM_NAME STREQUAL "Darwin")) target_sources(qbt_gui PRIVATE programupdater.h diff --git a/src/gui/gui.pri b/src/gui/gui.pri index 6afc436fb..4d8884512 100644 --- a/src/gui/gui.pri +++ b/src/gui/gui.pri @@ -215,3 +215,11 @@ FORMS += \ $$PWD/watchedfolderoptionsdialog.ui RESOURCES += $$PWD/about.qrc + +stacktrace { + !unix { + HEADERS += $$PWD/stacktracedialog.h + SOURCES += $$PWD/stacktracedialog.cpp + FORMS += $$PWD/stacktracedialog.ui + } +} diff --git a/src/app/stacktracedialog.cpp b/src/gui/stacktracedialog.cpp similarity index 100% rename from src/app/stacktracedialog.cpp rename to src/gui/stacktracedialog.cpp diff --git a/src/app/stacktracedialog.h b/src/gui/stacktracedialog.h similarity index 100% rename from src/app/stacktracedialog.h rename to src/gui/stacktracedialog.h diff --git a/src/app/stacktracedialog.ui b/src/gui/stacktracedialog.ui similarity index 100% rename from src/app/stacktracedialog.ui rename to src/gui/stacktracedialog.ui