summaryrefslogtreecommitdiffstats
path: root/gui/polkit-tqt-gui-actionbutton.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'gui/polkit-tqt-gui-actionbutton.cpp')
-rw-r--r--gui/polkit-tqt-gui-actionbutton.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/gui/polkit-tqt-gui-actionbutton.cpp b/gui/polkit-tqt-gui-actionbutton.cpp
index 1447bab66..ffcdc2f28 100644
--- a/gui/polkit-tqt-gui-actionbutton.cpp
+++ b/gui/polkit-tqt-gui-actionbutton.cpp
@@ -40,8 +40,8 @@ namespace Gui
void ActionButtonPrivate::addButton(TQButton *button)
{
buttons.append(button);
- TQObject::connect(button, SIGNAL(clicked(bool)), q, SLOT(streamClicked(bool)));
- TQObject::connect(q, SIGNAL(toggled(bool)), button, SLOT(toggle()));
+ TQObject::connect(button, TQT_SIGNAL(clicked()), q, TQT_SLOT(streamClicked()));
+ TQObject::connect(q, TQT_SIGNAL(toggled(bool)), button, TQT_SLOT(toggle()));
q->updateButton();
}
@@ -49,7 +49,7 @@ void ActionButtonPrivate::removeButton(TQButton *button)
{
if (buttons.contains(button))
{
- TQObject::disconnect(button, SIGNAL(clicked(bool)), q, SLOT(streamClicked(bool)));
+ TQObject::disconnect(button, SIGNAL(clicked(bool)), q, SLOT(streamClicked()));
TQObject::disconnect(q, SIGNAL(toggled(bool)), button, SLOT(toggle()));
TQValueList<TQButton*>::iterator butIt = buttons.find(button);
if (butIt != buttons.end())
@@ -67,7 +67,7 @@ ActionButton::ActionButton(ActionButtonPrivate &dd, const TQString &actionId, TQ
: Action(actionId, parent), d(&dd)
{
d->q = this;
- connect(this, SIGNAL(dataChanged()), SLOT(updateButton()));
+ connect(this, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(updateButton()));
}
ActionButton::ActionButton(TQButton *button, const TQString &actionId, TQObject *parent)
@@ -77,7 +77,7 @@ ActionButton::ActionButton(TQButton *button, const TQString &actionId, TQObject
d->buttons.append(button);
setButton(button);
- connect(this, SIGNAL(dataChanged()), SLOT(updateButton()));
+ connect(this, TQT_SIGNAL(dataChanged()), this, TQT_SLOT(updateButton()));
}
ActionButton::~ActionButton()
@@ -85,9 +85,9 @@ ActionButton::~ActionButton()
delete d;
}
-void ActionButton::streamClicked(bool c)
+void ActionButton::streamClicked()
{
- emit clicked(::tqt_cast<TQButton*>(this->sender()), c);
+ emit clicked(::tqt_cast<TQButton*>(this->sender()));
}
void ActionButton::updateButton()
@@ -105,7 +105,6 @@ void ActionButton::updateButton()
ent->hide();
}
ent->setEnabled(isEnabled());
- ent->setText(text());
//if (!toolTip().isNull())
//{
// ent->setToolTip(toolTip());
@@ -115,6 +114,8 @@ void ActionButton::updateButton()
// ent->setWhatsThis(whatsThis());
//}
ent->setPixmap(iconSet().pixmap());
+ // setPixmap() clears the button text, so setText() must be called afterwards
+ ent->setText(text());
// if the item cannot do the action anymore
// lets revert to the initial state
if (ent->isToggleButton())