From 66f4c8b3c82fc4dbe7dc6bc0b90005f009925973 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Rafael=20Fern=C3=A1ndez=20L=C3=B3pez?= Date: Sat, 23 Jun 2007 13:12:21 +0000 Subject: [PATCH] Fix compile problems on systems that don't want nepomuk. eeek ! svn path=/trunk/KDE/kdebase/apps/; revision=679265 --- src/dolphinmainwindow.cpp | 4 ++++ src/dolphinsortfilterproxymodel.cpp | 4 ++++ 2 files changed, 8 insertions(+) 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. -- 2.47.3