diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-07-02 14:36:54 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-07-02 14:36:54 +0200 |
commit | f47e32c5d0451308d5f0ff99e31397bd8ce53f73 (patch) | |
tree | 33c5ee229529878fc399c159993e2a8538f9d06c /src/webengine | |
parent | Configuration defaults file (diff) | |
download | smolbote-f47e32c5d0451308d5f0ff99e31397bd8ce53f73.tar.xz |
Added homepage button
Diffstat (limited to 'src/webengine')
-rw-r--r-- | src/webengine/webengineprofile.cpp | 7 | ||||
-rw-r--r-- | src/webengine/webengineprofile.h | 4 |
2 files changed, 11 insertions, 0 deletions
diff --git a/src/webengine/webengineprofile.cpp b/src/webengine/webengineprofile.cpp index ddf62a8..5d00495 100644 --- a/src/webengine/webengineprofile.cpp +++ b/src/webengine/webengineprofile.cpp @@ -28,12 +28,14 @@ WebEngineProfile::WebEngineProfile(QObject *parent) : { // Off-the-record constructor m_name = tr("Off-the-record"); + m_homepage = QUrl("https://duckduckgo.com"); } WebEngineProfile::WebEngineProfile(const QString &name, const QString &path, QObject *parent) : QWebEngineProfile(name, parent) { m_name = name; + m_homepage = QUrl("https://duckduckgo.com"); setPersistentStoragePath(path + name); setCachePath(path + name); @@ -126,6 +128,11 @@ ProfileView *WebEngineProfile::dialog() return m_profileDialog; } +QUrl WebEngineProfile::homepage() const +{ + return m_homepage; +} + void WebEngineProfile::saveProfile() { QSettings config(persistentStoragePath() + "/profile.ini", QSettings::IniFormat); diff --git a/src/webengine/webengineprofile.h b/src/webengine/webengineprofile.h index f13b266..8ddf329 100644 --- a/src/webengine/webengineprofile.h +++ b/src/webengine/webengineprofile.h @@ -22,6 +22,7 @@ #define WEBENGINEPROFILE_H #include <QWebEngineProfile> +#include <QUrl> #include "forms/profileview.h" class WebEngineProfile : public QWebEngineProfile @@ -37,6 +38,8 @@ public: ProfileView *dialog(); + QUrl homepage() const; + signals: public slots: @@ -44,6 +47,7 @@ public slots: private: QString m_name; + QUrl m_homepage; ProfileView *m_profileDialog = nullptr; }; |