plasma: remove unused Plasma::RunnerContext MIME type info

runners can determine it anyway, generic type detection is done already

Signed-off-by: Ivailo Monev <xakepa10@gmail.com>
This commit is contained in:
Ivailo Monev 2024-04-18 01:02:11 +03:00
parent b2a66f5a72
commit 747c37269b
2 changed files with 0 additions and 26 deletions

View file

@ -30,7 +30,6 @@
#include <kcompletion.h>
#include <kconfiggroup.h>
#include <kdebug.h>
#include <kmimetype.h>
#include <kshell.h>
#include <kstandarddirs.h>
#include <kurl.h>
@ -164,10 +163,6 @@ class RunnerContextPrivate : public QSharedData
//kDebug() << "boo yeah" << type;
}
~RunnerContextPrivate()
{
}
/**
* Determines type of query
*/
@ -218,13 +213,8 @@ class RunnerContextPrivate : public QSharedData
}
if (info.isDir()) {
type = RunnerContext::Directory;
mimeType = "inode/folder";
} else if (info.isFile()) {
type = RunnerContext::File;
KMimeType::Ptr mimeTypePtr = KMimeType::findByPath(path);
if (mimeTypePtr) {
mimeType = mimeTypePtr->name();
}
}
}
}
@ -243,7 +233,6 @@ class RunnerContextPrivate : public QSharedData
QList<QueryMatch> matches;
QMap<QString, const QueryMatch*> matchesById;
QString term;
QString mimeType;
RunnerContext::Type type;
RunnerContext * q;
static RunnerContext s_dummyContext;
@ -313,7 +302,6 @@ void RunnerContext::reset()
}
d->term.clear();
d->mimeType.clear();
d->type = UnknownType;
// kDebug() << "match count" << d->matches.count();
}
@ -343,11 +331,6 @@ RunnerContext::Type RunnerContext::type() const
return d->type;
}
QString RunnerContext::mimeType() const
{
return d->mimeType;
}
bool RunnerContext::isValid() const
{
// if the qptr is dirty, it is not valid

View file

@ -100,15 +100,6 @@ public:
*/
Type type() const;
/**
* The mimetype that the search term refers to, if discoverable.
*
* @return QString() if the mimetype can not be determined, otherwise
* the mimetype of the object being referred to by the search
* string.
*/
QString mimeType() const;
/**
* @returns true if this context is no longer valid and therefore
* matching using it should abort. Most useful as an optimization technique