KIO
kprotocolinfo.cpp
25KProtocolInfoPrivate::KProtocolInfoPrivate(const QString &name, const QString &exec, const QJsonObject &json)
69 m_determineMimetypeFromExtension = json.value(QStringLiteral("determineMimetypeFromExtension")).toBool(true);
112 const QStringList extraNames = KJsonUtils::readTranslatedValue(json, QStringLiteral("ExtraNames")).toVariant().toStringList();
113 const QStringList extraTypes = json.value(QStringLiteral("ExtraTypes")).toVariant().toStringList();
117 // currently QMetaType::Type and ExtraField::Type use the same subset of values, so we can just cast.
121 std::transform(extraNames.cbegin(), extraNames.cend(), extraTypes.cbegin(), std::back_inserter(m_extraFields), func);
128 m_showPreviews = json.value(QStringLiteral("ShowPreviews")).toBool(m_protClass == QLatin1String(":local"));
160 if (auto service = KApplicationTrader::preferredService(QLatin1String("x-scheme-handler/") + _protocol)) {
QString readEntry(const char *key, const char *aDefault=nullptr) const
static QString config(const QString &protocol)
Returns the name of the config file associated with the specified protocol.
Definition kprotocolinfo.cpp:170
static QString protocolClass(const QString &protocol)
Returns the protocol class for the specified protocol.
Definition kprotocolinfo.cpp:250
static bool determineMimetypeFromExtension(const QString &protocol)
Returns whether MIME types can be determined based on extension for this protocol.
Definition kprotocolinfo.cpp:201
static bool showFilePreview(const QString &protocol)
Returns whether file previews should be shown for the specified protocol.
Definition kprotocolinfo.cpp:260
static QString proxiedBy(const QString &protocol)
Returns the name of the protocol through which the request will be routed if proxy support is enabled...
Definition kprotocolinfo.cpp:290
static QStringList archiveMimetypes(const QString &protocol)
Returns the list of archive MIME types handled by the KIO worker implementing this protocol.
Definition kprotocolinfo.cpp:279
static QStringList capabilities(const QString &protocol)
Returns the list of capabilities provided by the KIO worker implementing this protocol.
Definition kprotocolinfo.cpp:269
static int maxWorkersPerHost(const QString &protocol)
Returns the limit on the number of KIO workers for this protocol per host.
Definition kprotocolinfo.cpp:191
static QString docPath(const QString &protocol)
Returns the documentation path for the specified protocol.
Definition kprotocolinfo.cpp:240
static bool isKnownProtocol(const QUrl &url)
Returns whether a protocol is installed that is able to handle url.
Definition kprotocolinfo.cpp:321
static QString icon(const QString &protocol)
Returns the name of the icon, associated with the specified protocol.
Definition kprotocolinfo.cpp:155
static QString exec(const QString &protocol)
Returns the library / executable to open for the protocol protocol Example : "kio_ftp",...
Definition kprotocolinfo.cpp:211
static int maxWorkers(const QString &protocol)
Returns the soft limit on the number of KIO workers for this protocol.
Definition kprotocolinfo.cpp:181
static ExtraFieldList extraFields(const QUrl &url)
Definition of extra fields in the UDS entries, returned by a listDir operation.
Definition kprotocolinfo.cpp:220
static bool isHelperProtocol(const QUrl &url)
Returns whether the protocol can act as a helper protocol.
Definition kprotocolinfo.cpp:306
static bool isFilterProtocol(const QUrl &url)
Returns whether the protocol can act as a filter protocol.
Definition kprotocolinfo.cpp:301
static QString defaultMimetype(const QString &protocol)
Returns the default MIME type for the specified protocol, if one exists.
Definition kprotocolinfo.cpp:230
Type type(const QSqlDatabase &db)
char * toString(const EngineQuery &query)
KSERVICE_EXPORT KService::Ptr preferredService(const QString &mimeType)
QString name(StandardAction id)
QJsonValue value(QLatin1StringView key) const const
bool toBool(bool defaultValue) const const
QString toString() const const
QVariant toVariant() const const
const_iterator cbegin() const const
const_iterator cend() const const
qsizetype size() const const
QMetaType fromName(QByteArrayView typeName)
int id() const const
QString arg(Args &&... args) const const
QString scheme() const const
QStringList toStringList() const const
Definition of an extra field in the UDS entries, returned by a listDir operation.
Definition kprotocolinfo.h:96
This file is part of the KDE documentation.
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2024 The KDE developers.
Generated on Mon Nov 18 2024 12:16:27 by doxygen 1.12.0 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.