0af386e
Index: kinit.cpp
0af386e
===================================================================
0af386e
--- kinit/kinit.cpp	(revision 829264)
0af386e
+++ kinit/kinit.cpp	(revision 828077)
0af386e
@@ -49,10 +49,9 @@
0af386e
 #include <QtCore/QTextStream>
0af386e
 #include <QtCore/QRegExp>
0af386e
 #include <QtGui/QFont>
0af386e
-#include <QDir>
0af386e
 #include <kcomponentdata.h>
0af386e
 #include <kstandarddirs.h>
0af386e
-#include <kconfiggroup.h>
0af386e
+#include <kglobalsettings.h>
0af386e
 #include <kglobal.h>
0af386e
 #include <kconfig.h>
0af386e
 #include <klibloader.h>
0af386e
@@ -530,17 +529,8 @@
0af386e
      if (cwd && *cwd)
0af386e
         chdir(cwd);
0af386e
      else {
0af386e
-         // Can't use KGlobalSettings::documentPath() here, we don't have a main component set,
0af386e
-         // and we don't want to set one; e.g. kioslaves will do that.
0af386e
-         // So we have to duplicate this stuff from KGlobalSettings.
0af386e
-         KConfigGroup g(s_instance->config(), "Paths");
0af386e
-         const QString documentPath = g.readPathEntry("Documents",
0af386e
-#ifdef Q_WS_WIN
0af386e
-                                                       getWin32ShellFoldersPath("Personal")
0af386e
-#else
0af386e
-                                                       QDir::homePath());
0af386e
-#endif
0af386e
-         const QByteArray docPath = QFile::encodeName(documentPath);
0af386e
+         KComponentData componentData("klauncher"); // needed for KConfig usage
0af386e
+         const QByteArray docPath = QFile::encodeName(KGlobalSettings::documentPath());
0af386e
          chdir(docPath.constData());
0af386e
      }
0af386e