mirror of
https://github.com/qgis/QGIS.git
synced 2025-02-25 00:58:06 -05:00
Fix #ifdef MSVC conditions leading to missing information in crash report
Fixes #50472
This commit is contained in:
parent
7588ce429f
commit
f0df4949d3
@ -116,7 +116,7 @@ void QgsCrashHandler::handleCrash( int processID, int threadID,
|
||||
args << fileName;
|
||||
|
||||
QString prefixPath( getenv( "QGIS_PREFIX_PATH" ) ? getenv( "QGIS_PREFIX_PATH" ) : QApplication::applicationDirPath() );
|
||||
#ifdef MSVC
|
||||
#ifdef _MSC_VER
|
||||
QString path = prefixPath + QStringLiteral( "/qgiscrashhandler.exe" );
|
||||
#else
|
||||
QString path = prefixPath + QStringLiteral( "/qgiscrashhandler" );
|
||||
|
@ -32,7 +32,7 @@
|
||||
#include <sys/time.h>
|
||||
#endif
|
||||
|
||||
#ifdef MSVC
|
||||
#ifdef _MSC_VER
|
||||
#include <Windows.h>
|
||||
#include <ShlObj.h>
|
||||
#pragma comment(lib,"Shell32.lib")
|
||||
@ -280,7 +280,7 @@ QStringList QgsFileUtils::findFile( const QString &file, const QString &basePath
|
||||
return foundFiles;
|
||||
}
|
||||
|
||||
#ifdef MSVC
|
||||
#ifdef _MSC_VER
|
||||
std::unique_ptr< wchar_t[] > pathToWChar( const QString &path )
|
||||
{
|
||||
const QString nativePath = QDir::toNativeSeparators( path );
|
||||
@ -294,7 +294,7 @@ std::unique_ptr< wchar_t[] > pathToWChar( const QString &path )
|
||||
|
||||
Qgis::DriveType QgsFileUtils::driveType( const QString &path )
|
||||
{
|
||||
#ifdef MSVC
|
||||
#ifdef _MSC_VER
|
||||
auto pathType = [ = ]( const QString & path ) -> DriveType
|
||||
{
|
||||
std::unique_ptr< wchar_t[] > pathArray = pathToWChar( path );
|
||||
|
@ -68,7 +68,7 @@ int main( int argc, char *argv[] )
|
||||
versionInfo = info.split( "\n" );
|
||||
}
|
||||
|
||||
#ifdef MSVC
|
||||
#ifdef _MSC_VER
|
||||
DWORD processId;
|
||||
DWORD threadId;
|
||||
LPEXCEPTION_POINTERS exception;
|
||||
@ -86,7 +86,7 @@ int main( int argc, char *argv[] )
|
||||
|
||||
QgsCrashReport report;
|
||||
report.setVersionInfo( versionInfo );
|
||||
#ifdef MSVC
|
||||
#ifdef _MSC_VER
|
||||
report.setStackTrace( stackTrace.get() );
|
||||
#endif
|
||||
report.setPythonCrashLogFilePath( pythonCrashLogFile );
|
||||
@ -101,7 +101,7 @@ int main( int argc, char *argv[] )
|
||||
QApplication::exec();
|
||||
|
||||
|
||||
#ifdef MSVC
|
||||
#ifdef _MSC_VER
|
||||
for ( HANDLE threadHandle : stackTrace->threads )
|
||||
{
|
||||
ResumeThread( threadHandle );
|
||||
|
Loading…
x
Reference in New Issue
Block a user