From 836d555742d8e0797daac27594d854b22adbf0d5 Mon Sep 17 00:00:00 2001 From: Eike Ziller Date: Mon, 7 Oct 2024 13:40:42 +0200 Subject: [PATCH] Crashpad: Fix compilation on Windows It was trying to modify a const QString. Change-Id: I431abb387cf964d4e8869371fd8f7f04c0b055e7 Reviewed-by: Cristian Adam --- src/app/main.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/app/main.cpp b/src/app/main.cpp index 9da6030f5e5..755169fc8db 100644 --- a/src/app/main.cpp +++ b/src/app/main.cpp @@ -418,12 +418,11 @@ bool startCrashpad(const AppInfo &appInfo, bool crashReportingEnabled) const QString databasePath = appInfo.crashReports.path(); const QString handlerPath = (appInfo.libexec / "crashpad_handler").path(); #ifdef Q_OS_WIN - handlerPath += ".exe"; base::FilePath database(databasePath.toStdWString()); - base::FilePath handler(handlerPath.toStdWString()); + base::FilePath handler(HostOsInfo::withExecutableSuffix(handlerPath).toStdWString()); #elif defined(Q_OS_MACOS) || defined(Q_OS_LINUX) base::FilePath database(databasePath.toStdString()); - base::FilePath handler(handlerPath.toStdString()); + base::FilePath handler(HostOsInfo::withExecutableSuffix(handlerPath).toStdString()); #endif std::unique_ptr db = CrashReportDatabase::Initialize(database);