Crashpad: Do not start if not enabled

If the user doesn't have enabled crashreports, even local saving should
be disabled.

Change-Id: I809389eba7c1acf0d3a8429dfe3c648f3b56542e
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
Eike Ziller
2024-10-10 17:46:11 +02:00
parent 20a21b3472
commit 413ccc3076

View File

@@ -410,8 +410,11 @@ QStringList lastSessionArgument()
}
#ifdef ENABLE_CRASHPAD
bool startCrashpad(const AppInfo &appInfo, bool crashReportingEnabled)
void startCrashpad(const AppInfo &appInfo, bool crashReportingEnabled)
{
if (!crashReportingEnabled)
return;
using namespace crashpad;
// Cache directory that will store crashpad information and minidumps
@@ -445,7 +448,7 @@ bool startCrashpad(const AppInfo &appInfo, bool crashReportingEnabled)
arguments.push_back("--no-rate-limit");
CrashpadClient *client = new CrashpadClient();
bool success = client->StartHandler(
client->StartHandler(
handler,
database,
database,
@@ -453,10 +456,7 @@ bool startCrashpad(const AppInfo &appInfo, bool crashReportingEnabled)
annotations,
arguments,
/* restartable */ true,
/* asynchronous_start */ true
);
return success;
/* asynchronous_start */ true);
}
#endif