Fix compile problems on systems that don't want nepomuk. eeek !

svn path=/trunk/KDE/kdebase/apps/; revision=679265
This commit is contained in:
Rafael Fernández López 2007-06-23 13:12:21 +00:00
parent ca42927b82
commit 0bfa174a58
2 changed files with 8 additions and 0 deletions

View file

@ -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()

View file

@ -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.