aboutsummaryrefslogtreecommitdiff
path: root/lib/web/webprofile.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-09-08 15:41:10 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-09-08 17:22:24 +0200
commit5e6920c427b30232e47039d26cbaec7173c837d2 (patch)
tree6daf69335854e8106399bb2bcba27162f999f476 /lib/web/webprofile.cpp
parentReplace ProfileManager::profileList() with ProfileManager::idList() (diff)
downloadsmolbote-5e6920c427b30232e47039d26cbaec7173c837d2.tar.xz
Save WebProfile config when changed
Diffstat (limited to 'lib/web/webprofile.cpp')
-rw-r--r--lib/web/webprofile.cpp23
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/web/webprofile.cpp b/lib/web/webprofile.cpp
index d42bb26..4d31376 100644
--- a/lib/web/webprofile.cpp
+++ b/lib/web/webprofile.cpp
@@ -48,6 +48,17 @@ WebProfile::WebProfile(const QString &storageName, const QString &name, QObject
});
}
+const QString WebProfile::name() const
+{
+ return m_name;
+}
+
+void WebProfile::setName(const QString &name)
+{
+ m_name = name;
+ emit nameChanged(name);
+}
+
QString WebProfile::search() const
{
return m_search;
@@ -84,35 +95,35 @@ void WebProfile::setNewtab(const QUrl &url)
void WebProfile::setCachePath(const QString &path)
{
QWebEngineProfile::setCachePath(path);
- emit cachePathChanged(QWebEngineProfile::cachePath());
+ emit propertyChanged("cachePath", path);
}
void WebProfile::setPersistentStoragePath(const QString &path)
{
QWebEngineProfile::setPersistentStoragePath(path);
- emit persistentStoragePathChanged(QWebEngineProfile::persistentStoragePath());
+ emit propertyChanged("persistentStoragePath", path);
}
void WebProfile::setHttpAcceptLanguage(const QString &httpAcceptLanguage)
{
QWebEngineProfile::setHttpAcceptLanguage(httpAcceptLanguage);
- emit httpAcceptLanguageChanged(QWebEngineProfile::httpAcceptLanguage());
+ emit propertyChanged("httpAcceptLanguage", httpAcceptLanguage);
}
void WebProfile::setHttpCacheMaximumSize(int maxSize)
{
QWebEngineProfile::setHttpCacheMaximumSize(maxSize);
- emit httpCacheMaximumSizeChanged(QWebEngineProfile::httpCacheMaximumSize());
+ emit propertyChanged("httpCacheMaximumSize", maxSize);
}
void WebProfile::setHttpUserAgent(const QString &userAgent)
{
QWebEngineProfile::setHttpUserAgent(userAgent);
- emit httpUserAgentChanged(QWebEngineProfile::httpUserAgent());
+ emit propertyChanged("httpUserAgent", userAgent);
}
void WebProfile::setSpellCheckEnabled(bool enable)
{
QWebEngineProfile::setSpellCheckEnabled(enable);
- emit spellCheckEnabledChanged(QWebEngineProfile::isSpellCheckEnabled());
+ emit propertyChanged("spellCheckEnabed", enable);
}