diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-01-12 13:52:45 +0100 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2017-01-12 13:52:45 +0100 |
commit | f9ed795730acbc3155990e8d99e24447f808fc7f (patch) | |
tree | a2ddea654465485dc56747e3d092ca06f671b1a9 /src/forms/profiledialog.cpp | |
parent | New Window action now works (diff) | |
download | smolbote-f9ed795730acbc3155990e8d99e24447f808fc7f.tar.xz |
Viewing and editing user agent of default profile
Diffstat (limited to 'src/forms/profiledialog.cpp')
-rw-r--r-- | src/forms/profiledialog.cpp | 25 |
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()); +} |