┌   ┐
54
└   ┘

summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafael Fernández López <[email protected]>2007-06-23 13:12:21 +0000
committerRafael Fernández López <[email protected]>2007-06-23 13:12:21 +0000
commit66f4c8b3c82fc4dbe7dc6bc0b90005f009925973 (patch)
tree5ba3694d791d66f3851626f9c7f087a8e4c3bd6f
parent126c14b3ba6e165e94727b448bdaf1f0c48502f7 (diff)
Fix compile problems on systems that don't want nepomuk. eeek !
svn path=/trunk/KDE/kdebase/apps/; revision=679265
-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.