KService
kplugininfo.cpp
187 enabledByDefault = enabledByDefault.toString().compare(QLatin1String("true"), Qt::CaseInsensitive) == 0;
213 static KPluginMetaData fromCompatibilityJson(const QJsonObject &json, const QString &lib, const QString &metaDataFile, bool warnOnOldStyle)
215 // This is not added to KPluginMetaData(QJsonObject, QString) to ensure that all the compatility code
267 KPluginInfo::KPluginInfo(const QString &filename /*, QStandardPaths::StandardLocation resource*/)
274 qCWarning(SERVICES) << filename << "has no desktop group, cannot construct a KPluginInfo object from it.";
436 QList<KPluginInfo> KPluginInfo::fromServices(const KService::List &services, const KConfigGroup &config)
455 std::transform(files.cbegin(), files.cend(), std::back_inserter(infolist), [&config](const QString &file) {
465 QList<KPluginInfo> KPluginInfo::fromKPartsInstanceName(const QString &name, const KConfigGroup &config)
469 QStandardPaths::locateAll(QStandardPaths::GenericDataLocation, name + QLatin1String("/kpartplugins"), QStandardPaths::LocateDirectory);
615 KServiceTypeTrader::self()->query(QStringLiteral("KCModule"), QLatin1Char('\'') + pluginName() + QLatin1String("' in [X-KDE-ParentComponents]"));
645 const QMetaType::Type t = KSycocaPrivate::self()->serviceTypeFactory()->findPropertyTypeByName(key);
670 qWarning("Calling KPluginInfo::property(\"%s\") is deprecated, use KPluginInfo::" #ret " in \"%s\" instead.", \
743 setPluginEnabled(d->config.readEntry(pluginName() + s_enabledKey(), isPluginEnabledByDefault()));
static KSycoca * self()
Get or create the only instance of KSycoca (read-only)
Definition: ksycoca.cpp:379
void append(const T &value)
QString readEntry(const char *key, const char *aDefault=nullptr) const
void writeEntry(const char *key, const char *value, WriteConfigFlags pFlags=Normal)
QJsonObject rawData() const
bool endsWith(const QString &s, Qt::CaseSensitivity cs) const const
void squeeze()
bool isValid() const const
LocateDirectory
static KPluginInfo::List fromServices(const KService::List &services, const KConfigGroup &config=KConfigGroup())
Definition: kplugininfo.cpp:436
int size() const const
CaseInsensitive
static KPluginInfo::List fromKPartsInstanceName(const QString &componentName, const KConfigGroup &config=KConfigGroup())
Definition: kplugininfo.cpp:465
KCOREADDONS_EXPORT void setMetaData(const MetaDataMap &metaData, QMimeData *mimeData)
QString metaDataFileName() const
T value() const const
bool hasNext() const const
bool operator>(const KPluginInfo &rhs) const
Greater than relation comparing the categories and if they are the same using the names.
Definition: kplugininfo.cpp:420
void clear()
void append(const T &value)
QJsonObject fromVariantMap(const QVariantMap &map)
bool isValid() const
QString fileName() const
QString toString() const const
void load(const KConfigGroup &config=KConfigGroup())
Load the state of the plugin - enabled or not.
Definition: kplugininfo.cpp:732
static QStringList readStringList(const QJsonObject &jo, const QString &key)
static KPluginInfo::List fromFiles(const QStringList &files, const KConfigGroup &config=KConfigGroup())
Definition: kplugininfo.cpp:450
void reserve(int size)
QString next()
static KPluginInfo fromMetaData(const KPluginMetaData &meta)
Definition: kplugininfo.cpp:758
bool contains(const QString &key) const const
Type
void reserve(int alloc)
bool exists() const
int size() const const
QString fileName() const
QJsonObject::iterator insert(const QString &key, const QJsonValue &value)
QMimeType mimeTypeForName(const QString &nameOrAlias) const const
bool isEmpty() const const
int length() const const
QJsonArray fromStringList(const QStringList &list)
Definition: kplugininfo.h:42
static QString readTranslatedString(const QJsonObject &jo, const QString &key, const QString &defaultValue=QString())
KCALENDARCORE_EXPORT uint qHash(const KCalendarCore::Period &key)
bool isEmpty() const const
QJsonValue value(const QString &key) const const
QList::const_iterator cend() const const
static KServiceTypeTrader * self()
This is a static pointer to the KServiceTypeTrader singleton.
Definition: kservicetypetrader.cpp:40
bool isValid() const const
KSharedConfigPtr config()
bool operator<(const KPluginInfo &rhs) const
Less than relation comparing the categories and if they are the same using the names.
Definition: kplugininfo.cpp:409
KDB_EXPORT QStringList deserializeList(const QString &data)
void setPluginEnabled(bool enabled)
Set whether the plugin is currently loaded.
Definition: kplugininfo.cpp:486
void reserve(int size)
bool isBool() const const
QMap< QString, QVariant > toMap() const const
bool canConvert(int targetTypeId) const const
typedef ConstIterator
KConfigGroup desktopGroup() const
GenericDataLocation
bool operator==(const KPluginInfo &rhs) const
Compares two objects whether they share the same data.
Definition: kplugininfo.cpp:399
void setConfig(const KConfigGroup &config)
Set the KConfigGroup to use for load()ing and save()ing the configuration.
Definition: kplugininfo.cpp:624
void save(KConfigGroup config=KConfigGroup())
Save state of the plugin - enabled or not.
Definition: kplugininfo.cpp:717
QString name(StandardShortcut id)
KStandardDirs * dirs()
QStringList locateAll(QStandardPaths::StandardLocation type, const QString &fileName, QStandardPaths::LocateOptions options)
QList::const_iterator cbegin() const const
QList< QVariant > toList() const const
QStringList mimeTypes(Mode mode=Writing)
QList::iterator begin()
int compare(const QString &other, Qt::CaseSensitivity cs) const const
static KPluginMetaData fromDesktopFile(const QString &file, const QStringList &serviceTypes=QStringList())
KService::List query(const QString &servicetype, const QString &constraint=QString()) const
The main function in the KServiceTypeTrader class.
Definition: kservicetypetrader.cpp:120
bool operator!=(const KPluginInfo &rhs) const
Compares two objects whether they don't share the same data.
Definition: kplugininfo.cpp:404
QList::iterator end()
QJsonValue fromVariant(const QVariant &variant)
bool isPluginEnabledByDefault() const
Definition: kplugininfo.cpp:500
KPluginInfo & operator=(const KPluginInfo &rhs)
Copies the KPluginInfo object to share the data with copy.
Definition: kplugininfo.cpp:393
QString toString() const const
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 03:55:38 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Tue Dec 5 2023 03:55:38 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.