return after checking each runner for matches, so krunner is much more responsive, also disable much of SearchContext::setSearchTerm because its very slow (with aseigos blessing
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=734512
This commit is contained in:
parent
de2dba69a9
commit
1370f1153f
@ -100,40 +100,43 @@ void SearchContext::setSearchTerm(const QString &term)
|
|||||||
|
|
||||||
d->term = term;
|
d->term = term;
|
||||||
//FIXME: this is insanely slow =/
|
//FIXME: this is insanely slow =/
|
||||||
KUriFilterData filter(term);
|
|
||||||
bool filtered = KUriFilter::self()->filterUri(filter);
|
// the below lines commented out until we can find a much faster way to do the same
|
||||||
|
|
||||||
if (filtered) {
|
//KUriFilterData filter(term);
|
||||||
switch (filter.uriType()) {
|
//bool filtered = KUriFilter::self()->filterUri(filter);
|
||||||
case KUriFilterData::LocalDir:
|
|
||||||
d->type = Directory;
|
//if (filtered) {
|
||||||
d->mimetype = "inode/folder";
|
// switch (filter.uriType()) {
|
||||||
break;
|
// case KUriFilterData::LocalDir:
|
||||||
case KUriFilterData::LocalFile: {
|
// d->type = Directory;
|
||||||
d->type = File;
|
// d->mimetype = "inode/folder";
|
||||||
KMimeType::Ptr mimetype = KMimeType::findByPath(filter.uri().path());
|
// break;
|
||||||
if (mimetype) {
|
// case KUriFilterData::LocalFile: {
|
||||||
d->mimetype = mimetype->name();
|
// d->type = File;
|
||||||
}
|
// KMimeType::Ptr mimetype = KMimeType::findByPath(filter.uri().path());
|
||||||
break;
|
// if (mimetype) {
|
||||||
}
|
// d->mimetype = mimetype->name();
|
||||||
case KUriFilterData::NetProtocol:
|
// }
|
||||||
//kDebug() << "term is a network protocol?" << term << filter.uriType();
|
// break;
|
||||||
d->type = NetworkLocation;
|
// }
|
||||||
break;
|
// case KUriFilterData::NetProtocol:
|
||||||
case KUriFilterData::Executable:
|
// //kDebug() << "term is a network protocol?" << term << filter.uriType();
|
||||||
d->type = Executable;
|
// d->type = NetworkLocation;
|
||||||
break;
|
// break;
|
||||||
case KUriFilterData::Shell:
|
// case KUriFilterData::Executable:
|
||||||
d->type = ShellCommand;
|
// d->type = Executable;
|
||||||
break;
|
// break;
|
||||||
case KUriFilterData::Help:
|
// case KUriFilterData::Shell:
|
||||||
d->type = Help;
|
// d->type = ShellCommand;
|
||||||
break;
|
// break;
|
||||||
default:
|
// case KUriFilterData::Help:
|
||||||
break;
|
// d->type = Help;
|
||||||
}
|
// break;
|
||||||
}
|
// default:
|
||||||
|
// break;
|
||||||
|
// }
|
||||||
|
//}
|
||||||
}
|
}
|
||||||
|
|
||||||
QString SearchContext::searchTerm() const
|
QString SearchContext::searchTerm() const
|
||||||
|
Loading…
Reference in New Issue
Block a user