KIO
kprotocolinfo.cpp
107 // currently QVariant::Type and ExtraField::Type use the same subset of values, so we can just cast.
108 m_extraFields.append(KProtocolInfo::ExtraField(*it, static_cast<KProtocolInfo::ExtraField::Type>(type)));
121 KProtocolInfoPrivate::KProtocolInfoPrivate(const QString &name, const QString &exec, const QJsonObject &json)
165 m_determineMimetypeFromExtension = json.value(QStringLiteral("determineMimetypeFromExtension")).toBool(true);
208 const QStringList extraNames = KJsonUtils::readTranslatedValue(json, QStringLiteral("ExtraNames")).toVariant().toStringList();
209 const QStringList extraTypes = json.value(QStringLiteral("ExtraTypes")).toVariant().toStringList();
213 // currently QVariant::Type and ExtraField::Type use the same subset of values, so we can just cast.
214 return KProtocolInfo::ExtraField(name, static_cast<KProtocolInfo::ExtraField::Type>(variantType));
217 std::transform(extraNames.cbegin(), extraNames.cend(), extraTypes.cbegin(), std::back_inserter(m_extraFields), func);
224 m_showPreviews = json.value(QStringLiteral("ShowPreviews")).toBool(m_protClass == QLatin1String(":local"));
229 m_slaveHandlesNotify = json.value(QStringLiteral("slaveHandlesNotify")).toVariant().toStringList();
260 if (auto service = KApplicationTrader::preferredService(QLatin1String("x-scheme-handler/") + _protocol)) {
bool toBool(bool defaultValue) const const
QString readEntry(const char *key, const char *aDefault=nullptr) const
static QString exec(const QString &protocol)
Returns the library / executable to open for the protocol protocol Example : "kio_ftp",...
Definition: kprotocolinfo.cpp:325
QString toString(const T &enumerator)
static QStringList capabilities(const QString &protocol)
Returns the list of capabilities provided by the KIO worker implementing this protocol.
Definition: kprotocolinfo.cpp:383
Definition of an extra field in the UDS entries, returned by a listDir operation.
Definition: kprotocolinfo.h:96
static int maxSlaves(const QString &protocol)
Returns the soft limit on the number of slaves for this protocol.
Definition: kprotocolinfo.cpp:282
static bool isHelperProtocol(const QUrl &url)
Returns whether the protocol can act as a helper protocol.
Definition: kprotocolinfo.cpp:430
Type type(const QSqlDatabase &db)
QString scheme() const const
static QString config(const QString &protocol)
Returns the name of the config file associated with the specified protocol.
Definition: kprotocolinfo.cpp:270
QString & prepend(QChar ch)
QVariant::Type nameToType(const char *name)
static int maxWorkers(const QString &protocol)
Returns the soft limit on the number of KIO workers for this protocol.
Definition: kprotocolinfo.cpp:295
QString toString() const const
static ExtraFieldList extraFields(const QUrl &url)
Definition of extra fields in the UDS entries, returned by a listDir operation.
Definition: kprotocolinfo.cpp:334
Definition: ksslerroruidata.h:17
static bool isKnownProtocol(const QUrl &url)
Returns whether a protocol is installed that is able to handle url.
Definition: kprotocolinfo.cpp:445
static QString docPath(const QString &protocol)
Returns the documentation path for the specified protocol.
Definition: kprotocolinfo.cpp:354
int size() const const
KSERVICE_EXPORT KService::Ptr preferredService(const QString &mimeType)
static bool determineMimetypeFromExtension(const QString &protocol)
Returns whether MIME types can be determined based on extension for this protocol.
Definition: kprotocolinfo.cpp:315
QJsonValue value(const QString &key) const const
QVariant toVariant() const const
QList::const_iterator cend() const const
static int maxSlavesPerHost(const QString &protocol)
Returns the limit on the number of slaves for this protocol per host.
Definition: kprotocolinfo.cpp:289
static QString defaultMimetype(const QString &protocol)
Returns the default MIME type for the specified protocol, if one exists.
Definition: kprotocolinfo.cpp:344
KSharedConfigPtr config()
static QStringList slaveHandlesNotify(const QString &protocol)
Returns the list of notification types the kioslave implementing this protocol will produce on its ow...
Definition: kprotocolinfo.cpp:404
static bool showFilePreview(const QString &protocol)
Returns whether file previews should be shown for the specified protocol.
Definition: kprotocolinfo.cpp:374
QString toLower() const const
static bool isFilterProtocol(const QUrl &url)
Returns whether the protocol can act as a filter protocol.
Definition: kprotocolinfo.cpp:425
static QString icon(const QString &protocol)
Returns the name of the icon, associated with the specified protocol.
Definition: kprotocolinfo.cpp:255
QString name(StandardShortcut id)
QList::const_iterator cbegin() const const
static int maxWorkersPerHost(const QString &protocol)
Returns the limit on the number of KIO workers for this protocol per host.
Definition: kprotocolinfo.cpp:305
static QStringList archiveMimetypes(const QString &protocol)
Returns the list of archive MIME types handled by the KIO worker implementing this protocol.
Definition: kprotocolinfo.cpp:393
void clear()
QStringList toStringList() const const
Type
SimpleConfig
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:415
static QString protocolClass(const QString &protocol)
Returns the protocol class for the specified protocol.
Definition: kprotocolinfo.cpp:364
This file is part of the KDE documentation.
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:54:43 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
Documentation copyright © 1996-2023 The KDE developers.
Generated on Mon May 8 2023 03:54:43 by doxygen 1.8.17 written by Dimitri van Heesch, © 1997-2006
KDE's Doxygen guidelines are available online.