port more to new connect syntax to catch more errors
This commit is contained in:
parent
57add3903f
commit
86d89bf634
@ -699,7 +699,7 @@ QString Containment::containmentActions(const QString &trigger)
|
||||
|
||||
void Containment::setActivity(const QString &activityId)
|
||||
{
|
||||
if (activityId.isEmpty()) {
|
||||
if (activityId.isEmpty() || d->activityId == activityId) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -708,6 +708,7 @@ void Containment::setActivity(const QString &activityId)
|
||||
c.writeEntry("activityId", activityId);
|
||||
|
||||
emit configNeedsSaving();
|
||||
emit activityChanged(activityId);
|
||||
}
|
||||
|
||||
QString Containment::activity() const
|
||||
|
@ -337,6 +337,11 @@ Q_SIGNALS:
|
||||
*/
|
||||
void appletRemoved(Plasma::Applet *applet);
|
||||
|
||||
/**
|
||||
* Emitted when the activity id has changed
|
||||
*/
|
||||
void activityChanged(const QString &activity);
|
||||
|
||||
/**
|
||||
* Emitted when the user clicks on the toolbox
|
||||
*/
|
||||
|
@ -47,16 +47,16 @@ ContainmentInterface::ContainmentInterface(DeclarativeAppletScript *parent)
|
||||
this, &ContainmentInterface::appletRemovedForward);
|
||||
connect(containment(), &Plasma::Containment::appletAdded,
|
||||
this, &ContainmentInterface::appletAddedForward);
|
||||
connect(containment(), SIGNAL(screenChanged(int, int, Plasma::Containment*)),
|
||||
this, SIGNAL(screenChanged()));
|
||||
connect(containment(), SIGNAL(activityChanged()),
|
||||
this, SIGNAL(activityChanged()));
|
||||
connect(containment(), SIGNAL(wallpaperChanged()),
|
||||
this, SLOT(loadWallpaper()));
|
||||
connect(containment(), &Plasma::Containment::screenChanged,
|
||||
this, &ContainmentInterface::screenChanged);
|
||||
connect(containment(), &Plasma::Containment::activityChanged,
|
||||
this, &ContainmentInterface::activityChanged);
|
||||
connect(containment(), &Plasma::Containment::wallpaperChanged,
|
||||
this, &ContainmentInterface::loadWallpaper);
|
||||
|
||||
if (containment()->corona()) {
|
||||
connect(containment()->corona(), SIGNAL(availableScreenRegionChanged()),
|
||||
this, SIGNAL(availableScreenRegionChanged()));
|
||||
connect(containment()->corona(), &Plasma::Corona::availableScreenRegionChanged,
|
||||
this, &ContainmentInterface::availableScreenRegionChanged);
|
||||
}
|
||||
loadWallpaper();
|
||||
}
|
||||
@ -200,7 +200,7 @@ void ContainmentInterface::loadWallpaper()
|
||||
}
|
||||
}
|
||||
|
||||
QString ContainmentInterface::activityId() const
|
||||
QString ContainmentInterface::activity() const
|
||||
{
|
||||
return containment()->activity();
|
||||
}
|
||||
|
@ -36,7 +36,7 @@ class ContainmentInterface : public AppletInterface
|
||||
Q_PROPERTY(bool drawWallpaper READ drawWallpaper WRITE setDrawWallpaper)
|
||||
Q_PROPERTY(Type containmentType READ containmentType WRITE setContainmentType)
|
||||
Q_PROPERTY(int screen READ screen NOTIFY screenChanged)
|
||||
Q_PROPERTY(QString activityId READ activityId NOTIFY activityIdChanged)
|
||||
Q_PROPERTY(QString activity READ activity NOTIFY activityChanged)
|
||||
Q_ENUMS(Type)
|
||||
|
||||
public:
|
||||
@ -60,7 +60,7 @@ public:
|
||||
void setContainmentType(Type type);
|
||||
int screen() const;
|
||||
|
||||
QString activityId() const;
|
||||
QString activity() const;
|
||||
|
||||
Q_INVOKABLE QRectF screenGeometry(int id) const;
|
||||
Q_INVOKABLE QVariantList availableScreenRegion(int id) const;
|
||||
@ -76,7 +76,7 @@ Q_SIGNALS:
|
||||
void appletAdded(QObject *applet);
|
||||
void appletRemoved(QObject *applet);
|
||||
void screenChanged();
|
||||
void activityIdChanged();
|
||||
void activityChanged();
|
||||
void availableScreenRegionChanged();
|
||||
void appletsChanged();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user