diff --git a/src/app/qgscrashhandler.cpp b/src/app/qgscrashhandler.cpp index 1eff6d1f550..8d9a8cb0425 100644 --- a/src/app/qgscrashhandler.cpp +++ b/src/app/qgscrashhandler.cpp @@ -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" ); diff --git a/src/core/qgsfileutils.cpp b/src/core/qgsfileutils.cpp index 425fb37ffba..f9721feca4f 100644 --- a/src/core/qgsfileutils.cpp +++ b/src/core/qgsfileutils.cpp @@ -32,7 +32,7 @@ #include #endif -#ifdef MSVC +#ifdef _MSC_VER #include #include #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 ); diff --git a/src/crashhandler/main.cpp b/src/crashhandler/main.cpp index 3c4c31f33aa..a45dd34ba7d 100644 --- a/src/crashhandler/main.cpp +++ b/src/crashhandler/main.cpp @@ -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 );