Commit 541937d8 authored by Laurent Montel's avatar Laurent Montel 😁
Browse files

Save/load settings

parent ea2b9657
Pipeline #45599 canceled with stage
......@@ -13,12 +13,12 @@ using namespace MessageViewer;
RemoteContentManager::RemoteContentManager(QObject *parent)
: QObject(parent)
{
loadSettings();
}
RemoteContentManager::~RemoteContentManager()
{
writeSettings();
}
RemoteContentManager *RemoteContentManager::self()
......@@ -41,12 +41,14 @@ void RemoteContentManager::loadSettings()
{
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group(config, "RemoteContent");
const QStringList blockedUrl = group.readEntry("Blocked", QStringList());
//TODO
mBlockedUrl = group.readEntry("Blocked", QStringList());
mAuthorizedUrl = group.readEntry("Authorized", QStringList());
}
void RemoteContentManager::writeSettings()
{
//TODO
KSharedConfig::Ptr config = KSharedConfig::openConfig();
KConfigGroup group(config, "RemoteContent");
group.writeEntry("Blocked", mBlockedUrl);
group.writeEntry("Authorized", mAuthorizedUrl);
}
......@@ -26,6 +26,8 @@ private:
void loadSettings();
void writeSettings();
QVector<RemoteContentInfo> mRemoveContentInfo;
QStringList mBlockedUrl;
QStringList mAuthorizedUrl;
};
}
......
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