From 16423b268204596ace75e9b69726f659a83b5d7e Mon Sep 17 00:00:00 2001 From: RJ <122295667+Liderate@users.noreply.github.com> Date: Sun, 19 May 2024 03:15:50 -0400 Subject: [PATCH] Directly open logs and crashDumps folders from diagnostics settings (#2028) Co-authored-by: Liderate --- src/settingsdialog.ui | 2 +- src/settingsdialogdiagnostics.cpp | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/settingsdialog.ui b/src/settingsdialog.ui index 0c611ff09..84b5c343b 100644 --- a/src/settingsdialog.ui +++ b/src/settingsdialog.ui @@ -2208,7 +2208,7 @@ For the other games this is not a sufficient replacement for AI! - Hint: right click link and copy link location + Click a link to open the location diff --git a/src/settingsdialogdiagnostics.cpp b/src/settingsdialogdiagnostics.cpp index 012a33488..d9db7de15 100644 --- a/src/settingsdialogdiagnostics.cpp +++ b/src/settingsdialogdiagnostics.cpp @@ -15,15 +15,18 @@ DiagnosticsSettingsTab::DiagnosticsSettingsTab(Settings& s, SettingsDialog& d) ui->dumpsMaxEdit->setValue(settings().diagnostics().maxCoreDumps()); - QString logsPath = qApp->property("dataPath").toString() + "/" + - QString::fromStdWString(AppConfig::logPath()); + QString logsPath = QUrl::fromLocalFile(qApp->property("dataPath").toString() + "/" + + QString::fromStdWString(AppConfig::logPath())) + .toString(); ui->diagnosticsExplainedLabel->setText( ui->diagnosticsExplainedLabel->text() .replace("LOGS_FULL_PATH", logsPath) .replace("LOGS_DIR", QString::fromStdWString(AppConfig::logPath())) .replace("DUMPS_FULL_PATH", - QString::fromStdWString(OrganizerCore::getGlobalCoreDumpPath())) + QUrl::fromLocalFile( + QString::fromStdWString(OrganizerCore::getGlobalCoreDumpPath())) + .toString()) .replace("DUMPS_DIR", QString::fromStdWString(AppConfig::dumpsDir()))); }