diff --git a/src/provider/core/provider.h b/src/provider/core/provider.h --- a/src/provider/core/provider.h +++ b/src/provider/core/provider.h @@ -247,6 +247,18 @@ */ void surveyCompleted(const KUserFeedback::SurveyInfo &info); + /*! Manually load settings of the provider and all added data sources. + * Automatically invoked after object construction and changing product ID. + * @note Potentially long operation. + */ + void load(); + + /*! Manually store settings of the provider and all added data sources. + * Will be autromatically invoked upon @p QCoreApplication::aboutToQuit signal. + * @note Potentially long operation. + */ + void store(); + Q_SIGNALS: /*! Emitted whenever there is a new survey available that can be presented * to the user. @@ -274,8 +286,6 @@ // for UI Q_PRIVATE_SLOT(d, QByteArray jsonData(KUserFeedback::Provider::TelemetryMode)) // for testing - Q_PRIVATE_SLOT(d, void load()) - Q_PRIVATE_SLOT(d, void store()) Q_PRIVATE_SLOT(d, bool selectSurvey(const KUserFeedback::SurveyInfo&)) }; diff --git a/src/provider/core/provider.cpp b/src/provider/core/provider.cpp --- a/src/provider/core/provider.cpp +++ b/src/provider/core/provider.cpp @@ -609,6 +609,16 @@ d->storeOneGlobal(QStringLiteral("LastSurvey"), d->lastSurveyTime); } +void Provider::load() +{ + d->load(); +} + +void Provider::store() +{ + d->store(); +} + void Provider::submit() { if (!isEnabled()) {