Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
crash report dialog:
* get current context without an exception (eg. Ctrl+\)
* use <pre> around stack
* make report details expandable
* what about threads?
- Loading branch information
|
@@ -66,6 +66,7 @@ QString QgsCrashDialog::htmlToMarkdown( const QString &html ) |
|
|
markdown.replace( "<br>", "\n" ); |
|
|
markdown.replace( "<b>", "*" ); |
|
|
markdown.replace( "</b>", "*" ); |
|
|
markdown.replace( "QGIS code revision: ", "QGIS code revision: commit:"); |
|
|
return markdown; |
|
|
} |
|
|
|
|
@@ -48,15 +48,18 @@ const QString QgsCrashReport::toHtml() const |
|
|
} |
|
|
else |
|
|
{ |
|
|
reportData.append( "<pre>" ); |
|
|
Q_FOREACH ( const QgsStackTrace::StackLine &line, mStackTrace ) |
|
|
{ |
|
|
QFileInfo fileInfo( line.fileName ); |
|
|
QString filename( fileInfo.fileName() ); |
|
|
reportData.append( QString( "(%1) %2 %3:%4" ).arg( line.moduleName, line.symbolName, filename, line.lineNumber ) ); |
|
|
} |
|
|
reportData.append( "</pre>" ); |
|
|
} |
|
|
} |
|
|
|
|
|
#if 0 |
|
|
if ( flags().testFlag( QgsCrashReport::Plugins ) ) |
|
|
{ |
|
|
reportData.append( "<br>" ); |
|
@@ -70,6 +73,7 @@ const QString QgsCrashReport::toHtml() const |
|
|
reportData.append( "<b>Project Info</b>" ); |
|
|
// TODO Get project details |
|
|
} |
|
|
#endif |
|
|
|
|
|
if ( flags().testFlag( QgsCrashReport::QgisInfo ) ) |
|
|
{ |
|
|
|
@@ -53,7 +53,12 @@ QVector<QgsStackTrace::StackLine> QgsStackTrace::trace( _EXCEPTION_POINTERS *Exc |
|
|
|
|
|
// StackWalk64() may modify context record passed to it, so we will |
|
|
// use a copy. |
|
|
CONTEXT context_record = *ExceptionInfo->ContextRecord; |
|
|
CONTEXT context_record; |
|
|
if (ExceptionInfo) |
|
|
context_record = *ExceptionInfo->ContextRecord; |
|
|
else |
|
|
RtlCaptureContext(&context_record); |
|
|
|
|
|
// Initialize stack walking. |
|
|
STACKFRAME64 stack_frame; |
|
|
memset( &stack_frame, 0, sizeof( stack_frame ) ); |
|
@@ -133,7 +138,6 @@ QVector<QgsStackTrace::StackLine> QgsStackTrace::trace( _EXCEPTION_POINTERS *Exc |
|
|
qgsFree( module ); |
|
|
SymCleanup( process ); |
|
|
return stack; |
|
|
|
|
|
} |
|
|
|
|
|
QString QgsStackTrace::mSymbolPaths; |
|
|
|
@@ -536,14 +536,14 @@ |
|
|
</property> |
|
|
</widget> |
|
|
</item> |
|
|
<item row="6" column="0" colspan="3"> |
|
|
<item row="3" column="1"> |
|
|
<spacer name="verticalSpacer"> |
|
|
<property name="orientation"> |
|
|
<enum>Qt::Vertical</enum> |
|
|
</property> |
|
|
<property name="sizeHint" stdset="0"> |
|
|
<size> |
|
|
<width>20</width> |
|
|
<width>0</width> |
|
|
<height>0</height> |
|
|
</size> |
|
|
</property> |
|
|
You can’t perform that action at this time.
You signed in with another tab or window. Reload to refresh your session.
You signed out in another tab or window. Reload to refresh your session.