Skip to content

Commit

Permalink
Add a default message in crash reports
Browse files Browse the repository at this point in the history
This message contains the OMEdit/OMC version, the OS, and the CPU
architecture.
  • Loading branch information
sjoelund committed Dec 8, 2016
1 parent 8e2082b commit 21c9c6d
Showing 1 changed file with 15 additions and 3 deletions.
18 changes: 15 additions & 3 deletions OMEdit/OMEditGUI/CrashReport/CrashReportDialog.cpp
Expand Up @@ -33,6 +33,7 @@

#include "CrashReportDialog.h"
#include "Util/Helper.h"
#include "omc_config.h"

#include <QGridLayout>
#include <QMessageBox>
Expand All @@ -58,9 +59,20 @@ CrashReportDialog::CrashReportDialog()
mpEmailTextBox = new QLineEdit;
// bug description label and textbox
mpBugDescriptionLabel = new Label(tr("Describe in a few words what you were doing when the error occurred:"));
mpBugDescriptionTextBox = new QPlainTextEdit;
mpBugDescriptionTextBox = new QPlainTextEdit(
QString("OMEdit %1 connected to OMC %2.\nMy OS is %3 and CPU architecture is %4.\n").arg(GIT_SHA).arg(Helper::OpenModelicaVersion).arg(
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
QSysInfo::prettyProductName(),
QSysInfo::currentCpuArchitecture()
#elif defined(__APPLE__)
"OSX", "unknown (probably amd64)"
#else
"unknown", "unknown"
#endif
)
);
// files label and checkboxes
mpFilesDescriptionLabel = new Label(tr("Following selected files will be sent alongwith the crash report,"));
mpFilesDescriptionLabel = new Label(tr("Following selected files will be sent along with the crash report,"));
QString& tmpPath = Utilities::tempDirectory();
// omeditcommunication.log file checkbox
QFileInfo OMEditCommunicationLogFileInfo(QString("%1omeditcommunication.log").arg(tmpPath));
Expand Down Expand Up @@ -129,7 +141,7 @@ CrashReportDialog::CrashReportDialog()
/*!
* \brief CrashReportDialog::sendReport
* Slot activated when mpSendReportButton clicked signal is raised.\n
* Sends the crash report alongwith selected log files.
* Sends the crash report along with selected log files.
*/
void CrashReportDialog::sendReport()
{
Expand Down

0 comments on commit 21c9c6d

Please sign in to comment.