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()
|
void EmoticonsWidget::PageButtonsUpdate()
|
||||||
{
|
{
|
||||||
QList<QRadioButton*> pageButtons = this->findChildren<QRadioButton*>(QString());
|
QList<QRadioButton*> pageButtons = this->findChildren<QRadioButton*>(QString());
|
||||||
QRadioButton* t_pageButton;
|
foreach (QRadioButton* t_pageButton, pageButtons) {
|
||||||
foreach (t_pageButton, pageButtons) {
|
|
||||||
if (t_pageButton->property("pageIndex").toInt() == stack.currentIndex())
|
if (t_pageButton->property("pageIndex").toInt() == stack.currentIndex())
|
||||||
t_pageButton->setChecked(true);
|
t_pageButton->setChecked(true);
|
||||||
else
|
else
|
||||||
|
@ -132,8 +132,7 @@ QSize FlowLayout::sizeHint() const
|
|||||||
QSize FlowLayout::minimumSize() const
|
QSize FlowLayout::minimumSize() const
|
||||||
{
|
{
|
||||||
QSize size;
|
QSize size;
|
||||||
QLayoutItem* item;
|
foreach (QLayoutItem* item, itemList)
|
||||||
foreach (item, itemList)
|
|
||||||
size = size.expandedTo(item->minimumSize());
|
size = size.expandedTo(item->minimumSize());
|
||||||
|
|
||||||
size += QSize(2 * margin(), 2 * margin());
|
size += QSize(2 * margin(), 2 * margin());
|
||||||
|
Loading…
x
Reference in New Issue
Block a user