aboutsummaryrefslogtreecommitdiff
path: root/src/forms/profiledialog.cpp
diff options
context:
space:
mode:
authorAqua-sama <aqua@iserlohn-fortress.net>2017-01-12 13:52:45 +0100
committerAqua-sama <aqua@iserlohn-fortress.net>2017-01-12 13:52:45 +0100
commitf9ed795730acbc3155990e8d99e24447f808fc7f (patch)
treea2ddea654465485dc56747e3d092ca06f671b1a9 /src/forms/profiledialog.cpp
parentNew Window action now works (diff)
downloadsmolbote-f9ed795730acbc3155990e8d99e24447f808fc7f.tar.xz
Viewing and editing user agent of default profile
Diffstat (limited to 'src/forms/profiledialog.cpp')
-rw-r--r--src/forms/profiledialog.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/forms/profiledialog.cpp b/src/forms/profiledialog.cpp
new file mode 100644
index 0000000..14279c4
--- /dev/null
+++ b/src/forms/profiledialog.cpp
@@ -0,0 +1,25 @@
+#include "profiledialog.h"
+#include "ui_profiledialog.h"
+
+ProfileDialog::ProfileDialog(QWebEngineProfile *profile, QWidget *parent) :
+ QDialog(parent),
+ ui(new Ui::ProfileDialog)
+{
+ _profile = profile;
+
+ ui->setupUi(this);
+ ui->userAgent_lineEdit->setText(_profile->httpUserAgent());
+
+ connect(this, SIGNAL(accepted()), this, SLOT(saveProfile()));
+}
+
+ProfileDialog::~ProfileDialog()
+{
+ delete ui;
+}
+
+void ProfileDialog::saveProfile()
+{
+ qDebug("Saving profile...");
+ _profile->setHttpUserAgent(ui->userAgent_lineEdit->text());
+}