mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2026-01-01 21:28:07 -06:00
Replace post-increment with pre-increment
And post-decrement with pre-decrement.
This commit is contained in:
@@ -104,7 +104,7 @@ SearchTab::SearchTab(SearchHandler *searchHandler, QWidget *parent)
|
||||
|
||||
// Ensure that at least one column is visible at all times
|
||||
bool atLeastOne = false;
|
||||
for (unsigned int i = 0; i < SearchSortModel::DL_LINK; i++) {
|
||||
for (unsigned int i = 0; i < SearchSortModel::DL_LINK; ++i) {
|
||||
if (!m_ui->resultsBrowser->isColumnHidden(i)) {
|
||||
atLeastOne = true;
|
||||
break;
|
||||
@@ -115,7 +115,7 @@ SearchTab::SearchTab(SearchHandler *searchHandler, QWidget *parent)
|
||||
// To also mitigate the above issue, we have to resize each column when
|
||||
// its size is 0, because explicitly 'showing' the column isn't enough
|
||||
// in the above scenario.
|
||||
for (unsigned int i = 0; i < SearchSortModel::DL_LINK; i++)
|
||||
for (unsigned int i = 0; i < SearchSortModel::DL_LINK; ++i)
|
||||
if ((m_ui->resultsBrowser->columnWidth(i) <= 0) && !m_ui->resultsBrowser->isColumnHidden(i))
|
||||
m_ui->resultsBrowser->resizeColumnToContents(i);
|
||||
|
||||
@@ -375,9 +375,9 @@ void SearchTab::displayToggleColumnsMenu(const QPoint&)
|
||||
actions.append(myAct);
|
||||
}
|
||||
int visibleCols = 0;
|
||||
for (unsigned int i = 0; i < SearchSortModel::DL_LINK; i++) {
|
||||
for (unsigned int i = 0; i < SearchSortModel::DL_LINK; ++i) {
|
||||
if (!m_ui->resultsBrowser->isColumnHidden(i))
|
||||
visibleCols++;
|
||||
++visibleCols;
|
||||
|
||||
if (visibleCols > 1)
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user