Changeset View
Changeset View
Standalone View
Standalone View
src/core/slavebase.cpp
Show First 20 Lines • Show All 432 Lines • ▼ Show 20 Line(s) | 426 | { | |||
---|---|---|---|---|---|
433 | return false; | 433 | return false; | ||
434 | } | 434 | } | ||
435 | 435 | | |||
436 | QMap<QString, QVariant> SlaveBase::mapConfig() const | 436 | QMap<QString, QVariant> SlaveBase::mapConfig() const | ||
437 | { | 437 | { | ||
438 | return d->mapConfig; | 438 | return d->mapConfig; | ||
439 | } | 439 | } | ||
440 | 440 | | |||
441 | bool SlaveBase::configValue(QString key, bool defaultValue) const | ||||
442 | { | ||||
443 | return d->mapConfig.value(key, defaultValue).toBool(); | ||||
444 | } | ||||
445 | | ||||
446 | int SlaveBase::configValue(QString key, int defaultValue) const | ||||
447 | { | ||||
448 | return d->mapConfig.value(key, defaultValue).toInt(); | ||||
449 | } | ||||
450 | | ||||
451 | QString SlaveBase::configValue(QString key, const QString &defaultValue) const | ||||
452 | { | ||||
453 | return d->mapConfig.value(key, defaultValue).toString(); | ||||
454 | } | ||||
455 | | ||||
441 | KConfigGroup *SlaveBase::config() | 456 | KConfigGroup *SlaveBase::config() | ||
442 | { | 457 | { | ||
443 | if (!d->config) { | 458 | if (!d->config) { | ||
444 | d->config = new KConfig(QString(), KConfig::SimpleConfig); | 459 | d->config = new KConfig(QString(), KConfig::SimpleConfig); | ||
445 | 460 | | |||
446 | d->configGroup = new KConfigGroup(d->config, QString()); | 461 | d->configGroup = new KConfigGroup(d->config, QString()); | ||
447 | 462 | | |||
448 | auto end = d->mapConfig.cend(); | 463 | auto end = d->mapConfig.cend(); | ||
▲ Show 20 Lines • Show All 1105 Lines • Show Last 20 Lines |