mirror of
https://github.com/qbittorrent/qBittorrent
synced 2025-07-15 01:33:07 -07:00
Replace post-increment with pre-increment
And post-decrement with pre-decrement.
This commit is contained in:
parent
40330c4606
commit
5ddbf9bba9
16 changed files with 58 additions and 58 deletions
|
@ -102,7 +102,7 @@ PeerListWidget::PeerListWidget(PropertiesWidget *parent)
|
|||
hideColumn(PeerListDelegate::COUNTRY);
|
||||
// Ensure that at least one column is visible at all times
|
||||
bool atLeastOne = false;
|
||||
for (unsigned int i = 0; i < PeerListDelegate::IP_HIDDEN; i++) {
|
||||
for (unsigned int i = 0; i < PeerListDelegate::IP_HIDDEN; ++i) {
|
||||
if (!isColumnHidden(i)) {
|
||||
atLeastOne = true;
|
||||
break;
|
||||
|
@ -113,7 +113,7 @@ PeerListWidget::PeerListWidget(PropertiesWidget *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 < PeerListDelegate::IP_HIDDEN; i++)
|
||||
for (unsigned int i = 0; i < PeerListDelegate::IP_HIDDEN; ++i)
|
||||
if ((columnWidth(i) <= 0) && !isColumnHidden(i))
|
||||
resizeColumnToContents(i);
|
||||
// Context menu
|
||||
|
@ -168,9 +168,9 @@ void PeerListWidget::displayToggleColumnsMenu(const QPoint &)
|
|||
actions.append(myAct);
|
||||
}
|
||||
int visibleCols = 0;
|
||||
for (unsigned int i = 0; i < PeerListDelegate::IP_HIDDEN; i++) {
|
||||
for (unsigned int i = 0; i < PeerListDelegate::IP_HIDDEN; ++i) {
|
||||
if (!isColumnHidden(i))
|
||||
visibleCols++;
|
||||
++visibleCols;
|
||||
|
||||
if (visibleCols > 1)
|
||||
break;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue