diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-04-04 18:22:27 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2018-04-04 18:22:27 +0200 |
commit | d13eca5a36b4da4aa7ff8ce9a15c092428122a79 (patch) | |
tree | 038be0d9e8e02f3dbbcb5361ee971a4a8b274f62 /synchronizer/main.cpp | |
parent | 97488acf72ed8ab0832e37bd33b7a02d0e9d4fef (diff) | |
download | sink-d13eca5a36b4da4aa7ff8ce9a15c092428122a79.tar.gz sink-d13eca5a36b4da4aa7ff8ce9a15c092428122a79.zip |
Setting the dictionary value works.
Diffstat (limited to 'synchronizer/main.cpp')
-rw-r--r-- | synchronizer/main.cpp | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/synchronizer/main.cpp b/synchronizer/main.cpp index 1a79622..d5520f2 100644 --- a/synchronizer/main.cpp +++ b/synchronizer/main.cpp | |||
@@ -230,11 +230,10 @@ int main(int argc, char *argv[]) | |||
230 | qInstallMessageHandler(qtMessageHandler); | 230 | qInstallMessageHandler(qtMessageHandler); |
231 | 231 | ||
232 | #ifdef Q_OS_OSX | 232 | #ifdef Q_OS_OSX |
233 | //Necessary to hide this QGuiApplication from the dock and application switcher on mac os. | ||
233 | if (CFBundleRef mainBundle = CFBundleGetMainBundle()) { | 234 | if (CFBundleRef mainBundle = CFBundleGetMainBundle()) { |
234 | // get the application's Info Dictionary. For app bundles this would live in the bundle's Info.plist, | 235 | // get the application's Info Dictionary. For app bundles this would live in the bundle's Info.plist, |
235 | // for regular executables it is obtained in another way. | 236 | if (CFMutableDictionaryRef infoDict = (CFMutableDictionaryRef) CFBundleGetInfoDictionary(mainBundle)) { |
236 | CFMutableDictionaryRef infoDict = (CFMutableDictionaryRef) CFBundleGetInfoDictionary(mainBundle); | ||
237 | if (infoDict) { | ||
238 | // Add or set the "LSUIElement" key with/to value "1". This can simply be a CFString. | 237 | // Add or set the "LSUIElement" key with/to value "1". This can simply be a CFString. |
239 | CFDictionarySetValue(infoDict, CFSTR("LSUIElement"), CFSTR("1")); | 238 | CFDictionarySetValue(infoDict, CFSTR("LSUIElement"), CFSTR("1")); |
240 | // That's it. We're now considered as an "agent" by the window server, and thus will have | 239 | // That's it. We're now considered as an "agent" by the window server, and thus will have |
@@ -243,10 +242,6 @@ int main(int argc, char *argv[]) | |||
243 | } | 242 | } |
244 | #endif | 243 | #endif |
245 | 244 | ||
246 | //Necessary to hide this QGuiApplication from the dock and application switcher on mac os. | ||
247 | qputenv("QT_MAC_DISABLE_FOREGROUND_APPLICATION_TRANSFORM", "true"); | ||
248 | QGuiApplication::setAttribute(Qt::AA_PluginApplication); | ||
249 | |||
250 | QGuiApplication app(argc, argv); | 245 | QGuiApplication app(argc, argv); |
251 | app.setQuitLockEnabled(false); | 246 | app.setQuitLockEnabled(false); |
252 | 247 | ||