┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/dolphinmainwindow.cpp4
-rw-r--r--src/dolphinsortfilterproxymodel.cpp4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp
index 7fec6908d..bfde4da66 100644
--- a/src/dolphinmainwindow.cpp
+++ b/src/dolphinmainwindow.cpp
@@ -733,12 +733,16 @@ void DolphinMainWindow::sortByType()
void DolphinMainWindow::sortByRating()
{
+#ifdef HAVE_NEPOMUK
m_activeViewContainer->view()->setSorting(DolphinView::SortByRating);
+#endif
}
void DolphinMainWindow::sortByTags()
{
+#ifdef HAVE_NEPOMUK
m_activeViewContainer->view()->setSorting(DolphinView::SortByTags);
+#endif
}
void DolphinMainWindow::toggleSortOrder()
diff --git a/src/dolphinsortfilterproxymodel.cpp b/src/dolphinsortfilterproxymodel.cpp
index 2e321d7ec..592b0aa1c 100644
--- a/src/dolphinsortfilterproxymodel.cpp
+++ b/src/dolphinsortfilterproxymodel.cpp
@@ -203,16 +203,20 @@ bool DolphinSortFilterProxyModel::lessThan(const QModelIndex& left,
// If we are sorting by rating, folders and files are citizens of the same
// class. Same if we are sorting by tags.
+#ifdef HAVE_NEPOMUK
if ((sortRole() != DolphinView::SortByRating) &&
(sortRole() != DolphinView::SortByTags))
{
+#endif
// On our priority, folders go above regular files.
if (leftFileItem->isDir() && !rightFileItem->isDir()) {
return true;
} else if (!leftFileItem->isDir() && rightFileItem->isDir()) {
return false;
}
+#ifdef HAVE_NEPOMUK
}
+#endif
// Hidden elements go before visible ones, if they both are
// folders or files.