All pastes #1622041 Raw Edit

Someone

public diff v1 · immutable
#1622041 ·published 2009-10-15 13:10 UTC
rendered paste body
Index: kdelibs-4.3.2/kinit/kinit.cpp===================================================================--- kdelibs-4.3.2.orig/kinit/kinit.cpp	2009-10-15 13:54:48.000000000 +0200+++ kdelibs-4.3.2/kinit/kinit.cpp	2009-10-15 13:55:36.000000000 +0200@@ -489,6 +489,13 @@       init_startup_info( startup_id, name, envc, envs ); #endif +  // Don't run this inside the child process, it crashes on OS X+  const QByteArray docPath = QFile::encodeName(KGlobalSettings::documentPath());+#ifdef Q_WS_MAC+  const QString bundlepath = s_instance->dirs()->findExe(QFile::decodeName(execpath));+  const QString argvexe = s_instance->dirs()->findExe(QString::fromLatin1(_name));+#endif+   d.errorMsg = 0;   d.fork = fork();   switch(d.fork) {@@ -513,7 +520,6 @@      if (cwd && *cwd) {          (void)chdir(cwd);      } else {-         const QByteArray docPath = QFile::encodeName(KGlobalSettings::documentPath());          (void)chdir(docPath.constData());      } @@ -552,7 +558,6 @@        d.argv = (char **) malloc(sizeof(char *) * (argc+1));        d.argv[0] = (char *) _name; #ifdef Q_WS_MAC-       QString argvexe = s_instance->dirs()->findExe(QString::fromLatin1(d.argv[0]));        if (!argvexe.isEmpty()) {           QByteArray cstr = argvexe.toLocal8Bit();           kDebug(7016) << "kdeinit4: launch() setting argv: " << cstr.data();@@ -590,9 +595,12 @@         exitWithErrorMsg(errorMsg);      } -+#ifdef Q_WS_MAC+     libpath.truncate(0);+#else      if ( !qgetenv("KDE_IS_PRELINKED").isEmpty() && !execpath.isEmpty())          libpath.truncate(0);+#endif       QLibrary l(libpath); @@ -628,7 +636,6 @@          QByteArray executable = execpath; #ifdef Q_WS_MAC-        QString bundlepath = s_instance->dirs()->findExe(QFile::decodeName(executable));         if (!bundlepath.isEmpty())            executable = QFile::encodeName(bundlepath); #endifIndex: kdelibs-4.3.2/kinit/klauncher.cpp===================================================================--- kdelibs-4.3.2.orig/kinit/klauncher.cpp	2009-10-15 13:54:48.000000000 +0200+++ kdelibs-4.3.2/kinit/klauncher.cpp	2009-10-15 14:01:39.000000000 +0200@@ -1144,6 +1144,12 @@     kDebug(7016) << "KLauncher: launching new slave " << name << " with protocol=" << protocol      << " args=" << arg_list << endl; +#ifdef Q_WS_MAC+    arg_list.prepend(KLibLoader::findLibrary(name));+    name = KStandardDirs::findExe(QString::fromLatin1("kioslave"));+    arg_list.prepend(name);+#endif+ #ifdef Q_OS_UNIX     if (mSlaveDebug == arg1)     {@@ -1154,8 +1160,10 @@     }     if (mSlaveValgrind == arg1)     {+#ifndef Q_WS_MAC        arg_list.prepend(KLibLoader::findLibrary(name));        arg_list.prepend(KStandardDirs::locate("exe", QString::fromLatin1("kioslave")));+#endif        name = QString::fromLatin1("valgrind");        if (!mSlaveValgrindSkin.isEmpty()) {            arg_list.prepend(QLatin1String("--tool=") + mSlaveValgrindSkin);