diff options
Diffstat (limited to 'src/browser.cpp')
-rw-r--r-- | src/browser.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/browser.cpp b/src/browser.cpp index ab244fd..db535f3 100644 --- a/src/browser.cpp +++ b/src/browser.cpp @@ -70,13 +70,13 @@ void Browser::loadProfiles() const QStringList profileList = profileDir.entryList(QDir::Dirs | QDir::NoDotAndDotDot); for(const QString &name : profileList) { - WebEngineProfile *profile = new WebEngineProfile(name, profileDir.absoluteFilePath(name), this); + std::shared_ptr<WebEngineProfile> profile = std::make_shared<WebEngineProfile>(name, profileDir.absoluteFilePath(name), this); profile->setRequestInterceptor(m_urlRequestInterceptor.get()); m_profiles.insert(name, profile); } // Also add the Off-the-record profile - WebEngineProfile *otr = new WebEngineProfile(this); + std::shared_ptr<WebEngineProfile> otr = std::make_shared<WebEngineProfile>(this); otr->setRequestInterceptor(m_urlRequestInterceptor.get()); m_profiles.insert("", otr); @@ -142,7 +142,7 @@ MainWindow *Browser::createWindow() return window; } -WebEngineProfile* Browser::profile(const QString name) +std::shared_ptr<WebEngineProfile> Browser::profile(const QString name) { return m_profiles[name]; } |