19#include "ui_autofillnotification.h"
27 , m_formData(formData)
28 , m_updateData(updateData)
30 setAutoFillBackground(
true);
31 setAttribute(Qt::WA_DeleteOnClose);
38 if (!url.host().isEmpty()) {
39 hostPart = tr(
"on %1").arg(url.host());
42 if (!m_formData.
username.isEmpty()) {
43 userPart = tr(
"for <b>%1</b>").arg(m_formData.
username);
47 ui->label->setText(tr(
"Do you want Falkon to update saved password %1?").arg(userPart));
49 ui->remember->setVisible(
false);
50 ui->never->setVisible(
false);
53 ui->label->setText(tr(
"Do you want Falkon to remember the password %1 %2?").arg(userPart, hostPart));
55 ui->update->setVisible(
false);
58 connect(ui->update, SIGNAL(clicked()),
this, SLOT(update()));
59 connect(ui->remember, &QAbstractButton::clicked,
this, &AutoFillNotification::remember);
60 connect(ui->never, &QAbstractButton::clicked,
this, &AutoFillNotification::never);
61 connect(ui->notnow, SIGNAL(clicked()),
this, SLOT(
hide()));
62 connect(ui->closeButton, SIGNAL(clicked()),
this, SLOT(
hide()));
67void AutoFillNotification::update()
69 mApp->autoFill()->updateEntry(m_updateData);
73void AutoFillNotification::never()
75 mApp->autoFill()->blockStoringforUrl(m_url);
79void AutoFillNotification::remember()
81 mApp->autoFill()->addEntry(m_url, m_formData);
AutoFillNotification(const QUrl &url, const PageFormData &formData, const PasswordEntry &updateData)
static QIcon standardIcon(QStyle::StandardPixmap icon)