rename Applet::activate() with Applet::activated()

activate() is a name that suggests a slot more than a signal
This commit is contained in:
Marco Martin 2014-02-14 14:40:53 +01:00
parent 60565dafcb
commit 50a584d0bc
4 changed files with 6 additions and 6 deletions

View File

@ -589,7 +589,7 @@ void Applet::setGlobalShortcut(const QKeySequence &shortcut)
d->activationAction = new QAction(this);
d->activationAction->setText(i18n("Activate %1 Widget", title()));
d->activationAction->setObjectName(QString("activate widget %1").arg(id())); // NO I18N
connect(d->activationAction, SIGNAL(triggered()), this, SIGNAL(activate()));
connect(d->activationAction, SIGNAL(triggered()), this, SIGNAL(activated()));
connect(d->activationAction, SIGNAL(globalShortcutChanged(QKeySequence)),
this, SLOT(globalShortcutChanged()));
} else if (d->activationAction->shortcut() == shortcut) {

View File

@ -404,7 +404,7 @@ class PLASMA_EXPORT Applet : public QObject
* Emitted when activation is requested due to, for example, a global
* keyboard shortcut. By default the wiget is given focus.
*/
void activate();
void activated();
//TODO: fix usage in containment, port to QObject::destroyed

View File

@ -371,7 +371,7 @@ void Containment::addApplet(Applet *applet)
oldConfig.reparent(&c);
applet->d->resetConfigurationObject();
disconnect(applet, SIGNAL(activate()), currentContainment, SIGNAL(activate()));
disconnect(applet, SIGNAL(activated()), currentContainment, SIGNAL(activated()));
} else {
applet->setParent(this);
}
@ -389,7 +389,7 @@ void Containment::addApplet(Applet *applet)
connect(applet, SIGNAL(configNeedsSaving()), this, SIGNAL(configNeedsSaving()));
connect(applet, SIGNAL(appletDeleted(Plasma::Applet*)), this, SLOT(appletDeleted(Plasma::Applet*)));
connect(applet, SIGNAL(statusChanged(Plasma::Types::ItemStatus)), this, SLOT(checkStatus(Plasma::Types::ItemStatus)));
connect(applet, SIGNAL(activate()), this, SIGNAL(activate()));
connect(applet, SIGNAL(activated()), this, SIGNAL(activated()));
if (!currentContainment) {
const bool isNew = applet->d->mainConfigGroup()->entryMap().isEmpty();
@ -535,7 +535,7 @@ void Containment::reactToScreenChange()
emit screenChanged(newScreen);
if (newScreen >= 0) {
emit activate();
emit activated();
}
}

View File

@ -72,7 +72,7 @@ AppletInterface::AppletInterface(DeclarativeAppletScript *script, QQuickItem *pa
connect(applet(), &Plasma::Applet::statusChanged,
this, &AppletInterface::statusChanged);
connect(applet(), &Plasma::Applet::activate,
connect(applet(), &Plasma::Applet::activated,
[=] () {
setExpanded(true);
if (QQuickItem *i = qobject_cast<QQuickItem *>(fullRepresentationItem())) {