Commit 996a6df1 authored by Vitaly Fanaskov's avatar Vitaly Fanaskov Committed by Volker Krause

Make store and load methods public

Summary:
Some sort of applications require to store or load settings in a custom
period of time. For example, if an application is a plugin, it might be
unloaded before qApp exists. In this case all settings will be lost.

Reviewers: vkrause

Reviewed By: vkrause

Differential Revision: https://phabricator.kde.org/D19882
parent 037e1a08
......@@ -609,6 +609,16 @@ void Provider::surveyCompleted(const SurveyInfo &info)
d->storeOneGlobal(QStringLiteral("LastSurvey"), d->lastSurveyTime);
}
void Provider::load()
{
d->load();
}
void Provider::store()
{
d->store();
}
void Provider::submit()
{
if (!isEnabled()) {
......
......@@ -247,6 +247,18 @@ public Q_SLOTS:
*/
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 @@ private:
// 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&))
};
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment