Merge pull request #9060 from Chocobo1/preinc

Replace post-increment with pre-increment
This commit is contained in:
Mike Tzou
2018-06-09 12:40:30 +08:00
committed by GitHub
16 changed files with 58 additions and 58 deletions

View File

@@ -424,7 +424,7 @@ void PluginSelectDlg::checkForUpdatesFinished(const QHash<QString, PluginVersion
for (auto i = updateInfo.cbegin(); i != updateInfo.cend(); ++i) {
startAsyncOp();
m_pendingUpdates++;
++m_pendingUpdates;
m_pluginManager->updatePlugin(i.key());
}
}

View File

@@ -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;