1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

refactor: Move iterator declaration in foreach scope

Narrow the iterator scope
This commit is contained in:
Diadlo 2017-06-12 11:57:38 +03:00
parent 3f7380db48
commit 23ed1a3966
No known key found for this signature in database
GPG Key ID: 5AF9F2E29107C727
2 changed files with 2 additions and 4 deletions

View File

@ -171,8 +171,7 @@ void EmoticonsWidget::wheelEvent(QWheelEvent* e)
void EmoticonsWidget::PageButtonsUpdate()
{
QList<QRadioButton*> pageButtons = this->findChildren<QRadioButton*>(QString());
QRadioButton* t_pageButton;
foreach (t_pageButton, pageButtons) {
foreach (QRadioButton* t_pageButton, pageButtons) {
if (t_pageButton->property("pageIndex").toInt() == stack.currentIndex())
t_pageButton->setChecked(true);
else

View File

@ -132,8 +132,7 @@ QSize FlowLayout::sizeHint() const
QSize FlowLayout::minimumSize() const
{
QSize size;
QLayoutItem* item;
foreach (item, itemList)
foreach (QLayoutItem* item, itemList)
size = size.expandedTo(item->minimumSize());
size += QSize(2 * margin(), 2 * margin());