diff options
author | Anne Jan Brouwer <brouwer@annejan.com> | 2019-04-17 11:30:39 +0200 |
---|---|---|
committer | Anne Jan Brouwer <brouwer@annejan.com> | 2019-04-17 11:30:39 +0200 |
commit | feeb40740fc2c7362de4e60fd8a785df1af9f7cc (patch) | |
tree | a967c434878a923f9d246c252674812d61aa3908 /src/mainwindow.cpp | |
parent | 2cf89afa0b3185373ff92a9dd2b9c9bfa9ce6560 (diff) | |
parent | 0789259aa59a565ba6c899a8c4e8da88fd5f5637 (diff) |
Merge branch 'master' into clang-tidy-clazy
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 9f83b1e1..b58fcb02 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -9,6 +9,7 @@ #include "keygendialog.h" #include "passworddialog.h" #include "qpushbuttonwithclipboard.h" +#include "qpushbuttonasqrcode.h" #include "qtpass.h" #include "qtpasssettings.h" #include "settingsconstants.h" @@ -1030,6 +1031,16 @@ void MainWindow::addToGridLayout(int position, const QString &field, frame->layout()->addWidget(fieldLabel); } + if (QtPassSettings::isUseQrencode()) { + QPushButtonAsQRCode *qrbutton = + new QPushButtonAsQRCode(trimmedValue, this); + connect(qrbutton, &QPushButtonAsQRCode::clicked, m_qtPass, + &QtPass::showTextAsQRCode); + qrbutton->setStyleSheet("border-style: none ; background: transparent;"); + + frame->layout()->addWidget(qrbutton); + } + // set the echo mode to password, if the field is "password" if (QtPassSettings::isHidePassword() && trimmedField == tr("Password")) { auto *line = new QLineEdit(); |