diff options
Diffstat (limited to 'src/webengine/webprofile.cpp')
-rw-r--r-- | src/webengine/webprofile.cpp | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/webengine/webprofile.cpp b/src/webengine/webprofile.cpp index 843b78e..2cea409 100644 --- a/src/webengine/webprofile.cpp +++ b/src/webengine/webprofile.cpp @@ -12,7 +12,18 @@ #include <QWebEngineCookieStore> #include <QWebEngineSettings> -WebProfile *WebProfile::profile = nullptr; +static WebProfile *s_profile = nullptr; + +void WebProfile::setDefaultProfile(WebProfile *profile) +{ + Q_CHECK_PTR(profile); + s_profile = profile; +} +WebProfile *WebProfile::defaultProfile() +{ + Q_CHECK_PTR(s_profile); + return s_profile; +} WebProfile::WebProfile(const QString &name, QObject *parent) : Profile(parent) |