diff --git a/externals b/externals index 836036abd..e65d53de6 160000 --- a/externals +++ b/externals @@ -1 +1 @@ -Subproject commit 836036abd219b103a1e9dfe080f066bb63d2fddd +Subproject commit e65d53de6e09994dd5a9def75767d7e845975200 diff --git a/src/blackcore/application.cpp b/src/blackcore/application.cpp index 088f48bce..2d67f6009 100644 --- a/src/blackcore/application.cpp +++ b/src/blackcore/application.cpp @@ -1604,6 +1604,7 @@ namespace BlackCore } #ifdef BLACK_USE_CRASHPAD + //! Convert to file path base::FilePath qstringToFilePath(const QString &str) { # ifdef Q_OS_WIN @@ -1641,11 +1642,16 @@ namespace BlackCore QDir().mkpath(database); m_crashReportDatabase = CrashReportDatabase::Initialize(qstringToFilePath(database)); - auto settings = m_crashReportDatabase->GetSettings(); + crashpad::Settings *settings = m_crashReportDatabase->GetSettings(); settings->SetUploadsEnabled(CBuildConfig::isReleaseBuild() && m_crashDumpSettings.getThreadLocal().isEnabled()); m_crashpadClient = std::make_unique(); - m_crashpadClient->StartHandler(qstringToFilePath(handler), qstringToFilePath(database), qstringToFilePath(metrics), - serverUrl.getFullUrl().toStdString(), annotations, {}, false, true); + m_crashpadClient->StartHandler(qstringToFilePath(handler), + qstringToFilePath(database), + qstringToFilePath(metrics), + serverUrl.getFullUrl().toStdString(), + annotations, + {}, + false, true); return CStatusMessage(this).info("Using crash handler"); #else return CStatusMessage(this).info("Not using crash handler"); diff --git a/src/blackcore/application.h b/src/blackcore/application.h index ebf60ca7c..1d88c5eb9 100644 --- a/src/blackcore/application.h +++ b/src/blackcore/application.h @@ -43,7 +43,7 @@ #include #include -#if defined(Q_CC_MSVC) || defined(Q_OS_MACOS) // Crashpad only supported on MSVC and MacOS/X +#if !defined(Q_CC_MINGW) #define BLACK_USE_CRASHPAD #endif diff --git a/src/blackcore/blackcore.pro b/src/blackcore/blackcore.pro index a4d62b522..1c4136727 100644 --- a/src/blackcore/blackcore.pro +++ b/src/blackcore/blackcore.pro @@ -20,7 +20,7 @@ PRECOMPILED_HEADER = pch/pch.h DEFINES += LOG_IN_FILE BUILD_BLACKCORE_LIB INCLUDEPATH *= $$EXTERNALSROOT/common/include/crashpad -INCLUDEPATH *= $$EXTERNALSROOT/common/include/mini_chromium +INCLUDEPATH *= $$EXTERNALSROOT/common/include/crashpad/mini_chromium HEADERS += *.h HEADERS += $$PWD/application/*.h @@ -41,10 +41,11 @@ DESTDIR = $$DestRoot/lib DLLDESTDIR = $$DestRoot/bin msvc { - CONFIG(debug, debug|release): LIBS *= -lcrashpad_clientd -lcrashpad_utild -lbased -lRpcrt4 -lAdvapi32 - CONFIG(release, debug|release): LIBS *= -lcrashpad_client -lcrashpad_util -lbase -lRpcrt4 -lAdvapi32 + CONFIG(debug, debug|release): LIBS *= -lclientd -lutild -lbased -lRpcrt4 -lAdvapi32 + CONFIG(release, debug|release): LIBS *= -lclient -lutil -lbase -lRpcrt4 -lAdvapi32 } -macx: LIBS *= -lcrashpad_client -lcrashpad_util -lbase -lbsm -framework Security +macx: LIBS *= -lclient -lutil -lbase -lbsm -framework Security +unix:!macx: LIBS *= -lclient -lutil -lbase OTHER_FILES += readme.txt *.xml