diff --git a/private/extenderapplet.cpp b/private/extenderapplet.cpp index 3a7004266..3905f4536 100644 --- a/private/extenderapplet.cpp +++ b/private/extenderapplet.cpp @@ -25,9 +25,9 @@ #include ExtenderApplet::ExtenderApplet(QObject *parent, const QVariantList &args) - : Plasma::Applet(parent, args) + : Plasma::PopupApplet(parent, args) { - setSizePolicy(QSizePolicy::Expanding, QSizePolicy::Fixed); + setPopupIcon("utilities-desktop-extra"); } ExtenderApplet::~ExtenderApplet() @@ -52,7 +52,7 @@ void ExtenderApplet::init() void ExtenderApplet::itemDetached(Plasma::ExtenderItem *) { - if (!extender()->attachedItems().count()) { + if (extender()->attachedItems().isEmpty()) { destroy(); } } diff --git a/private/extenderapplet_p.h b/private/extenderapplet_p.h index 6b49ab40e..ce5c9e290 100644 --- a/private/extenderapplet_p.h +++ b/private/extenderapplet_p.h @@ -20,14 +20,14 @@ #ifndef EXTENDERAPPLET_H #define EXTENDERAPPLET_H -#include "applet.h" +#include "popupapplet.h" /** * This class is used as a 'host' for detached extender items. When an extender item is dropped * somewhere, this applet is added at the location where the item is dropped, and the item is added * to it's extender. */ -class ExtenderApplet : public Plasma::Applet +class ExtenderApplet : public Plasma::PopupApplet { Q_OBJECT public: diff --git a/servicetypes/plasma-applet-extenderapplet.desktop b/servicetypes/plasma-applet-extenderapplet.desktop index e4dc33539..5ce55ca21 100644 --- a/servicetypes/plasma-applet-extenderapplet.desktop +++ b/servicetypes/plasma-applet-extenderapplet.desktop @@ -22,6 +22,7 @@ Name[x-test]=xxInternal Extender Containerxx Name[zh_CN]=内部扩展容器 Name[zh_TW]=內部延伸容器 Type=Service +Icon=utilities-desktop-extra X-KDE-ServiceTypes=Plasma/Applet X-KDE-PluginInfo-Name=internal:extender X-KDE-PluginInfo-EnabledByDefault=false