simplify two true-false
This commit is contained in:
parent
708a57de1e
commit
bed57aeaf6
@ -488,7 +488,7 @@ void RecollModel::sort(int column, Qt::SortOrder order)
|
|||||||
if (!stringlowercmp("date", spec.field) ||
|
if (!stringlowercmp("date", spec.field) ||
|
||||||
!stringlowercmp("datetime", spec.field))
|
!stringlowercmp("datetime", spec.field))
|
||||||
spec.field = "mtime";
|
spec.field = "mtime";
|
||||||
spec.desc = order == Qt::AscendingOrder ? false : true;
|
spec.desc = (order != Qt::AscendingOrder);
|
||||||
}
|
}
|
||||||
emit sortDataChanged(spec);
|
emit sortDataChanged(spec);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -218,8 +218,8 @@ void SpellW::doExpand()
|
|||||||
resTW->setItem(0, 0, new QTableWidgetItem(tr("No expansion found")));
|
resTW->setItem(0, 0, new QTableWidgetItem(tr("No expansion found")));
|
||||||
} else {
|
} else {
|
||||||
int row = 0;
|
int row = 0;
|
||||||
|
// maxexpand is static const, thus guaranteed to be >0
|
||||||
if (maxexpand > 0 && int(res.entries.size()) >= maxexpand) {
|
if (int(res.entries.size()) >= maxexpand) {
|
||||||
resTW->setRowCount(row + 1);
|
resTW->setRowCount(row + 1);
|
||||||
resTW->setSpan(row, 0, 1, 2);
|
resTW->setSpan(row, 0, 1, 2);
|
||||||
resTW->setItem(row++, 0,
|
resTW->setItem(row++, 0,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user