aboutsummaryrefslogtreecommitdiff
path: root/lib/web
diff options
context:
space:
mode:
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