Index: kinit.cpp =================================================================== --- kinit/kinit.cpp (revision 829264) +++ kinit/kinit.cpp (revision 828077) @@ -49,10 +49,9 @@ #include #include #include -#include #include #include -#include +#include #include #include #include @@ -263,7 +262,7 @@ write(child->sock, &request_header, sizeof(request_header)); write(child->sock, request_data, request_header.arg_length); close(child->sock); - + if (prev) { prev->next = child->next; @@ -530,17 +529,8 @@ if (cwd && *cwd) chdir(cwd); else { - // Can't use KGlobalSettings::documentPath() here, we don't have a main component set, - // and we don't want to set one; e.g. kioslaves will do that. - // So we have to duplicate this stuff from KGlobalSettings. - KConfigGroup g(s_instance->config(), "Paths"); - const QString documentPath = g.readPathEntry("Documents", -#ifdef Q_WS_WIN - getWin32ShellFoldersPath("Personal") -#else - QDir::homePath()); -#endif - const QByteArray docPath = QFile::encodeName(documentPath); + KComponentData componentData("klauncher"); // needed for KConfig usage + const QByteArray docPath = QFile::encodeName(KGlobalSettings::documentPath()); chdir(docPath.constData()); } @@ -1302,7 +1292,7 @@ children = child; /* check child hasn't terminated already */ - if (kill(pid, 0)) + if (kill(pid, 0)) { children = child->next; free(child);