Replacing exec() with run(): this change wasn't discussed during the tokamak meeting.

run() method is more obvious than exec() (don't forget that a runner run :) ).
Anyway during the meeting we have decided to replace createMatchOptions() with createRunOptions()
and (set)hasMatchOptions() with (set)hasRunOptions(), now with this commit we have a more coherent naming.
CCMAIL: panel-devel@kde.org

svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=802143
This commit is contained in:
Davide Bettio 2008-04-28 17:11:12 +00:00
parent f06d25a00c
commit c32f8a4511
6 changed files with 11 additions and 11 deletions

View File

@ -210,10 +210,10 @@ QMutex* AbstractRunner::bigLock() const
return &Private::bigLock;
}
void AbstractRunner::exec(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
void AbstractRunner::run(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
{
if (d->script) {
return d->script->exec(search, action);
return d->script->run(search, action);
}
}

View File

@ -89,8 +89,8 @@ class PLASMA_EXPORT AbstractRunner : public QObject
* The match will be activated if the user selects it.
*
* If this runner's exact match is selected, it will be passed into
* the exec method.
* @see exec
* the run method.
* @see run
*
* Since each runner is executed in its own thread there is no need
* to return from this method right away, nor to create all matches
@ -107,7 +107,7 @@ class PLASMA_EXPORT AbstractRunner : public QObject
/**
* 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
* what happens when run or one of the actions created in fillMatches
* is called, the runner should return true
*/
bool hasRunOptions();
@ -139,7 +139,7 @@ class PLASMA_EXPORT AbstractRunner : public QObject
* Called whenever an exact or possible match associated with this
* runner is triggered.
*/
virtual void exec(const Plasma::SearchContext *context, const Plasma::SearchMatch *action);
virtual void run(const Plasma::SearchContext *context, const Plasma::SearchMatch *action);
/**
* The nominal speed of the runner.

View File

@ -57,7 +57,7 @@ void RunnerScript::match(Plasma::SearchContext *search)
Q_UNUSED(search)
}
void RunnerScript::exec(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
void RunnerScript::run(const Plasma::SearchContext *search, const Plasma::SearchMatch *action)
{
Q_UNUSED(search)
Q_UNUSED(action)

View File

@ -68,7 +68,7 @@ public:
* Called whenever an exact or possible match associated with this
* runner is triggered.
*/
virtual void exec(const Plasma::SearchContext *search, const Plasma::SearchMatch *action);
virtual void run(const Plasma::SearchContext *search, const Plasma::SearchMatch *action);
protected:
/**

View File

@ -142,14 +142,14 @@ bool SearchMatch::operator<(const SearchMatch& other) const
return d->relevance < other.d->relevance;
}
void SearchMatch::exec(const SearchContext *context) const
void SearchMatch::run(const SearchContext *context) const
{
Q_ASSERT(context);
//kDebug() << "we have" << context->searchTerm() << context->mimetype();
if (d->runner) {
//TODO: this could be dangerous if the runner is deleted behind our backs.
d->runner->exec(context, this);
d->runner->run(context, this);
}
}

View File

@ -106,7 +106,7 @@ class PLASMA_EXPORT SearchMatch
bool operator<(const SearchMatch& other) const;
void exec(const SearchContext *context) const;
void run(const SearchContext *context) const;
private:
class Private;