summaryrefslogtreecommitdiffstats
path: root/gui
diff options
context:
space:
mode:
Diffstat (limited to 'gui')
-rw-r--r--gui/polkit-tqt-gui-action.h2
-rw-r--r--gui/polkit-tqt-gui-actionbutton.cpp8
-rw-r--r--gui/polkit-tqt-gui-actionbutton.h4
-rw-r--r--gui/polkit-tqt-gui-actionbuttons.cpp10
-rw-r--r--gui/polkit-tqt-gui-actionbuttons.h6
5 files changed, 12 insertions, 18 deletions
diff --git a/gui/polkit-tqt-gui-action.h b/gui/polkit-tqt-gui-action.h
index 4f5bb2e2d..21c10100b 100644
--- a/gui/polkit-tqt-gui-action.h
+++ b/gui/polkit-tqt-gui-action.h
@@ -77,7 +77,7 @@ class POLKIT_TQT_EXPORT Action : public TQAction
* \param actionId the PolicyKit action Id (e.g.: org.freedesktop.policykit.read)
* \param parent the object parent
*/
- explicit Action(const TQString& actionId = TQString::null, TQObject *parent = 0);
+ explicit Action(const TQString& actionId = TQString::null, TQObject *parent = nullptr);
~Action();
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
diff --git a/gui/polkit-tqt-gui-actionbutton.h b/gui/polkit-tqt-gui-actionbutton.h
index 7ec45f296..6ab25577c 100644
--- a/gui/polkit-tqt-gui-actionbutton.h
+++ b/gui/polkit-tqt-gui-actionbutton.h
@@ -72,7 +72,7 @@ class POLKIT_TQT_EXPORT ActionButton : public Action
* \param parent the parent object
*/
explicit ActionButton(TQButton *button, const TQString &actionId = TQString::null,
- TQObject *parent = 0);
+ TQObject *parent = nullptr);
virtual ~ActionButton();
/**
@@ -131,7 +131,7 @@ class POLKIT_TQT_EXPORT ActionButton : public Action
void clicked(TQButton *button, bool checked = false);
protected:
- ActionButton(ActionButtonPrivate &dd, const TQString &actionId, TQObject *parent = 0);
+ ActionButton(ActionButtonPrivate &dd, const TQString &actionId, TQObject *parent = nullptr);
ActionButtonPrivate *const d;
diff --git a/gui/polkit-tqt-gui-actionbuttons.cpp b/gui/polkit-tqt-gui-actionbuttons.cpp
index 78aced5d6..f4e72d54f 100644
--- a/gui/polkit-tqt-gui-actionbuttons.cpp
+++ b/gui/polkit-tqt-gui-actionbuttons.cpp
@@ -32,7 +32,7 @@ namespace PolkitTQt
namespace Gui
{
-ActionButtons::ActionButtons(const TQValueList<TQButton*> &buttons, const TQString &actionId,
+ActionButtons::ActionButtons(TQValueList<TQButton*> &buttons, const TQString &actionId,
TQObject *parent) : ActionButton(*new ActionButtonPrivate(), actionId, parent)
{
setButtons(buttons);
@@ -42,17 +42,15 @@ ActionButtons::~ActionButtons()
{
}
-void ActionButtons::setButtons(const TQValueList<TQButton*> &buttons)
+void ActionButtons::setButtons(TQValueList<TQButton*> &buttons)
{
- TQValueList<TQButton*>::iterator butIt;
- for (butIt = d->buttons.begin(); butIt != d->buttons.end(); ++butIt)
+ for (TQButton *&ent : buttons)
{
- TQButton *ent = *butIt;
addButton(ent);
}
}
-TQValueList<TQButton *> ActionButtons::buttons() const
+TQValueList<TQButton*> ActionButtons::buttons() const
{
return d->buttons;
}
diff --git a/gui/polkit-tqt-gui-actionbuttons.h b/gui/polkit-tqt-gui-actionbuttons.h
index b85b632be..43b80bb93 100644
--- a/gui/polkit-tqt-gui-actionbuttons.h
+++ b/gui/polkit-tqt-gui-actionbuttons.h
@@ -62,8 +62,8 @@ class ActionButtons : public ActionButton
* \param actionId the action Id to create the underlying Action
* \param parent the parent object
*/
- explicit ActionButtons(const TQValueList<TQButton*> &buttons,
- const TQString &actionId = TQString::null, TQObject *parent = 0);
+ explicit ActionButtons(TQValueList<TQButton*> &buttons,
+ const TQString &actionId = TQString::null, TQObject *parent = nullptr);
virtual ~ActionButtons();
/**
@@ -80,7 +80,7 @@ class ActionButtons : public ActionButton
*
* \param buttons the new buttons associated with the underlying action
*/
- void setButtons(const TQValueList<TQButton*> &buttons);
+ void setButtons(TQValueList<TQButton*> &buttons);
/**
* Returns the current buttons list