aboutsummaryrefslogtreecommitdiff
path: root/src/webengine
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-05-28 12:46:11 +0200
committerAqua-sama <aqua@iserlohn-fortress.net>2017-05-28 12:46:11 +0200
commit27742143d60e80bc925439e44664cc23c472f433 (patch)
treef6554dfe136ae290f1cce6da7a3dc36453c937c4 /src/webengine
parentProfile improvements (diff)
downloadsmolbote-27742143d60e80bc925439e44664cc23c472f433.tar.xz
Profiles dialog
Diffstat (limited to 'src/webengine')
-rw-r--r--src/webengine/webengineprofile.cpp11
-rw-r--r--src/webengine/webengineprofile.h9
2 files changed, 15 insertions, 5 deletions
diff --git a/src/webengine/webengineprofile.cpp b/src/webengine/webengineprofile.cpp
index 89cc301..2fed937 100644
--- a/src/webengine/webengineprofile.cpp
+++ b/src/webengine/webengineprofile.cpp
@@ -27,11 +27,13 @@ WebEngineProfile::WebEngineProfile(QObject *parent) :
QWebEngineProfile(parent)
{
// Off-the-record constructor
+ m_name = tr("Off-the-record");
}
WebEngineProfile::WebEngineProfile(const QString &storageName, QObject *parent) :
QWebEngineProfile(storageName, parent)
{
+ m_name = storageName;
setPersistentStoragePath(sSettings->value("browser.profile.path").toString() + storageName);
setCachePath(sSettings->value("browser.profile.path").toString() + storageName);
@@ -111,10 +113,15 @@ WebEngineProfile::~WebEngineProfile()
}
}
-ProfileDialog *WebEngineProfile::dialog()
+QString WebEngineProfile::name() const
+{
+ return m_name;
+}
+
+ProfileView *WebEngineProfile::dialog()
{
if(m_profileDialog == nullptr) {
- m_profileDialog = new ProfileDialog(this);
+ m_profileDialog = new ProfileView(this);
}
return m_profileDialog;
}
diff --git a/src/webengine/webengineprofile.h b/src/webengine/webengineprofile.h
index 4b36940..9a7be22 100644
--- a/src/webengine/webengineprofile.h
+++ b/src/webengine/webengineprofile.h
@@ -22,7 +22,7 @@
#define WEBENGINEPROFILE_H
#include <QWebEngineProfile>
-#include "forms/profiledialog.h"
+#include "forms/profileview.h"
class WebEngineProfile : public QWebEngineProfile
{
@@ -33,7 +33,9 @@ public:
~WebEngineProfile();
- ProfileDialog *dialog();
+ QString name() const;
+
+ ProfileView *dialog();
signals:
@@ -41,7 +43,8 @@ public slots:
void saveProfile();
private:
- ProfileDialog *m_profileDialog = nullptr;
+ QString m_name;
+ ProfileView *m_profileDialog = nullptr;
};
#endif // WEBENGINEPROFILE_H