mirror of
https://invent.kde.org/system/dolphin
synced 2024-09-20 08:51:24 +00:00
Fix compile problems on systems that don't want nepomuk. eeek !
svn path=/trunk/KDE/kdebase/apps/; revision=679265
This commit is contained in:
parent
ca42927b82
commit
0bfa174a58
|
@ -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.
|
||||
|
|
Loading…
Reference in a new issue