provide a place for runners to put their config. no, not overly performant but this really shouldn't need to be
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=747296
This commit is contained in:
parent
bf9bd90ec8
commit
5fc323b7db
|
@ -48,6 +48,16 @@ AbstractRunner::~AbstractRunner()
|
|||
delete d;
|
||||
}
|
||||
|
||||
KConfigGroup AbstractRunner::config() const
|
||||
{
|
||||
QString group = objectName();
|
||||
if (group.isEmpty()) {
|
||||
group = "UnnamedRunner";
|
||||
}
|
||||
|
||||
return KConfigGroup(&KConfigGroup(KGlobal::config(), "Runners"), group);
|
||||
}
|
||||
|
||||
void AbstractRunner::performMatch( Plasma::SearchContext &globalContext )
|
||||
{
|
||||
Plasma::SearchContext localContext( 0, globalContext );
|
||||
|
|
|
@ -23,6 +23,8 @@
|
|||
#include <QtCore/QObject>
|
||||
#include <QtCore/QStringList>
|
||||
|
||||
#include <KConfigGroup>
|
||||
|
||||
#include <plasma/plasma_export.h>
|
||||
#include <plasma/searchmatch.h>
|
||||
#include <plasma/searchcontext.h>
|
||||
|
@ -60,6 +62,11 @@ class PLASMA_EXPORT AbstractRunner : public QObject
|
|||
explicit AbstractRunner(QObject* parent = 0);
|
||||
virtual ~AbstractRunner();
|
||||
|
||||
/**
|
||||
* Provides access to the runner's configuration object.
|
||||
*/
|
||||
KConfigGroup config() const;
|
||||
|
||||
/**
|
||||
* If the runner can run precisely this term, return a QAction, else
|
||||
* return 0. The first runner that returns a QAction will be the
|
||||
|
|
Loading…
Reference in New Issue
Block a user