Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHannah von Reth <hannah.vonreth@owncloud.com>2021-03-04 13:27:41 +0300
committerHannah von Reth <vonreth@kde.org>2021-03-04 17:47:49 +0300
commit177cbeff6ae987aed622c40c3d2f04366b275001 (patch)
tree397d248a5a2573151fb87d8c330ffd3bab1aa0ab /src/crashreporter
parent27c2b4bd0be05951662af5bde3a674b12cea1b8d (diff)
Send crash log as comment
Diffstat (limited to 'src/crashreporter')
-rw-r--r--src/crashreporter/main.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/crashreporter/main.cpp b/src/crashreporter/main.cpp
index 7d647426f..9d057e05a 100644
--- a/src/crashreporter/main.cpp
+++ b/src/crashreporter/main.cpp
@@ -18,7 +18,9 @@
#include <libcrashreporter-gui/CrashReporter.h>
#include <QApplication>
+#include <QDir>
#include <QDebug>
+#include <QFileInfo>
int main(int argc, char *argv[])
{
@@ -52,6 +54,14 @@ int main(int argc, char *argv[])
reporter.setWindowTitle(CRASHREPORTER_PRODUCT_NAME);
reporter.setText("<html><head/><body><p><span style=\" font-weight:600;\">Sorry!</span> " CRASHREPORTER_PRODUCT_NAME " crashed. Please tell us about it! " CRASHREPORTER_PRODUCT_NAME " has created an error report for you that can help improve the stability in the future. You can now send this report directly to the " CRASHREPORTER_PRODUCT_NAME " developers.</p></body></html>");
+ const QFileInfo crashLog(QDir::tempPath() + QStringLiteral("/" CRASHREPORTER_PRODUCT_NAME "-crash.log"));
+ if (crashLog.exists()) {
+ QFile inFile(crashLog.filePath());
+ if (inFile.open(QFile::ReadOnly)) {
+ reporter.setComment(inFile.readAll());
+ }
+ }
+
reporter.setReportData("BuildID", CRASHREPORTER_BUILD_ID);
reporter.setReportData("ProductName", CRASHREPORTER_PRODUCT_NAME);
reporter.setReportData("Version", CRASHREPORTER_VERSION_STRING);