KIO::WorkerConfig Class
class KIO::WorkerConfigThis class manages the configuration for KIO workers based on protocol and host. More...
Header: | #include <KIO/WorkerConfig> |
CMake: | find_package(KF6 REQUIRED COMPONENTS KIO) target_link_libraries(mytarget PRIVATE KF6::KIOCore) |
Inherits: | QObject |
Public Functions
KIO::MetaData | configData(const QString &protocol, const QString &host) |
QString | configData(const QString &protocol, const QString &host, const QString &key) |
void | reset() |
void | setConfigData(const QString &protocol, const QString &host, const KIO::MetaData &config) |
void | setConfigData(const QString &protocol, const QString &host, const QString &key, const QString &value) |
Signals
void | configNeeded(const QString &protocol, const QString &host) |
Detailed Description
The Scheduler makes use of this class to configure the worker whenever it has to connect to a new host.
You only need to use this class if you want to override specific configuration items of an KIO worker when the worker is used by your application.
Normally KIO workers are being configured by "kio_<protocol>rc" configuration files. Groups defined in such files are treated as host or domain specification. Configuration items defined in a group are only applied when the worker is connecting with a host that matches with the host and/or domain specified by the group.
Member Function Documentation
KIO::MetaData WorkerConfig::configData(const QString &protocol, const QString &host)
Query worker configuration for workers of type protocol when dealing with host.
See also setConfigData().
QString WorkerConfig::configData(const QString &protocol, const QString &host, const QString &key)
Query a specific configuration key for workers of type protocol when dealing with host.
[signal]
void WorkerConfig::configNeeded(const QString &protocol, const QString &host)
This signal is raised when a worker of type protocol deals with host for the first time.
Your application can use this signal to make some last minute configuration changes with setConfigData based on the host.
void WorkerConfig::reset()
Undo any changes made by calls to setConfigData.
void WorkerConfig::setConfigData(const QString &protocol, const QString &host, const KIO::MetaData &config)
Configure workers of type protocol with config. If host is specified the configuration only applies when dealing with host.
Changes made to the worker configuration only apply to workers used by the current process.
See also configData().
void WorkerConfig::setConfigData(const QString &protocol, const QString &host, const QString &key, const QString &value)
Configure workers of type protocol by setting key to value. If host is specified the configuration only applies when dealing with host.
Changes made to the worker configuration only apply to workers used by the current process.