From: Kai Uwe Broulik Date: Wed, 15 Mar 2017 14:38:53 +0000 (+0100) Subject: [PlacesItemModel] Use QDir::homePath() instead of KUser().homeDir() X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/12c4272912bb1fb3e1910958a7b9ba22f9befbec?ds=inline [PlacesItemModel] Use QDir::homePath() instead of KUser().homeDir() 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 --- diff --git a/src/panels/places/placesitemmodel.cpp b/src/panels/places/placesitemmodel.cpp index 87ed24e90..a4741e746 100644 --- a/src/panels/places/placesitemmodel.cpp +++ b/src/panels/places/placesitemmodel.cpp @@ -32,7 +32,6 @@ #include #include #include -#include #include #include "placesitem.h" #include @@ -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:/")),