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:
parent
3f7380db48
commit
23ed1a3966
@ -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
|
||||
|
@ -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());
|
||||
|
Loading…
x
Reference in New Issue
Block a user