From c34daa26c67f4a879ff541775c099ddc19a1dec5 Mon Sep 17 00:00:00 2001 From: Chris Xiong Date: Mon, 2 Dec 2019 01:19:30 +0800 Subject: Add a stack trace printer for the beloved operating system. --- qmidiplayer-desktop/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'qmidiplayer-desktop') diff --git a/qmidiplayer-desktop/main.cpp b/qmidiplayer-desktop/main.cpp index 37f6338..b1c9149 100644 --- a/qmidiplayer-desktop/main.cpp +++ b/qmidiplayer-desktop/main.cpp @@ -22,11 +22,16 @@ #include #include #ifdef _WIN32 +#include #include #endif int main(int argc,char **argv) { +#ifdef _WIN32 + if(!LoadLibraryA("libbacktrace.dll")) + fputs("Failed to load backtrace library. Stack trace will not be printed if unhandled exception occurs.\n",stderr); +#endif QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); QCoreApplication::setApplicationName("qmidiplayer"); QCoreApplication::setApplicationVersion(APP_VERSION); -- cgit v1.2.3