aboutsummaryrefslogtreecommitdiff
path: root/src/browser.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-12-19 10:14:22 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2017-12-19 10:14:22 +0100
commitc1ad1be5924eb28bf6c32b049098fe24bbbb9e4e (patch)
tree7cc5ab0e600496279ab575a99a6a0b97c0d6f854 /src/browser.cpp
parentSome bugfixes (diff)
downloadsmolbote-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.cpp6
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];
}