smarter use of QMap

svn path=/trunk/KDE/kdelibs/; revision=895574
This commit is contained in:
Aaron J. Seigo 2008-12-11 02:55:28 +00:00
parent 2a8e07ba42
commit 87fb3dfabe

View File

@ -305,18 +305,14 @@ void ExtenderItem::addAction(const QString &name, QAction *action)
{
Q_ASSERT(action);
d->actions[name] = action;
d->actions.insert(name, action);
connect(action, SIGNAL(changed()), this, SLOT(updateToolBox()));
d->updateToolBox();
}
QAction *ExtenderItem::action(const QString &name) const
{
if (d->actions.contains(name)) {
return d->actions[name];
} else {
return 0;
}
return d->actions.value(name, 0);
}
void ExtenderItem::showCloseButton()