Skip to content

Commit

Permalink
Directly open logs and crashDumps folders from diagnostics settings
Browse files Browse the repository at this point in the history
  • Loading branch information
Liderate committed May 19, 2024
1 parent 5adb1ec commit 04e29bc
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/settingsdialog.ui
Original file line number Diff line number Diff line change
Expand Up @@ -2208,7 +2208,7 @@ For the other games this is not a sufficient replacement for AI!</string>
<item>
<widget class="LinkLabel" name="diagnosticsExplainedLabel">
<property name="toolTip">
<string>Hint: right click link and copy link location</string>
<string>Click a link to open the location</string>
</property>
<property name="text">
<string>
Expand Down
6 changes: 3 additions & 3 deletions src/settingsdialogdiagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ 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())));
}

Expand Down

0 comments on commit 04e29bc

Please sign in to comment.