|
110 | 110 | // QGIS Specific Includes |
111 | 111 | // |
112 | 112 |
|
| 113 | +#include "qgscrashdialog.h" |
113 | 114 | #include "qgisapp.h" |
114 | 115 | #include "qgisappinterface.h" |
115 | 116 | #include "qgisappstylesheet.h" |
@@ -4724,6 +4725,8 @@ void QgisApp::fileExit() |
4724 | 4725 |
|
4725 | 4726 | void QgisApp::fileNew() |
4726 | 4727 | { |
| 4728 | + QgsRuntimeProfiler *profile; |
| 4729 | + profile->clear(); |
4727 | 4730 | fileNew( true ); // prompts whether to save project |
4728 | 4731 | } // fileNew() |
4729 | 4732 |
|
@@ -12505,6 +12508,9 @@ void QgisApp::transactionGroupCommitError( const QString &error ) |
12505 | 12508 | #ifdef Q_OS_WIN |
12506 | 12509 | LONG WINAPI QgisApp::qgisCrashDump( struct _EXCEPTION_POINTERS *ExceptionInfo ) |
12507 | 12510 | { |
| 12511 | + // Crash dump creation will be move to a new class in the near future. |
| 12512 | + |
| 12513 | +#if 0 |
12508 | 12514 | QString dumpName = QDir::toNativeSeparators( |
12509 | 12515 | QString( "%1\\qgis-%2-%3-%4-%5.dmp" ) |
12510 | 12516 | .arg( QDir::tempPath() ) |
@@ -12538,8 +12544,18 @@ LONG WINAPI QgisApp::qgisCrashDump( struct _EXCEPTION_POINTERS *ExceptionInfo ) |
12538 | 12544 | { |
12539 | 12545 | msg = QObject::tr( "creation of minidump to %1 failed (%2)" ).arg( dumpName ).arg( GetLastError(), 0, 16 ); |
12540 | 12546 | } |
| 12547 | +#endif |
12541 | 12548 |
|
12542 | | - QMessageBox::critical( 0, QObject::tr( "Crash dumped" ), msg ); |
| 12549 | + QgsCrashDialog dlg( QApplication::activeWindow() ); |
| 12550 | + if ( dlg.exec() ) |
| 12551 | + { |
| 12552 | + QStringList arguments; |
| 12553 | + arguments = QCoreApplication::arguments(); |
| 12554 | + QString path = arguments.at( 0 ); |
| 12555 | + arguments.removeFirst(); |
| 12556 | + arguments << QgsProject::instance()->fileName(); |
| 12557 | + QProcess::startDetached( path, arguments, QDir::toNativeSeparators( QCoreApplication::applicationDirPath() ) ); |
| 12558 | + } |
12543 | 12559 |
|
12544 | 12560 | return EXCEPTION_EXECUTE_HANDLER; |
12545 | 12561 | } |
|
0 commit comments