X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/blobdiff_plain/29c5ab3b74d26657c60b40770676be082caa953d..7eeb8dba6aeba09aa3dfa7fa5f0b00840d4d8317:/src/viewproperties.cpp diff --git a/src/viewproperties.cpp b/src/viewproperties.cpp index 3fc102d6c..3a2bb1fc1 100644 --- a/src/viewproperties.cpp +++ b/src/viewproperties.cpp @@ -29,16 +29,10 @@ #include #include -#ifdef HAVE_NEPOMUK - #include -#endif - #include #include #include -bool ViewProperties::m_nepomukSupport = false; - #define FILE_NAME "/.directory" ViewProperties::ViewProperties(const KUrl& url) : @@ -46,14 +40,6 @@ ViewProperties::ViewProperties(const KUrl& url) : m_autoSave(true), m_node(0) { -#ifdef HAVE_NEPOMUK - static bool checkedNepomukSupport = false; - if (!checkedNepomukSupport) { - m_nepomukSupport = !Nepomuk::ResourceManager::instance()->init(); - checkedNepomukSupport = true; - } -#endif - KUrl cleanUrl(url); cleanUrl.cleanPath(); m_filepath = cleanUrl.toLocalFile(); @@ -174,15 +160,7 @@ void ViewProperties::setSorting(DolphinView::Sorting sorting) DolphinView::Sorting ViewProperties::sorting() const { - // If Nepomuk is not available, return SortByName as fallback if SortByRating - // or SortByTags is stored. - DolphinView::Sorting sorting = static_cast(m_node->sorting()); - const bool sortByName = !m_nepomukSupport && - ((sorting == DolphinView::SortByRating) || (sorting == DolphinView::SortByTags)); - if (sortByName) { - sorting = DolphinView::SortByName; - } - return sorting; + return static_cast(m_node->sorting()); } void ViewProperties::setSortOrder(Qt::SortOrder sortOrder) @@ -282,6 +260,7 @@ void ViewProperties::setDirProperties(const ViewProperties& props) setCategorizedSorting(props.categorizedSorting()); setSorting(props.sorting()); setSortOrder(props.sortOrder()); + setSortFoldersFirst(props.sortFoldersFirst()); setAdditionalInfo(props.additionalInfo()); }