]> cloud.milkyroute.net Git - dolphin.git/commitdiff
[PlacesItemModel] Use QDir::homePath() instead of KUser().homeDir()
authorKai Uwe Broulik <kde@privat.broulik.de>
Wed, 15 Mar 2017 14:38:53 +0000 (15:38 +0100)
committerKai Uwe Broulik <kde@privat.broulik.de>
Wed, 15 Mar 2017 14:38:53 +0000 (15:38 +0100)
KUser does quite a lot of stuff under the hood and also calls getpwuid which might block with network login.

Differential Revision: https://phabricator.kde.org/D5049

src/panels/places/placesitemmodel.cpp

index 87ed24e90e617d2fb861bff86d9878b74232c243..a4741e74693836e031a762d09758de8e37af2bbb 100644 (file)
@@ -32,7 +32,6 @@
 #include <KProtocolInfo>
 #include <KLocalizedString>
 #include <QStandardPaths>
-#include <KUser>
 #include <KAboutData>
 #include "placesitem.h"
 #include <QAction>
@@ -888,7 +887,7 @@ void PlacesItemModel::createSystemBookmarks()
     // i18nc call is done after reading the bookmark. The reason why the i18nc call is not
     // done here is because otherwise switching the language would not result in retranslating the
     // bookmarks.
-    m_systemBookmarks.append(SystemBookmarkData(QUrl::fromLocalFile(KUser().homeDir()),
+    m_systemBookmarks.append(SystemBookmarkData(QUrl::fromLocalFile(QDir::homePath()),
                                                 QStringLiteral("user-home"),
                                                 I18N_NOOP2("KFile System Bookmarks", "Home")));
     m_systemBookmarks.append(SystemBookmarkData(QUrl(QStringLiteral("remote:/")),