diff options
author | Michele Calgaro <[email protected]> | 2021-12-28 20:45:45 +0900 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2021-12-28 20:45:45 +0900 |
commit | 82b07f1a3cc29b9785c292174343b464a774a722 (patch) | |
tree | 7a3501a01cf6e6d645929063ac601f4d3eb91edb /gui/polkit-tqt-gui-actionbutton.cpp | |
parent | 416bed9bc124e24cc1351c7d8e5810ca7570a023 (diff) | |
download | polkit-tqt-82b07f1a3cc29b9785c292174343b464a774a722.tar.gz polkit-tqt-82b07f1a3cc29b9785c292174343b464a774a722.zip |
Code improvements based on c++11 standard (ranged for loops and nullptr).
Signed-off-by: Michele Calgaro <[email protected]>
Diffstat (limited to 'gui/polkit-tqt-gui-actionbutton.cpp')
-rw-r--r-- | gui/polkit-tqt-gui-actionbutton.cpp | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/gui/polkit-tqt-gui-actionbutton.cpp b/gui/polkit-tqt-gui-actionbutton.cpp index ffcdc2f28..48a0d1494 100644 --- a/gui/polkit-tqt-gui-actionbutton.cpp +++ b/gui/polkit-tqt-gui-actionbutton.cpp @@ -92,10 +92,8 @@ void ActionButton::streamClicked() void ActionButton::updateButton() { - TQValueList<TQButton*>::iterator butIt; - for (butIt = d->buttons.begin(); butIt != d->buttons.end(); ++butIt) + for (TQButton *&ent : d->buttons) { - TQButton *ent = *butIt; if (isVisible()) { ent->show(); @@ -128,10 +126,8 @@ void ActionButton::updateButton() bool ActionButton::activate() { bool tg = false; - TQValueList<TQButton*>::iterator butIt; - for (butIt = d->buttons.begin(); butIt != d->buttons.end(); ++butIt) + for (TQButton *&ent : d->buttons) { - TQButton *ent = *butIt; if (ent->isToggleButton()) { // we set the the current Action state |