broulik added inline comments. INLINE COMMENTS
> slavebase.cpp:189 > + } > + if (config != nullptr) { > + delete config; `delete nullptr` is fine, no need to check first > slavebase.cpp:281 > d->needSendCanResume = false; > - d->config = new KConfig(QString(), KConfig::SimpleConfig); > - // The KConfigGroup needs the KConfig to exist during its whole lifetime. > - d->configGroup = new KConfigGroup(d->config, QString()); > + d->mapConfig = QMap<QString, QString>(); > d->onHold = false; This is initialized automatically like this > slavebase.cpp:290 > { > - delete d->configGroup; > - delete d->config; Don't you still want this? > slavebase.cpp:417 > { > + if (d->config == nullptr) { > + d->config = new KConfig(QString(), KConfig::SimpleConfig); Just check `if (!d->config)` REPOSITORY R241 KIO REVISION DETAIL https://phabricator.kde.org/D23523 To: meven, davidedmundson, dfaure, #frameworks Cc: broulik, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns