diff --git a/src/qtgui/restable.cpp b/src/qtgui/restable.cpp index 0ea206f5..597eb877 100644 --- a/src/qtgui/restable.cpp +++ b/src/qtgui/restable.cpp @@ -488,7 +488,7 @@ void RecollModel::sort(int column, Qt::SortOrder order) if (!stringlowercmp("date", spec.field) || !stringlowercmp("datetime", spec.field)) spec.field = "mtime"; - spec.desc = order == Qt::AscendingOrder ? false : true; + spec.desc = (order != Qt::AscendingOrder); } emit sortDataChanged(spec); } diff --git a/src/qtgui/spell_w.cpp b/src/qtgui/spell_w.cpp index 63ea7b57..63ff1a98 100644 --- a/src/qtgui/spell_w.cpp +++ b/src/qtgui/spell_w.cpp @@ -218,8 +218,8 @@ void SpellW::doExpand() resTW->setItem(0, 0, new QTableWidgetItem(tr("No expansion found"))); } else { int row = 0; - - if (maxexpand > 0 && int(res.entries.size()) >= maxexpand) { + // maxexpand is static const, thus guaranteed to be >0 + if (int(res.entries.size()) >= maxexpand) { resTW->setRowCount(row + 1); resTW->setSpan(row, 0, 1, 2); resTW->setItem(row++, 0,