X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/a24327cd50ef17b953ecb908d260b73460158107..d3839617:/src/views/viewproperties.cpp?ds=sidebyside diff --git a/src/views/viewproperties.cpp b/src/views/viewproperties.cpp index ab3af5149..2bfdfe81b 100644 --- a/src/views/viewproperties.cpp +++ b/src/views/viewproperties.cpp @@ -55,6 +55,9 @@ ViewProperties::ViewProperties(const QUrl& url) : } 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; } else if (url.isLocalFile()) { m_filePath = url.toLocalFile(); @@ -245,6 +248,19 @@ bool ViewProperties::sortFoldersFirst() const return m_node->sortFoldersFirst(); } +void ViewProperties::setSortHiddenLast(bool hiddenLast) +{ + if (m_node->sortHiddenLast() != hiddenLast) { + m_node->setSortHiddenLast(hiddenLast); + update(); + } +} + +bool ViewProperties::sortHiddenLast() const +{ + return m_node->sortHiddenLast(); +} + void ViewProperties::setVisibleRoles(const QList& roles) { if (roles == visibleRoles()) { @@ -353,6 +369,7 @@ void ViewProperties::setDirProperties(const ViewProperties& props) setSortRole(props.sortRole()); setSortOrder(props.sortOrder()); setSortFoldersFirst(props.sortFoldersFirst()); + setSortHiddenLast(props.sortHiddenLast()); setVisibleRoles(props.visibleRoles()); setHeaderColumnWidths(props.headerColumnWidths()); m_node->setVersion(props.m_node->version()); @@ -392,7 +409,7 @@ bool ViewProperties::exist() const QString ViewProperties::destinationDir(const QString& subDir) const { - QString path = QStandardPaths::writableLocation(QStandardPaths::DataLocation); + QString path = QStandardPaths::writableLocation(QStandardPaths::AppDataLocation); path.append("/view_properties/").append(subDir); return path; }