diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-12-19 10:14:22 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-12-19 10:14:22 +0100 |
commit | c1ad1be5924eb28bf6c32b049098fe24bbbb9e4e (patch) | |
tree | 7cc5ab0e600496279ab575a99a6a0b97c0d6f854 /src/browser.cpp | |
parent | Some bugfixes (diff) | |
download | smolbote-c1ad1be5924eb28bf6c32b049098fe24bbbb9e4e.tar.xz |
Bug fixes
Switching between tabs should work properly now.
Refactored MainWindowTabBar (was WebViewTabBar)
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]; } |