rename Applet::activate() with Applet::activated()
activate() is a name that suggests a slot more than a signal
This commit is contained in:
parent
60565dafcb
commit
50a584d0bc
@ -589,7 +589,7 @@ void Applet::setGlobalShortcut(const QKeySequence &shortcut)
|
|||||||
d->activationAction = new QAction(this);
|
d->activationAction = new QAction(this);
|
||||||
d->activationAction->setText(i18n("Activate %1 Widget", title()));
|
d->activationAction->setText(i18n("Activate %1 Widget", title()));
|
||||||
d->activationAction->setObjectName(QString("activate widget %1").arg(id())); // NO I18N
|
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)),
|
connect(d->activationAction, SIGNAL(globalShortcutChanged(QKeySequence)),
|
||||||
this, SLOT(globalShortcutChanged()));
|
this, SLOT(globalShortcutChanged()));
|
||||||
} else if (d->activationAction->shortcut() == shortcut) {
|
} else if (d->activationAction->shortcut() == shortcut) {
|
||||||
|
@ -404,7 +404,7 @@ class PLASMA_EXPORT Applet : public QObject
|
|||||||
* Emitted when activation is requested due to, for example, a global
|
* Emitted when activation is requested due to, for example, a global
|
||||||
* keyboard shortcut. By default the wiget is given focus.
|
* keyboard shortcut. By default the wiget is given focus.
|
||||||
*/
|
*/
|
||||||
void activate();
|
void activated();
|
||||||
|
|
||||||
|
|
||||||
//TODO: fix usage in containment, port to QObject::destroyed
|
//TODO: fix usage in containment, port to QObject::destroyed
|
||||||
|
@ -371,7 +371,7 @@ void Containment::addApplet(Applet *applet)
|
|||||||
oldConfig.reparent(&c);
|
oldConfig.reparent(&c);
|
||||||
applet->d->resetConfigurationObject();
|
applet->d->resetConfigurationObject();
|
||||||
|
|
||||||
disconnect(applet, SIGNAL(activate()), currentContainment, SIGNAL(activate()));
|
disconnect(applet, SIGNAL(activated()), currentContainment, SIGNAL(activated()));
|
||||||
} else {
|
} else {
|
||||||
applet->setParent(this);
|
applet->setParent(this);
|
||||||
}
|
}
|
||||||
@ -389,7 +389,7 @@ void Containment::addApplet(Applet *applet)
|
|||||||
connect(applet, SIGNAL(configNeedsSaving()), this, SIGNAL(configNeedsSaving()));
|
connect(applet, SIGNAL(configNeedsSaving()), this, SIGNAL(configNeedsSaving()));
|
||||||
connect(applet, SIGNAL(appletDeleted(Plasma::Applet*)), this, SLOT(appletDeleted(Plasma::Applet*)));
|
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(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) {
|
if (!currentContainment) {
|
||||||
const bool isNew = applet->d->mainConfigGroup()->entryMap().isEmpty();
|
const bool isNew = applet->d->mainConfigGroup()->entryMap().isEmpty();
|
||||||
@ -535,7 +535,7 @@ void Containment::reactToScreenChange()
|
|||||||
emit screenChanged(newScreen);
|
emit screenChanged(newScreen);
|
||||||
|
|
||||||
if (newScreen >= 0) {
|
if (newScreen >= 0) {
|
||||||
emit activate();
|
emit activated();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -72,7 +72,7 @@ AppletInterface::AppletInterface(DeclarativeAppletScript *script, QQuickItem *pa
|
|||||||
connect(applet(), &Plasma::Applet::statusChanged,
|
connect(applet(), &Plasma::Applet::statusChanged,
|
||||||
this, &AppletInterface::statusChanged);
|
this, &AppletInterface::statusChanged);
|
||||||
|
|
||||||
connect(applet(), &Plasma::Applet::activate,
|
connect(applet(), &Plasma::Applet::activated,
|
||||||
[=] () {
|
[=] () {
|
||||||
setExpanded(true);
|
setExpanded(true);
|
||||||
if (QQuickItem *i = qobject_cast<QQuickItem *>(fullRepresentationItem())) {
|
if (QQuickItem *i = qobject_cast<QQuickItem *>(fullRepresentationItem())) {
|
||||||
|
Loading…
Reference in New Issue
Block a user