diff options
| author | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-18 12:55:32 -0600 |
|---|---|---|
| committer | SulfurNitride <SulfurNitride@users.noreply.github.com> | 2026-02-18 12:55:32 -0600 |
| commit | 6d70b7fa6a9cdf8ea59c7aa98f92249c5a4e0060 (patch) | |
| tree | 8f791632faa27d59ddb9fe075255f13ca466772d /libs/installer_fomod_plus/installer/ui/UIHelper.cpp | |
| parent | 7e13a388ba568b964663f55c06bbee5818e96655 (diff) | |
Fix fomod-plus image loading and settings file location on Linux
Normalize Windows backslashes in fomod image paths so images like
"fomod\MCM.png" resolve correctly on Linux.
Move fomod-plus-settings.ini from QDir::currentPath() (home directory)
to QStandardPaths::AppConfigLocation (Flatpak sandbox config dir).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Diffstat (limited to 'libs/installer_fomod_plus/installer/ui/UIHelper.cpp')
| -rw-r--r-- | libs/installer_fomod_plus/installer/ui/UIHelper.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/installer_fomod_plus/installer/ui/UIHelper.cpp b/libs/installer_fomod_plus/installer/ui/UIHelper.cpp index 2312fd1..56aff85 100644 --- a/libs/installer_fomod_plus/installer/ui/UIHelper.cpp +++ b/libs/installer_fomod_plus/installer/ui/UIHelper.cpp @@ -61,7 +61,10 @@ QLabel* UIHelper::createHyperlink(const QString& url, QWidget* parent = nullptr) QString UIHelper::getFullImagePath(const QString& fomodPath, const QString& imagePath) { - return QDir::tempPath() + "/" + fomodPath + "/" + imagePath; + // Fomod XMLs may use Windows backslashes in image paths (e.g. "fomod\MCM.png") + QString normalized = imagePath; + normalized.replace('\\', '/'); + return QDir::tempPath() + "/" + fomodPath + "/" + normalized; } void UIHelper::setGlobalAlignment(QBoxLayout* layout, const Qt::Alignment alignment) |
