From f9ed795730acbc3155990e8d99e24447f808fc7f Mon Sep 17 00:00:00 2001 From: Aqua-sama Date: Thu, 12 Jan 2017 13:52:45 +0100 Subject: Viewing and editing user agent of default profile --- src/forms/profiledialog.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 src/forms/profiledialog.cpp (limited to 'src/forms/profiledialog.cpp') 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()); +} -- cgit v1.2.1