]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/panels/places/placesitemmodel.cpp
Correct searchbox, split view transitions between tabs
[dolphin.git] / src / panels / places / placesitemmodel.cpp
index 25c4d51f67eaed8440ac5ab73f28d6702b975401..a4741e74693836e031a762d09758de8e37af2bbb 100644 (file)
@@ -32,7 +32,6 @@
 #include <KProtocolInfo>
 #include <KLocalizedString>
 #include <QStandardPaths>
-#include <KUser>
 #include <KAboutData>
 #include "placesitem.h"
 #include <QAction>
@@ -249,7 +248,7 @@ QAction* PlacesItemModel::ejectAction(int index) const
 {
     const PlacesItem* item = placesItem(index);
     if (item && item->device().is<Solid::OpticalDisc>()) {
-        return new QAction(QIcon::fromTheme(QStringLiteral("media-eject")), i18nc("@item", "Eject '%1'", item->text()), 0);
+        return new QAction(QIcon::fromTheme(QStringLiteral("media-eject")), i18nc("@item", "Eject"), 0);
     }
 
     return 0;
@@ -283,14 +282,13 @@ QAction* PlacesItemModel::teardownAction(int index) const
 
     QString iconName;
     QString text;
-    const QString label = item->text();
     if (device.is<Solid::OpticalDisc>()) {
-        text = i18nc("@item", "Release '%1'", label);
+        text = i18nc("@item", "Release");
     } else if (removable || hotPluggable) {
-        text = i18nc("@item", "Safely Remove '%1'", label);
+        text = i18nc("@item", "Safely Remove");
         iconName = QStringLiteral("media-eject");
     } else {
-        text = i18nc("@item", "Unmount '%1'", label);
+        text = i18nc("@item", "Unmount");
         iconName = QStringLiteral("media-eject");
     }
 
@@ -872,7 +870,7 @@ PlacesItem* PlacesItemModel::createSystemPlacesItem(const SystemBookmarkData& da
                 props.setVisibleRoles({"text"});
             } else if (data.url.scheme() == QLatin1String("timeline")) {
                 props.setViewMode(DolphinView::DetailsView);
-                props.setVisibleRoles({"text", "date"});
+                props.setVisibleRoles({"text", "modificationtime"});
             }
         }
     }
@@ -889,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:/")),