diff options
author | Frank Gabriel <frank.gabriel@kryptolyse.org> | 2018-09-28 13:47:05 +0200 |
---|---|---|
committer | Frank Gabriel <frank.gabriel@kryptolyse.org> | 2018-09-28 13:47:05 +0200 |
commit | 57c24f5a7cbcfc52ec3e56be7d04421669f457b8 (patch) | |
tree | 5098af965fff1d0a1c4969b4d554b15017da9bca /src/mainwindow.cpp | |
parent | c6ae420c17725f0ecd3a91c48e59e8cb30561cc1 (diff) |
Add qrencode to settings
Diffstat (limited to 'src/mainwindow.cpp')
-rw-r--r-- | src/mainwindow.cpp | 16 |
1 files changed, 9 insertions, 7 deletions
diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index bf905a44..74b8e4cd 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -1027,13 +1027,15 @@ void MainWindow::addToGridLayout(int position, const QString &field, frame->layout()->addWidget(fieldLabel); } - 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); + 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")) { |