diff --git a/.vscode/settings.json b/.vscode/settings.json index cd7e903..e3aa522 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -17,19 +17,19 @@ "ignoreFailures": true } ], - "visualizerFile": "${workspaceRoot}/.vscode/qt6.natvis", + "visualizerFile": "${workspaceRoot}/.vscode/qt5.natvis", "args": ["127.0.0.1", "9009"] }, "cmake.configureArgs": [ "-Wno-dev" ], "cmake.environment": { - "QT_LIB_ROOT": "D:/Dev/Qt6/msvc2022_64", - "PATH": "${env:PATH};D:/Dev/Qt6/msvc2022_64/bin" + "QT_LIB_ROOT": "/home/yun/Qt5.14.2/5.14.2/gcc_64", + "PATH": "${env:PATH};/home/yun/Qt5.14.2/5.14.2/gcc_64/bin" }, "cmake.configureSettings": { "CMAKE_PREFIX_PATH": "${env:QT_LIB_ROOT}", - "QT_DEFAULT_MAJOR_VERSION": "6", + "QT_DEFAULT_MAJOR_VERSION": "5", "COMPILE_GUI": "ON" }, "cmake.options.statusBarVisibility": "visible", diff --git a/CMakeLists.txt b/CMakeLists.txt index a13b135..bd28b78 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -29,7 +29,6 @@ endif() if(WIN32) if(DEFINED XP_PLATFORM_SUPPORT) message(STATUS "Support Windows XP platform => ${XP_PLATFORM_SUPPORT}.") -include_directories(${CMAKE_SOURCE_DIR}/Gui/Control) add_definitions(-D_WIN32_WINNT=0x0501) else() add_definitions(-D_WIN32_WINNT=0x0601) @@ -37,6 +36,7 @@ endif() endif() set(CMAKE_DEBUG_POSTFIX "d") +include_directories(${CMAKE_SOURCE_DIR}/Gui/Control) set(LIBRARY_OUTPUT_PATH ${PROJECT_BINARY_DIR}/lib/${CMAKE_BUILD_TYPE}) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin/${CMAKE_BUILD_TYPE}/) include_directories(${PROJECT_BINARY_DIR}) diff --git a/Gui/main.cpp b/Gui/main.cpp index ca409a9..bbaeda8 100644 --- a/Gui/main.cpp +++ b/Gui/main.cpp @@ -23,12 +23,12 @@ int main(int argc, char* argv[]) CRASHELPER_MARK_ENTRY(); #endif - SingleApplication a(argc, argv); - #if (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling); #endif + SingleApplication a(argc, argv); + #ifdef _WIN32 QFont font("Microsoft YaHei", 9); a.setFont(font); diff --git a/crashelper/include/crashelper.h b/crashelper/include/crashelper.h index 6180d9c..8384b9c 100644 --- a/crashelper/include/crashelper.h +++ b/crashelper/include/crashelper.h @@ -48,7 +48,7 @@ void UseExceptionHandler(EXCEPTION_POINTERS* exception); #elif defined(LINUX_OS) #define CRASHELPER_MARK_ENTRY() \ backward::SignalHandling sh; \ - sh.register_crash_path([]() -> QString { return backward::GetCurFullLogPath(); }) + sh.register_crash_path([]() -> std::string { return backward::GetCurFullLogPath(); }) #endif #endif // CRASHELPER_H \ No newline at end of file diff --git a/crashelper/src/crashelper.cxx b/crashelper/src/crashelper.cxx index e68e60a..e20db7f 100644 --- a/crashelper/src/crashelper.cxx +++ b/crashelper/src/crashelper.cxx @@ -15,8 +15,8 @@ std::function backward::SignalHandling::crash_path_getter_ = null std::function backward::SignalHandling::crash_use_handler_ = nullptr; std::function backward::SignalHandling::user_sig_handler_ = nullptr; #else -std::function crash_path_getter_ = nullptr; -std::function user_sig_handler_ = nullptr; +std::function backward::SignalHandling::crash_path_getter_ = nullptr; +std::function backward::SignalHandling::user_sig_handler_ = nullptr; #endif namespace backward {