aboutsummaryrefslogtreecommitdiff
path: root/src/forms/profiledialog.cpp
blob: 14279c4c2008db9b728a1be5ec67e0b4dc75cbdb (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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());
}