[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    KDE/kdelibs/kdeui/kernel
From:       Benjamin Reed <ranger () befunk ! com>
Date:       2010-03-05 17:35:35
Message-ID: 1267810535.870915.32614.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 1099492 by reed:

merge 1099491 from 4.4: refactor mac initialization in kuniqueapplication

 M  +8 -13     kuniqueapplication.cpp  


--- trunk/KDE/kdelibs/kdeui/kernel/kuniqueapplication.cpp #1099491:1099492
@@ -66,7 +66,7 @@
 #  endif
 #endif
 
-#ifdef Q_WS_MAC
+#if defined(Q_OS_DARWIN) || defined (Q_OS_MAC)
 #include <kkernel_mac.h>
 #endif
 
@@ -116,16 +116,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
 
@@ -140,14 +134,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());
@@ -178,7 +173,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