Tous les collages #1621890 Brut Modifier

Mine

public diff v1 · immuable
#1621890 ·publié 2009-10-15 11:15 UTC
corps du collage affiché
Index: kdelibs-4.3.2/kinit/kinit.cpp===================================================================--- kdelibs-4.3.2.orig/kinit/kinit.cpp	2009-10-15 12:48:34.000000000 +0200+++ kdelibs-4.3.2/kinit/kinit.cpp	2009-10-15 12:52:15.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 12:48:34.000000000 +0200+++ kdelibs-4.3.2/kinit/klauncher.cpp	2009-10-15 12:52:55.000000000 +0200@@ -1126,7 +1126,7 @@     }      QStringList arg_list;-#ifdef Q_WS_WIN+#if defined(Q_WS_WIN) || defined(Q_WS_MAC)     arg_list << name;     arg_list << protocol;     arg_list << mConnectionServer.address();@@ -1144,7 +1144,7 @@     kDebug(7016) << "KLauncher: launching new slave " << name << " with protocol=" << protocol      << " args=" << arg_list << endl; -#ifdef Q_OS_UNIX+#if !defined(Q_WS_WIN) && !defined(Q_WS_MAC)     if (mSlaveDebug == arg1)     {        klauncher_header request_header;