From 79bc70074366a1cbc28b987ba2b74fd5927c29e1 Mon Sep 17 00:00:00 2001 From: James Upjohn Date: Sun, 21 Mar 2021 01:40:50 +1300 Subject: [PATCH] Fix app data dir not opening on macOS when "Open AppData" button pressed (#2537) --- CHANGELOG.md | 1 + src/widgets/settingspages/GeneralPage.cpp | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e38534371..5de900cd4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -81,6 +81,7 @@ - Bugfix: Fixed hidden tooltips when always on top is active (#2384) - Bugfix: Fix CLI arguments (`--help`, `--version`, `--channels`) not being respected (#2368, #2190) - Bugfix: Fix Twitch cheer emotes not displaying tooltips when hovered (#2434) +- Bugfix: Fix directory not opening when clicking "Open AppData Directory" setting button on macOS (#2531, #2537) - Dev: Updated minimum required Qt framework version to 5.12. (#2210) - Dev: Migrated `Kraken::getUser` to Helix (#2260) - Dev: Migrated `TwitchAccount::(un)followUser` from Kraken to Helix and moved it to `Helix::(un)followUser`. (#2306) diff --git a/src/widgets/settingspages/GeneralPage.cpp b/src/widgets/settingspages/GeneralPage.cpp index 81dd09c40..1e55b238f 100644 --- a/src/widgets/settingspages/GeneralPage.cpp +++ b/src/widgets/settingspages/GeneralPage.cpp @@ -455,7 +455,11 @@ void GeneralPage::initLayout(GeneralPageView &layout) layout.addDescription("All local files like settings and cache files are " "store in this directory."); layout.addButton("Open AppData directory", [] { +#ifdef Q_OS_DARWIN + QDesktopServices::openUrl("file://" + getPaths()->rootAppDataDirectory); +#else QDesktopServices::openUrl(getPaths()->rootAppDataDirectory); +#endif }); layout.addSubtitle("Temporary files (Cache)");