Skip to content

Commit 92ede06

Browse files
iljukhaputdimkanovikov
authored andcommitted
Fix BugSplat integration
Update Crashpad paths to use QStandardPaths and fix logging severity for initialization errors.
1 parent 9a7acfa commit 92ede06

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

src/3rd_party/crashpad_paths/crashpad_paths.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -103,9 +103,9 @@ QString CrashpadPaths::getHandlerPath()
103103
QString CrashpadPaths::getReportsPath()
104104
{
105105
#if defined(Q_OS_MAC)
106-
return m_exeDir + "/crashpad";
106+
return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/crashpad";
107107
#elif defined(Q_OS_WINDOWS)
108-
return m_exeDir + "\\crashpad";
108+
return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/crashpad";
109109
#elif defined(Q_OS_LINUX)
110110
return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/crashpad";
111111
#else
@@ -116,9 +116,9 @@ QString CrashpadPaths::getReportsPath()
116116
QString CrashpadPaths::getMetricsPath()
117117
{
118118
#if defined(Q_OS_MAC)
119-
return m_exeDir + "/crashpad";
119+
return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/crashpad";
120120
#elif defined(Q_OS_WINDOWS)
121-
return m_exeDir + "\\crashpad";
121+
return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/crashpad";
122122
#elif defined(Q_OS_LINUX)
123123
return QStandardPaths::writableLocation(QStandardPaths::AppDataLocation) + "/crashpad";
124124
#else

src/core/management_layer/application_manager.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1336,7 +1336,7 @@ bool ApplicationManager::Implementation::initializeCrashpad()
13361336
std::unique_ptr<crashpad::CrashReportDatabase> database
13371337
= crashpad::CrashReportDatabase::Initialize(reportsDir);
13381338
if (database == nullptr) {
1339-
Log::error("Failed to initialize Crashpad database");
1339+
Log::critical("Failed to initialize Crashpad database");
13401340
return false;
13411341
}
13421342
Log::info("Crashpad database initialized successfully");
@@ -1374,7 +1374,7 @@ bool ApplicationManager::Implementation::initializeCrashpad()
13741374
if (status) {
13751375
Log::info("Crashpad handler started successfully");
13761376
} else {
1377-
Log::error("Failed to start Crashpad handler");
1377+
Log::critical("Failed to start Crashpad handler");
13781378
}
13791379
return status;
13801380
}

0 commit comments

Comments
 (0)