Choose database for saving or updating entries from KeePassXC-Browser (#2391)

This commit is contained in:
Sami Vänttinen 2018-10-19 21:44:08 +03:00 committed by Jonathan White
parent bb16dc6d01
commit b8d2d5d877
13 changed files with 307 additions and 22 deletions

View file

@ -22,13 +22,13 @@
BrowserAccessControlDialog::BrowserAccessControlDialog(QWidget* parent)
: QDialog(parent)
, ui(new Ui::BrowserAccessControlDialog())
, m_ui(new Ui::BrowserAccessControlDialog())
{
this->setWindowFlags(windowFlags() | Qt::WindowStaysOnTopHint);
ui->setupUi(this);
connect(ui->allowButton, SIGNAL(clicked()), this, SLOT(accept()));
connect(ui->denyButton, SIGNAL(clicked()), this, SLOT(reject()));
m_ui->setupUi(this);
connect(m_ui->allowButton, SIGNAL(clicked()), this, SLOT(accept()));
connect(m_ui->denyButton, SIGNAL(clicked()), this, SLOT(reject()));
}
BrowserAccessControlDialog::~BrowserAccessControlDialog()
@ -37,7 +37,7 @@ BrowserAccessControlDialog::~BrowserAccessControlDialog()
void BrowserAccessControlDialog::setUrl(const QString& url)
{
ui->label->setText(QString(tr("%1 has requested access to passwords for the following item(s).\n"
m_ui->label->setText(QString(tr("%1 has requested access to passwords for the following item(s).\n"
"Please select whether you want to allow access."))
.arg(QUrl(url).host()));
}
@ -45,16 +45,16 @@ void BrowserAccessControlDialog::setUrl(const QString& url)
void BrowserAccessControlDialog::setItems(const QList<Entry*>& items)
{
for (Entry* entry : items) {
ui->itemsList->addItem(entry->title() + " - " + entry->username());
m_ui->itemsList->addItem(entry->title() + " - " + entry->username());
}
}
bool BrowserAccessControlDialog::remember() const
{
return ui->rememberDecisionCheckBox->isChecked();
return m_ui->rememberDecisionCheckBox->isChecked();
}
void BrowserAccessControlDialog::setRemember(bool r)
{
ui->rememberDecisionCheckBox->setChecked(r);
m_ui->rememberDecisionCheckBox->setChecked(r);
}