remove RunnerManager::execQuery()

This commit is contained in:
Marco Martin 2013-04-08 13:14:17 +02:00
parent c3e2a6e671
commit 5a82aa9211
2 changed files with 0 additions and 61 deletions

View File

@ -766,51 +766,6 @@ void RunnerManager::launchQuery(const QString &untrimmedTerm, const QString &run
d->delayTimer.start(RunnerManagerPrivate::slowRunDelay);
}
bool RunnerManager::execQuery(const QString &term)
{
return execQuery(term, QString());
}
bool RunnerManager::execQuery(const QString &untrimmedTerm, const QString &runnerName)
{
QString term = untrimmedTerm.trimmed();
if (term.isEmpty()) {
reset();
return false;
}
if (d->runners.isEmpty()) {
d->loadRunners();
}
if (d->context.query() == term) {
// we already are searching for this!
emit matchesChanged(d->context.matches());
return false;
}
reset();
//kDebug() << "executing query about " << term << "on" << runnerName;
d->context.setQuery(term);
AbstractRunner *r = runner(runnerName);
if (!r) {
//kDebug() << "failed to find the runner";
return false;
}
if ((r->ignoredTypes() & d->context.type()) != 0) {
//kDebug() << "ignored!";
return false;
}
r->performMatch(d->context);
//kDebug() << "succeeded with" << d->context.matches().count() << "results";
emit matchesChanged(d->context.matches());
return true;
}
QString RunnerManager::query() const
{
return d->context.query();

View File

@ -252,22 +252,6 @@ class PLASMA_EXPORT RunnerManager : public QObject
*/
void launchQuery(const QString &term);
/**
* Execute a query, this method will only return when the query is executed
* This means that the method may be dangerous as it wait a variable amount
* of time for the runner to finish.
* The runner parameter is mandatory, to avoid launching unwanted runners.
* @param term the term we want to find matches for
* @param runner the runner we will use, it is mandatory
* @return 0 if nothing was launched, 1 if launched.
*/
bool execQuery(const QString &term, const QString &runnerName);
/**
* Convenience version of above
*/
bool execQuery(const QString &term);
/**
* Reset the current data and stops the query
*/