From 0905bf057693f67dd9188729754087eb9e4179f2 Mon Sep 17 00:00:00 2001 From: Hannah von Reth Date: Fri, 7 Jul 2023 12:28:06 +0200 Subject: [PATCH] Apply common settings on crash reporter --- src/crashreporter/CMakeLists.txt | 1 + src/crashreporter/main.cpp | 17 ++++++++--------- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/crashreporter/CMakeLists.txt b/src/crashreporter/CMakeLists.txt index bfb179fa990..8af1ef26a8d 100644 --- a/src/crashreporter/CMakeLists.txt +++ b/src/crashreporter/CMakeLists.txt @@ -38,6 +38,7 @@ add_executable(${CRASHREPORTER_EXECUTABLE} ${crashreporter_UI_HEADERS} ${crashreporter_RC} ) +apply_common_target_settings(${CRASHREPORTER_EXECUTABLE}) # This is a GUI Application without its own bundle set_target_properties(${CRASHREPORTER_EXECUTABLE} diff --git a/src/crashreporter/main.cpp b/src/crashreporter/main.cpp index 9d057e05a88..0d58845b344 100644 --- a/src/crashreporter/main.cpp +++ b/src/crashreporter/main.cpp @@ -24,10 +24,6 @@ int main(int argc, char *argv[]) { - QCoreApplication::setAttribute(Qt::AA_UseHighDpiPixmaps, true); -#ifdef Q_OS_WIN - QCoreApplication::setAttribute(Qt::AA_EnableHighDpiScaling, true); -#endif // !Q_OS_WIN QApplication app(argc, argv); #ifdef Q_OS_WIN @@ -46,19 +42,22 @@ int main(int argc, char *argv[]) } // TODO: install socorro .... - CrashReporter reporter(QUrl(CRASHREPORTER_SUBMIT_URL), app.arguments()); + CrashReporter reporter(QUrl(QStringLiteral(CRASHREPORTER_SUBMIT_URL)), app.arguments()); #ifdef CRASHREPORTER_ICON - reporter.setLogo(QPixmap(CRASHREPORTER_ICON)); + reporter.setLogo(QPixmap(QStringLiteral(CRASHREPORTER_ICON))); #endif - reporter.setWindowTitle(CRASHREPORTER_PRODUCT_NAME); - reporter.setText("

Sorry! " 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.

"); + reporter.setWindowTitle(QStringLiteral(CRASHREPORTER_PRODUCT_NAME)); + reporter.setText(QStringLiteral("

Sorry! " 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.

")); 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.setComment(QString::fromUtf8(inFile.readAll())); } }