Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open logs and crashDumps folders from diagnostics settings #2028

Merged
merged 1 commit into from
May 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
9 changes: 6 additions & 3 deletions src/settingsdialogdiagnostics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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())));
}

Expand Down
Loading