[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/KDE/4.4/kdelibs/kdeui/kernel
From: Benjamin Reed <ranger () befunk ! com>
Date: 2010-03-05 17:34:51
Message-ID: 1267810491.541846.32510.nullmailer () svn ! kde ! org
[Download RAW message or body]
SVN commit 1099491 by reed:
refactor mac initialization in kuniqueapplication
M +8 -13 kuniqueapplication.cpp
--- branches/KDE/4.4/kdelibs/kdeui/kernel/kuniqueapplication.cpp #1099490:1099491
@@ -66,7 +66,7 @@
# endif
#endif
-#ifdef Q_WS_MAC
+#if defined(Q_OS_DARWIN) || defined (Q_OS_MAC)
#include <kkernel_mac.h>
#endif
@@ -117,16 +117,10 @@
s_kuniqueapplication_startCalled = true;
addCmdLineOptions(); // Make sure to add cmd line options
-#ifdef Q_WS_WIN
+#if defined(Q_WS_WIN) || defined(Q_WS_MACX)
Private::s_nofork = true;
#else
KCmdLineArgs *args = KCmdLineArgs::parsedArgs("kuniqueapp");
-#ifdef Q_WS_MACX
- // avoid focus loss caused by extra fork when launched from Finder
- if(args->isSet("psn"))
- Private::s_nofork = true;
- else
-#endif
Private::s_nofork = !args->isSet("fork");
#endif
@@ -141,14 +135,15 @@
appName.prepend(s);
}
-#ifdef Q_WS_MAC
- mac_initialize_dbus();
-#endif
-
bool forceNewProcess = Private::s_multipleInstances || flags & NonUniqueInstance;
if (Private::s_nofork)
{
+
+#if defined(Q_OS_DARWIN) || defined (Q_OS_MAC)
+ mac_initialize_dbus();
+#endif
+
QDBusConnectionInterface* dbusService = tryToInitDBusConnection();
QString pid = QString::number(getpid());
@@ -182,7 +177,7 @@
// We'll call newInstance in the constructor. Do nothing here.
return true;
-#ifdef Q_WS_MACX
+#if defined(Q_OS_DARWIN) || defined (Q_OS_MAC)
} else {
mac_fork_and_reexec_self();
#endif
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic