cleaned up crashpad code
This commit is contained in:
@@ -71,12 +71,7 @@ bool LinuxExceptionHandler(int, siginfo_t*, ucontext_t*)
|
||||
|
||||
bool InitializeCrashpad()
|
||||
{
|
||||
QString handler_fn = QStringLiteral("crashpad_handler");;
|
||||
|
||||
// Determine filename of handler from platform
|
||||
#ifdef OS_WIN
|
||||
handler_fn.append(QStringLiteral(".exe"));
|
||||
#endif
|
||||
QString handler_fn = olive::FileFunctions::GetFormattedExecutableForPlatform(QStringLiteral("crashpad_handler"));
|
||||
|
||||
// Generate absolute path
|
||||
QString handler_abs_path = QDir(QCoreApplication::applicationDirPath()).filePath(handler_fn);
|
||||
|
||||
@@ -240,4 +240,13 @@ bool FileFunctions::RenameFileAllowOverwrite(const QString &from, const QString
|
||||
return true;
|
||||
}
|
||||
|
||||
QString FileFunctions::GetFormattedExecutableForPlatform(QString unformatted)
|
||||
{
|
||||
#ifdef Q_OS_WINDOWS
|
||||
unformatted.append(QStringLiteral(".exe"));
|
||||
#endif
|
||||
|
||||
return unformatted;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -84,6 +84,8 @@ public:
|
||||
*/
|
||||
static bool RenameFileAllowOverwrite(const QString& from, const QString& to);
|
||||
|
||||
static QString GetFormattedExecutableForPlatform(QString unformatted);
|
||||
|
||||
};
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user