diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2015-08-07 02:20:29 +0200 |
---|---|---|
committer | Anne Jan Brouwer <brouwer@annejan.com> | 2015-08-07 02:20:29 +0200 |
commit | 93e1616a2a6803d2e62617802be8975f42a0fd88 (patch) | |
tree | 5c8dbd082a58ec5776efa602780bcfca3e2916a6 | |
parent | ff7d5ffca079260e181f7e07b1b33ccb7fab8225 (diff) |
fix the token count
-rw-r--r-- | dialog.cpp | 1 | ||||
-rw-r--r-- | mainwindow.cpp | 3 | ||||
-rw-r--r-- | passworddialog.cpp | 3 |
3 files changed, 6 insertions, 1 deletions
@@ -813,6 +813,7 @@ void Dialog::startMinimized(bool startMinimized) { */ void Dialog::on_checkBoxUseTemplate_clicked() { ui->plainTextEditTemplate->setEnabled(ui->checkBoxUseTemplate->isChecked()); + ui->checkBoxTemplateAllFields->setEnabled(ui->checkBoxUseTemplate->isChecked()); } void Dialog::useTemplate(bool useTemplate) { diff --git a/mainwindow.cpp b/mainwindow.cpp index d0493bf0..ff9d6f6a 100644 --- a/mainwindow.cpp +++ b/mainwindow.cpp @@ -642,6 +642,9 @@ void MainWindow::readyRead(bool finished = false) { if (useClipboard && !output.isEmpty()) { QClipboard *clip = QApplication::clipboard(); QStringList tokens = output.split("\n"); + + // TODO + clip->setText(tokens[0]); ui->statusBar->showMessage(tr("Password copied to clipboard"), 3000); if (useAutoclear) { diff --git a/passworddialog.cpp b/passworddialog.cpp index 08f91ff1..3b102d3c 100644 --- a/passworddialog.cpp +++ b/passworddialog.cpp @@ -58,7 +58,6 @@ void PasswordDialog::setPassword(QString password) for (int j = 0; j < tokens.length(); j++) { QString token = tokens.at(j); if (token.contains(':')) { - tokens.removeAt(j); int colon = token.indexOf(':'); QString field = token.left(colon); QString value = token.right(token.length()-colon-1); @@ -66,6 +65,8 @@ void PasswordDialog::setPassword(QString password) line->setObjectName(field); line->setText(value); ui->formLayout->addRow(new QLabel(field), line); + tokens.removeAt(j); + j--; // tokens.length() also got shortened by the remove.. } } } |