summaryrefslogtreecommitdiffstats
path: root/applications
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2018-03-18 18:16:17 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2018-03-18 18:16:38 +0100
commit2ab02d829c772bf34610cd7a1dc7937a64012eaa (patch)
tree9e544b62fef96b0bf239feb68c135c9ea03a2457 /applications
parentfb8c18b8f86bca090a52fee08cd25116fe66ebb5 (diff)
downloadkube-2ab02d829c772bf34610cd7a1dc7937a64012eaa.tar.gz
kube-2ab02d829c772bf34610cd7a1dc7937a64012eaa.zip
Find icons on Mac OS
Diffstat (limited to 'applications')
-rw-r--r--applications/kube/main.cpp14
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();