Skip to content

Commit

Permalink
UI cleanup for crash dialog
Browse files Browse the repository at this point in the history
  • Loading branch information
NathanW2 committed Apr 23, 2017
1 parent 716ff6c commit c86264e
Show file tree
Hide file tree
Showing 3 changed files with 77 additions and 52 deletions.
4 changes: 2 additions & 2 deletions src/app/qgscrashdialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ QgsCrashDialog::QgsCrashDialog( QWidget *parent )
mCrashMessage->setText( tr( "Sorry. It looks something unexpected happened that we didn't handle and QGIS crashed." ) );
connect( mCopyReportButton, &QPushButton::clicked, this, &QgsCrashDialog::createBugReport );

mHelpLabel->setText( tr( "Keen to help us fix bugs?"
mHelpLabel->setText( tr( "Keen to help us fix bugs? "
"<a href=\"http://qgis.org/en/site/getinvolved/development/bugreporting.html#bugs-features-and-issues\">Follow the steps to help our developers.</a>"
"<br><br>"
"You can also send us a helpful bug report using the Copy Report button and opening a ticket at "
"You can also send us a helpful bug report using the Copy Report button <br>and opening a ticket at "
"<a href=\"http://hub.qgis.org/\">hub.qgis.org</a>" ) );
mHelpLabel->setTextInteractionFlags( Qt::TextBrowserInteraction );
mHelpLabel->setOpenExternalLinks( true );
Expand Down
5 changes: 2 additions & 3 deletions src/app/qgscrashreport.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -128,15 +128,14 @@ const QString QgsCrashReport::crashID() const
{
QFileInfo fileInfo( line.fileName );
QString filename( fileInfo.fileName() );
data += line.moduleName + line.symbolName + line.lineNumber + filename;
data += line.symbolName;
}

if ( data.isNull() )
return "ID not generated due to missing information";

QString hash = QString( QCryptographicHash::hash( data.toAscii(), QCryptographicHash::Sha1 ).toHex() );
return hash + " ||data(" + data + ")";

return hash;
}

bool QgsCrashReport::StackLine::isQgisModule() const
Expand Down
120 changes: 73 additions & 47 deletions src/ui/qgscrashdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
<rect>
<x>0</x>
<y>0</y>
<width>518</width>
<height>481</height>
<width>583</width>
<height>644</height>
</rect>
</property>
<property name="palette">
Expand Down Expand Up @@ -492,20 +492,25 @@
</item>
<item row="3" column="0" colspan="3">
<widget class="QPlainTextEdit" name="mReportDetailsText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
</widget>
</item>
<item row="0" column="2">
<widget class="QPushButton" name="mCopyReportButton">
<property name="text">
<string>Copy Report</string>
</property>
</widget>
</item>
<item row="1" column="0" colspan="3">
<widget class="QPlainTextEdit" name="mUserFeedbackText">
<property name="sizePolicy">
<sizepolicy hsizetype="Expanding" vsizetype="Preferred">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="verticalScrollBarPolicy">
<enum>Qt::ScrollBarAlwaysOn</enum>
</property>
Expand All @@ -517,58 +522,36 @@
</property>
</widget>
</item>
<item row="0" column="0">
<item row="0" column="2">
<widget class="QPushButton" name="mCopyReportButton">
<property name="text">
<string>Copy Report</string>
</property>
</widget>
</item>
<item row="0" column="0" colspan="2">
<widget class="QLabel" name="label">
<property name="text">
<string>Tell us something about when you got the crash</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item row="2" column="0">
<item row="2" column="0" colspan="2">
<widget class="QLabel" name="label_3">
<property name="text">
<string>Report Details</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
</layout>
</widget>
</item>
<item row="2" column="0">
<spacer name="verticalSpacer">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
</size>
</property>
</spacer>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="maximumSize">
<size>
<width>150</width>
<height>150</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../images/images.qrc">:/images/icons/qgis_icon.svg</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
<item row="0" column="1" colspan="2">
<layout class="QVBoxLayout" name="verticalLayout">
<item>
Expand All @@ -588,10 +571,19 @@
<property name="text">
<string>Header</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<widget class="QLabel" name="mCrashMessage">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Message</string>
</property>
Expand All @@ -602,26 +594,60 @@
</item>
<item>
<widget class="QLabel" name="mHelpLabel">
<property name="sizePolicy">
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
<horstretch>0</horstretch>
<verstretch>0</verstretch>
</sizepolicy>
</property>
<property name="text">
<string>Help Message</string>
</property>
<property name="wordWrap">
<bool>true</bool>
</property>
</widget>
</item>
<item>
<spacer name="verticalSpacer_3">
<property name="orientation">
<enum>Qt::Vertical</enum>
</property>
<property name="sizeType">
<enum>QSizePolicy::Preferred</enum>
</property>
<property name="sizeHint" stdset="0">
<size>
<width>20</width>
<height>40</height>
<height>20</height>
</size>
</property>
</spacer>
</item>
</layout>
</item>
<item row="0" column="0">
<widget class="QLabel" name="label_2">
<property name="maximumSize">
<size>
<width>150</width>
<height>150</height>
</size>
</property>
<property name="text">
<string/>
</property>
<property name="pixmap">
<pixmap resource="../../images/images.qrc">:/images/icons/qgis_icon.svg</pixmap>
</property>
<property name="scaledContents">
<bool>true</bool>
</property>
<property name="alignment">
<set>Qt::AlignCenter</set>
</property>
</widget>
</item>
</layout>
</widget>
<resources>
Expand Down

0 comments on commit c86264e

Please sign in to comment.