]> cloud.milkyroute.net Git - dolphin.git/blobdiff - src/views/viewproperties.cpp
dolphinview: when rename dialog finishes, immediately update the model and the selection
[dolphin.git] / src / views / viewproperties.cpp
index 46ec2c28c8cbc886c611a7c8ec62a76739367b2f..d65572f21ee1c203bd1e405c3dd5a7fe28bd3517 100644 (file)
@@ -52,9 +52,6 @@ ViewProperties::ViewProperties(const QUrl &url)
     } else if (url.scheme() == QLatin1String("trash")) {
         m_filePath = destinationDir(QStringLiteral("trash"));
         useTrashView = true;
-    } else if (url.scheme() == QLatin1String("recentdocuments")) {
-        m_filePath = destinationDir(QStringLiteral("recentdocuments"));
-        useRecentDocumentsView = true;
     } else if (url.scheme() == QLatin1String("recentlyused")) {
         m_filePath = destinationDir(QStringLiteral("recentlyused"));
         useRecentDocumentsView = true;
@@ -123,14 +120,16 @@ ViewProperties::ViewProperties(const QUrl &url)
             setViewMode(DolphinView::DetailsView);
             setVisibleRoles({"text", "path", "deletiontime"});
         } else if (useRecentDocumentsView || useDownloadsView) {
-            setSortRole(QByteArrayLiteral("modificationtime"));
             setSortOrder(Qt::DescendingOrder);
             setSortFoldersFirst(false);
             setGroupedSorting(true);
 
             if (useRecentDocumentsView) {
+                setSortRole(QByteArrayLiteral("accesstime"));
                 setViewMode(DolphinView::DetailsView);
-                setVisibleRoles({"text", "path", "modificationtime"});
+                setVisibleRoles({"text", "path", "accesstime"});
+            } else {
+                setSortRole(QByteArrayLiteral("modificationtime"));
             }
         } else {
             // The global view-properties act as default for directories without