Commit f2cb65db authored by Rafael Fernández López's avatar Rafael Fernández López
Browse files

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

svn path=/trunk/KDE/kdebase/apps/; revision=679265
parent 7898b0d6
......@@ -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()
......
......@@ -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.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment