From b27e55b0bbba9a1678159abe44280e173374f971 Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Sat, 16 Jun 2018 13:55:35 +0200 Subject: Sort .profile by time Remove ProfileInterface::setProfiles ProfileView: Add General tab ProfileView: some cleanup ProfileView: Add Cookies tab --- lib/web/webprofile.cpp | 8 ++++---- lib/web/webprofile.h | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'lib/web') 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 &defaults, const QString &path) +WebProfile* loadProfile(const QString &name, const QHash &defaults, const QString &path, QObject *parent) { WebProfile *profile = nullptr; #ifdef QT_DEBUG @@ -24,15 +24,15 @@ WebProfile* loadProfile(const QString &name, const QHash &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 &defaults, const QString &path = QString()); +WebProfile* loadProfile(const QString &name, const QHash &defaults, const QString &path = QString(), QObject *parent = nullptr); //WebProfile *saveProfile(WebProfile *profile, const QString &path); #endif // SMOLBOTE_WEBENGINEPROFILE_H -- cgit v1.2.1