From: Rafael Fernández López Date: Sat, 23 Jun 2007 13:12:21 +0000 (+0000) Subject: Fix compile problems on systems that don't want nepomuk. eeek ! X-Git-Url: https://cloud.milkyroute.net/gitweb/dolphin.git/commitdiff_plain/66f4c8b3c82fc4dbe7dc6bc0b90005f009925973?ds=sidebyside Fix compile problems on systems that don't want nepomuk. eeek ! svn path=/trunk/KDE/kdebase/apps/; revision=679265 --- 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.