mimetype() -> mimeType()
svn path=/trunk/KDE/kdebase/workspace/libs/plasma/; revision=800638
This commit is contained in:
parent
6a02406401
commit
2127d62ae6
@ -90,7 +90,7 @@ class SearchContext::Private
|
|||||||
QReadWriteLock lock;
|
QReadWriteLock lock;
|
||||||
QList<SearchMatch *> matches;
|
QList<SearchMatch *> matches;
|
||||||
QString term;
|
QString term;
|
||||||
QString mimetype;
|
QString mimeType;
|
||||||
SearchContext::Type type;
|
SearchContext::Type type;
|
||||||
KCompletion *completer;
|
KCompletion *completer;
|
||||||
const SearchContext::DataPolicy policy;
|
const SearchContext::DataPolicy policy;
|
||||||
@ -109,7 +109,7 @@ SearchContext::SearchContext(QObject *parent, const SearchContext &other)
|
|||||||
{
|
{
|
||||||
other.d->lockForRead();
|
other.d->lockForRead();
|
||||||
d->term = other.d->term;
|
d->term = other.d->term;
|
||||||
d->mimetype = other.d->mimetype;
|
d->mimeType = other.d->mimeType;
|
||||||
d->type = other.d->type;
|
d->type = other.d->type;
|
||||||
other.d->unlock();
|
other.d->unlock();
|
||||||
}
|
}
|
||||||
@ -127,7 +127,7 @@ void SearchContext::resetSearchTerm(const QString &term)
|
|||||||
d->matches.clear();
|
d->matches.clear();
|
||||||
d->type = SearchContext::UnknownType;
|
d->type = SearchContext::UnknownType;
|
||||||
d->term.clear();
|
d->term.clear();
|
||||||
d->mimetype.clear();
|
d->mimeType.clear();
|
||||||
|
|
||||||
if (d->completer) {
|
if (d->completer) {
|
||||||
d->completer->clear();
|
d->completer->clear();
|
||||||
@ -179,12 +179,12 @@ void SearchContext::determineType()
|
|||||||
QFileInfo info(path);
|
QFileInfo info(path);
|
||||||
if (info.isDir()) {
|
if (info.isDir()) {
|
||||||
d->type = Directory;
|
d->type = Directory;
|
||||||
d->mimetype = "inode/folder";
|
d->mimeType = "inode/folder";
|
||||||
} else {
|
} else {
|
||||||
d->type = File;
|
d->type = File;
|
||||||
KMimeType::Ptr mimetype = KMimeType::findByPath(path);
|
KMimeType::Ptr mimeType = KMimeType::findByPath(path);
|
||||||
if (mimetype) {
|
if (mimeType) {
|
||||||
d->mimetype = mimetype->name();
|
d->mimeType = mimeType->name();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (term.contains('.')) {
|
} else if (term.contains('.')) {
|
||||||
@ -208,9 +208,9 @@ SearchContext::Type SearchContext::type() const
|
|||||||
return d->type;
|
return d->type;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString SearchContext::mimetype() const
|
QString SearchContext::mimeType() const
|
||||||
{
|
{
|
||||||
return d->mimetype;
|
return d->mimeType;
|
||||||
}
|
}
|
||||||
|
|
||||||
KCompletion* SearchContext::completionObject() const
|
KCompletion* SearchContext::completionObject() const
|
||||||
|
@ -99,7 +99,7 @@ class PLASMA_EXPORT SearchContext : public QObject
|
|||||||
* the mimetype of the object being referred to by the search
|
* the mimetype of the object being referred to by the search
|
||||||
* string.
|
* string.
|
||||||
*/
|
*/
|
||||||
QString mimetype() const;
|
QString mimeType() const;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @return a completion object that can be used with UI elements
|
* @return a completion object that can be used with UI elements
|
||||||
|
Loading…
Reference in New Issue
Block a user