diff --git a/applet.cpp b/applet.cpp index 75b842838..cfcbba406 100644 --- a/applet.cpp +++ b/applet.cpp @@ -22,7 +22,9 @@ #include #include +#include #include +#include #include "applet.h" #include "interface.h" @@ -34,10 +36,10 @@ class Applet::Private { public: Private( KService::Ptr appletDescription, int uniqueID ) - : id( uniqueID ), + : appletId( uniqueID ), globalConfig( 0 ), appletConfig( 0 ), - appletDescription(appletDescription) + appletDescription( new KPluginInfo( appletDescription ) ) { } ~Private() @@ -45,23 +47,25 @@ class Applet::Private foreach ( const QString& engine, loadedEngines ) { Interface::self()->unloadDataEngine( engine ); } + delete appletDescription; } - int id; + int appletId; KSharedConfig::Ptr globalConfig; KSharedConfig::Ptr appletConfig; - KService::Ptr appletDescription; + KPluginInfo* appletDescription; QList watchedForFocus; QStringList loadedEngines; }; Applet::Applet( QGraphicsItem *parent, - KService::Ptr appletDescription, - int id ) + QString serviceID, + int appletId ) : QWidget( 0 ), - QGraphicsItemGroup( parent ), - d( new Private( appletDescription, id ) ) + QGraphicsItemGroup( parent ) { + KService::Ptr service = KService::serviceByStorageId( serviceID ); + d = new Private( service, appletId ); } Applet::~Applet() @@ -112,12 +116,12 @@ void Applet::constraintsUpdated() QString Applet::globalName() const { - return d->appletDescription->library(); + return d->appletDescription->service()->library(); } QString Applet::instanceName() const { - return d->appletDescription->library() + QString::number( d->id ); + return d->appletDescription->service()->library() + QString::number( d->appletId ); } void Applet::watchForFocus(QObject *widget, bool watch) diff --git a/applet.h b/applet.h index 5afe3e05c..b37ca1615 100644 --- a/applet.h +++ b/applet.h @@ -23,7 +23,6 @@ #include #include -#include #include "plasma.h" @@ -38,8 +37,8 @@ class KDE_EXPORT Applet : public QWidget, public QGraphicsItemGroup typedef QList List; Applet( QGraphicsItem* parent, - KService::Ptr appletDescription, - int id ); + QString serviceId, + int appletId ); ~Applet(); /** diff --git a/dataengine.h b/dataengine.h index 2d25fea64..f82ebaf5c 100644 --- a/dataengine.h +++ b/dataengine.h @@ -39,6 +39,7 @@ class KDE_EXPORT DataSource : public QObject public: typedef QHash Dict; typedef QHash Data; + typedef QHash Grouping; explicit DataSource(QObject* parent = 0); virtual ~DataSource(); diff --git a/runner.cpp b/runner.cpp index 4c9dd1bd9..a77fa719e 100644 --- a/runner.cpp +++ b/runner.cpp @@ -61,6 +61,11 @@ QWidget* Runner::options() return 0; } +QAction* Runner::exactMatch( ) +{ + return d->exactMatch; +} + QAction* Runner::exactMatch( const QString& term ) { delete d->exactMatch; diff --git a/runner.h b/runner.h index 5dedbef8c..dc12bf2fa 100644 --- a/runner.h +++ b/runner.h @@ -50,6 +50,11 @@ class KDE_EXPORT Runner : public QObject */ QAction* exactMatch( const QString& command ); + /** + * @return the last action generated by exactMatch( const QString& ) + */ + QAction* exactMatch( ); + /** * If the runner has options that the user can interact with to modify * what happens when exec or one of the actions created in fillMatches diff --git a/theme.cpp b/theme.cpp index fad4efbcd..9764cf044 100644 --- a/theme.cpp +++ b/theme.cpp @@ -54,7 +54,7 @@ QString Theme::themeName() const return d->themeName; } -QString Theme::imagePath( const QString& name ) const +QString Theme::image( const QString& name ) const { return KStandardDirs::locate( "data", "desktoptheme/" + d->themeName + diff --git a/theme.h b/theme.h index 7a4294acb..b9f48570d 100644 --- a/theme.h +++ b/theme.h @@ -35,7 +35,7 @@ class KDE_EXPORT Theme : public QObject ~Theme(); QString themeName() const; - QString imagePath( const QString& name ) const; + QString image( const QString& name ) const; signals: void changed();