X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/307285e9635a4bf584d6e5d7478876b90ef870f0..ed0df8dc1fc9576e36c920882e7f4b00a2811113:/src/viewproperties.cpp diff --git a/src/viewproperties.cpp b/src/viewproperties.cpp index 62898e670..3fc102d6c 100644 --- a/src/viewproperties.cpp +++ b/src/viewproperties.cpp @@ -56,9 +56,9 @@ ViewProperties::ViewProperties(const KUrl& url) : KUrl cleanUrl(url); cleanUrl.cleanPath(); - m_filepath = cleanUrl.path(); + m_filepath = cleanUrl.toLocalFile(); - if ((m_filepath.length() < 1) || (m_filepath.at(0) != QChar('/'))) { + if ((m_filepath.length() < 1) || (!QDir::isAbsolutePath(m_filepath))) { const QString file = destinationDir("global") + FILE_NAME; m_node = new ViewPropertySettings(KSharedConfig::openConfig(file)); return; @@ -198,6 +198,19 @@ Qt::SortOrder ViewProperties::sortOrder() const return static_cast(m_node->sortOrder()); } +void ViewProperties::setSortFoldersFirst(bool foldersFirst) +{ + if (m_node->sortFoldersFirst() != foldersFirst) { + m_node->setSortFoldersFirst(foldersFirst); + updateTimeStamp(); + } +} + +bool ViewProperties::sortFoldersFirst() const +{ + return m_node->sortFoldersFirst(); +} + void ViewProperties::setAdditionalInfo(KFileItemDelegate::InformationList list) { int info = NoInfo;