From 5ed9efb3b60ebd484495adf2c7b9dc08c3a0b248 Mon Sep 17 00:00:00 2001 From: "Juergen E. Fischer" Date: Sat, 20 Jul 2019 02:15:54 +0200 Subject: [PATCH] osgeo4w: support separate symstores --- src/app/qgisapp.cpp | 7 +++++++ src/app/qgscrashhandler.cpp | 17 ++++++++--------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/app/qgisapp.cpp b/src/app/qgisapp.cpp index d6e63ee68e6..451c819e116 100644 --- a/src/app/qgisapp.cpp +++ b/src/app/qgisapp.cpp @@ -13457,6 +13457,13 @@ void QgisApp::keyPressEvent( QKeyEvent *e ) // QgsDebugMsg( QStringLiteral( "%1 (keypress received)" ).arg( e->text() ) ); emit keyPressed( e ); +#if 0 && defined(_MSC_VER) && defined(QGISDEBUG) + if ( e->key() == Qt::Key_Backslash && e->modifiers() == Qt::ControlModifier ) + { + QgsCrashHandler::handle( 0 ); + } +#endif + //cancel rendering progress with esc key if ( e->key() == Qt::Key_Escape ) { diff --git a/src/app/qgscrashhandler.cpp b/src/app/qgscrashhandler.cpp index 86f6bf2de70..bf0b14d31eb 100644 --- a/src/app/qgscrashhandler.cpp +++ b/src/app/qgscrashhandler.cpp @@ -39,20 +39,19 @@ LONG WINAPI QgsCrashHandler::handle( LPEXCEPTION_POINTERS exception ) QString symbolPath; if ( !QgsApplication::isRunningFromBuildDir() ) { - symbolPath = getenv( "QGIS_PREFIX_PATH" ); - symbolPath = symbolPath + "\\pdb;http://msdl.microsoft.com/download/symbols;http://download.osgeo.org/osgeo4w/symstore"; + symbolPath = QStringLiteral( "%1\\pdb;http://msdl.microsoft.com/download/symbols;http://download.osgeo.org/osgeo4w/%2/symstores/%3" ) + .arg( getenv( "QGIS_PREFIX_PATH" ) ) + .arg( QSysInfo::WordSize == 64 ? QStringLiteral( "x86_64" ) : QStringLiteral( "x86" ) ) + .arg( QFileInfo( getenv( "QGIS_PREFIX_PATH" ) ).baseName() ); } else { - QString pdbPath = getenv( "QGIS_PDB_PATH" ); - QString appPath = QgsApplication::applicationDirPath(); - symbolPath += QString( "%1;%2;http://msdl.microsoft.com/download/symbols;http://download.osgeo.org/osgeo4w/symstore" ) - .arg( appPath ) - .arg( pdbPath ); + symbolPath = QStringLiteral( "%1;%2;http://msdl.microsoft.com/download/symbols" ) + .arg( getenv( "QGIS_PDB_PATH" ) ) + .arg( QgsApplication::applicationDirPath() ); } - QString ptrStr = QString( "0x%1" ).arg( ( quintptr )exception, - QT_POINTER_SIZE * 2, 16, QChar( '0' ) ); + QString ptrStr = QString( "0x%1" ).arg( ( quintptr )exception, QT_POINTER_SIZE * 2, 16, QChar( '0' ) ); QString fileName = QStandardPaths::standardLocations( QStandardPaths::TempLocation ).at( 0 ) + "/qgis-crash-info-" + QString::number( processID ); QgsDebugMsg( fileName );