diff options
author | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-10-25 03:21:35 -0700 |
---|---|---|
committer | Wladimir J. van der Laan <laanwj@gmail.com> | 2012-10-25 03:21:35 -0700 |
commit | c98a0a432e10a66b818c70cf675937063870a0bb (patch) | |
tree | f018e0d31509d0519fbdebb1e0bbc6cdeb78d299 | |
parent | 2d53ba2c69f975a163d3332ff3879a40b1367b39 (diff) | |
parent | 83a3fb81f3da38461457e8dcdf5baf27b662a4b3 (diff) |
Merge pull request #1959 from Diapolo/eventFilter_askpassphrasedlg
ensure AskPassphraseDialog::eventFilter forwards events
-rw-r--r-- | src/qt/askpassphrasedialog.cpp | 14 | ||||
-rw-r--r-- | src/qt/askpassphrasedialog.h | 2 |
2 files changed, 8 insertions, 8 deletions
diff --git a/src/qt/askpassphrasedialog.cpp b/src/qt/askpassphrasedialog.cpp index 03aa7af0be..cf35ee2457 100644 --- a/src/qt/askpassphrasedialog.cpp +++ b/src/qt/askpassphrasedialog.cpp @@ -19,7 +19,7 @@ AskPassphraseDialog::AskPassphraseDialog(Mode mode, QWidget *parent) : ui->passEdit1->setMaxLength(MAX_PASSPHRASE_SIZE); ui->passEdit2->setMaxLength(MAX_PASSPHRASE_SIZE); ui->passEdit3->setMaxLength(MAX_PASSPHRASE_SIZE); - + // Setup Caps Lock detection. ui->passEdit1->installEventFilter(this); ui->passEdit2->installEventFilter(this); @@ -108,15 +108,15 @@ void AskPassphraseDialog::accept() if(model->setWalletEncrypted(true, newpass1)) { QMessageBox::warning(this, tr("Wallet encrypted"), - "<qt>" + + "<qt>" + tr("Bitcoin will close now to finish the encryption process. " "Remember that encrypting your wallet cannot fully protect " - "your bitcoins from being stolen by malware infecting your computer.") + - "<br><br><b>" + + "your bitcoins from being stolen by malware infecting your computer.") + + "<br><br><b>" + tr("IMPORTANT: Any previous backups you have made of your wallet file " "should be replaced with the newly generated, encrypted wallet file. " "For security reasons, previous backups of the unencrypted wallet file " - "will become useless as soon as you start using the new, encrypted wallet.") + + "will become useless as soon as you start using the new, encrypted wallet.") + "</b></qt>"); QApplication::quit(); } @@ -221,7 +221,7 @@ bool AskPassphraseDialog::event(QEvent *event) return QWidget::event(event); } -bool AskPassphraseDialog::eventFilter(QObject *, QEvent *event) +bool AskPassphraseDialog::eventFilter(QObject *object, QEvent *event) { /* Detect Caps Lock. * There is no good OS-independent way to check a key state in Qt, but we @@ -244,5 +244,5 @@ bool AskPassphraseDialog::eventFilter(QObject *, QEvent *event) } } } - return false; + return QDialog::eventFilter(object, event); } diff --git a/src/qt/askpassphrasedialog.h b/src/qt/askpassphrasedialog.h index b500ff49bf..338853ce22 100644 --- a/src/qt/askpassphrasedialog.h +++ b/src/qt/askpassphrasedialog.h @@ -39,7 +39,7 @@ private: private slots: void textChanged(); bool event(QEvent *event); - bool eventFilter(QObject *, QEvent *event); + bool eventFilter(QObject *object, QEvent *event); }; #endif // ASKPASSPHRASEDIALOG_H |