GUI: show error dialog when trying to sort by inverse relevance
This commit is contained in:
parent
36b4657631
commit
d34e3ef022
@ -435,6 +435,12 @@ void RecollModel::sort(int column, Qt::SortOrder order)
|
|||||||
DocSeqSortSpec spec;
|
DocSeqSortSpec spec;
|
||||||
if (column >= 0 && column < int(m_fields.size())) {
|
if (column >= 0 && column < int(m_fields.size())) {
|
||||||
spec.field = m_fields[column];
|
spec.field = m_fields[column];
|
||||||
|
if (!stringlowercmp("relevancyrating", spec.field) &&
|
||||||
|
order != Qt::AscendingOrder) {
|
||||||
|
QMessageBox::warning(0, "Recoll",
|
||||||
|
tr("Can't sort by inverse relevance"));
|
||||||
|
return;
|
||||||
|
}
|
||||||
if (!stringlowercmp("date", spec.field) ||
|
if (!stringlowercmp("date", spec.field) ||
|
||||||
!stringlowercmp("datetime", spec.field))
|
!stringlowercmp("datetime", spec.field))
|
||||||
spec.field = "mtime";
|
spec.field = "mtime";
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user