diff options
-rw-r--r-- | applications/kube/main.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/applications/kube/main.cpp b/applications/kube/main.cpp index 6cb1f769..61521af5 100644 --- a/applications/kube/main.cpp +++ b/applications/kube/main.cpp | |||
@@ -40,6 +40,8 @@ | |||
40 | #include <QDebug> | 40 | #include <QDebug> |
41 | #include <QTimer> | 41 | #include <QTimer> |
42 | #include <QQmlContext> | 42 | #include <QQmlContext> |
43 | #include <QIcon> | ||
44 | #include <QStandardPaths> | ||
43 | #include <sink/store.h> | 45 | #include <sink/store.h> |
44 | 46 | ||
45 | #include "framework/src/keyring.h" | 47 | #include "framework/src/keyring.h" |
@@ -158,6 +160,18 @@ int main(int argc, char *argv[]) | |||
158 | app.setApplicationVersion(kube_VERSION_STRING); | 160 | app.setApplicationVersion(kube_VERSION_STRING); |
159 | app.setFont(QFont{"Noto Sans", app.font().pointSize(), QFont::Normal}); | 161 | app.setFont(QFont{"Noto Sans", app.font().pointSize(), QFont::Normal}); |
160 | 162 | ||
163 | //On Mac OS we want to incluee Contents/Resources/icons in the bundle, and that path is in AppDataLocations. | ||
164 | QStringList iconSearchPaths; | ||
165 | for (const auto &p : QStandardPaths::standardLocations(QStandardPaths::AppDataLocation)) { | ||
166 | auto iconPath = p + "/icons/"; | ||
167 | //I'm getting broken paths reported from standardLocations | ||
168 | if (iconPath.contains("kube.appContents")) { | ||
169 | iconPath.replace("kube.appContents", "kube.app/Contents"); | ||
170 | } | ||
171 | iconSearchPaths << iconPath; | ||
172 | } | ||
173 | QIcon::setThemeSearchPaths(iconSearchPaths); | ||
174 | |||
161 | QCommandLineParser parser; | 175 | QCommandLineParser parser; |
162 | parser.setApplicationDescription("A communication and collaboration client."); | 176 | parser.setApplicationDescription("A communication and collaboration client."); |
163 | parser.addHelpOption(); | 177 | parser.addHelpOption(); |