aboutsummaryrefslogtreecommitdiff
path: root/lib/web
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2018-06-16 13:55:35 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2018-06-16 13:55:35 +0200
commitb27e55b0bbba9a1678159abe44280e173374f971 (patch)
treea7a5bb75ad9b4dc3fc31b39b5ab2fe860b55a27e /lib/web
parentAdd extra-cmake-modules to make depends (diff)
downloadsmolbote-b27e55b0bbba9a1678159abe44280e173374f971.tar.xz
Sort .profile by time
Remove ProfileInterface::setProfiles ProfileView: Add General tab ProfileView: some cleanup ProfileView: Add Cookies tab
Diffstat (limited to 'lib/web')
-rw-r--r--lib/web/webprofile.cpp8
-rw-r--r--lib/web/webprofile.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/web/webprofile.cpp b/lib/web/webprofile.cpp
index dca639b..37338b9 100644
--- a/lib/web/webprofile.cpp
+++ b/lib/web/webprofile.cpp
@@ -14,7 +14,7 @@
WebProfile *WebProfile::profile = nullptr;
-WebProfile* loadProfile(const QString &name, const QHash<QString, QString> &defaults, const QString &path)
+WebProfile* loadProfile(const QString &name, const QHash<QString, QString> &defaults, const QString &path, QObject *parent)
{
WebProfile *profile = nullptr;
#ifdef QT_DEBUG
@@ -24,15 +24,15 @@ WebProfile* loadProfile(const QString &name, const QHash<QString, QString> &defa
if(name.isEmpty()) {
// a default otr profile
- profile = new WebProfile(QObject::tr("Off-the-record"), path, nullptr);
+ profile = new WebProfile(QObject::tr("Off-the-record"), path, parent);
} else if(config.value("otr").toBool()) {
// a named otr profile
- profile = new WebProfile(config.value("name", name).toString(), path, nullptr);
+ profile = new WebProfile(config.value("name", name).toString(), path, parent);
} else {
// a named profile
- profile = new WebProfile(name, config.value("name", name).toString(), path, nullptr);
+ profile = new WebProfile(name, config.value("name", name).toString(), path, parent);
}
Q_CHECK_PTR(profile);
diff --git a/lib/web/webprofile.h b/lib/web/webprofile.h
index f4d31e6..9e9fd3e 100644
--- a/lib/web/webprofile.h
+++ b/lib/web/webprofile.h
@@ -105,7 +105,7 @@ private:
QUrl m_newtab = QUrl("about:blank");
};
-WebProfile* loadProfile(const QString &name, const QHash<QString, QString> &defaults, const QString &path = QString());
+WebProfile* loadProfile(const QString &name, const QHash<QString, QString> &defaults, const QString &path = QString(), QObject *parent = nullptr);
//WebProfile *saveProfile(WebProfile *profile, const QString &path);
#endif // SMOLBOTE_WEBENGINEPROFILE_H