From e2caf2b3e87cd7bae13410d356d403f2bf03b60a Mon Sep 17 00:00:00 2001 From: DenioD <41270280+DenioD@users.noreply.github.com> Date: Tue, 2 Jun 2020 21:01:18 +0200 Subject: [PATCH] only one passphrase at beginning --- src/DataStore/ChatDataStore.cpp | 3 +-- src/mainwindow.cpp | 29 ++++----------------- src/startupencryption.ui | 45 --------------------------------- 3 files changed, 6 insertions(+), 71 deletions(-) diff --git a/src/DataStore/ChatDataStore.cpp b/src/DataStore/ChatDataStore.cpp index 7b03c0e..dfa7d54 100644 --- a/src/DataStore/ChatDataStore.cpp +++ b/src/DataStore/ChatDataStore.cpp @@ -60,8 +60,7 @@ std::map ChatDataStore::getAllNewContactRequests() if ( (c.second.isOutgoing() == false) && (c.second.getType() == "Cont") && - (c.second.isContact() == false) && - (c.second.getMemo().isEmpty()) + (c.second.isContact() == false) ) { diff --git a/src/mainwindow.cpp b/src/mainwindow.cpp index 4984811..fd1cdd6 100644 --- a/src/mainwindow.cpp +++ b/src/mainwindow.cpp @@ -538,34 +538,15 @@ void MainWindow::removeWalletEncryptionStartUp() { QDialog d(this); Ui_startup ed; ed.setupUi(&d); - - // Handle edits on the password box - auto fnPasswordEdited = [=](const QString&) { - QString password = ed.txtPassword->text(); - // Enable the OK button if the passwords match. - if (!ed.txtPassword->text().isEmpty() && - ed.txtPassword->text() == ed.txtConfirmPassword->text() && password.size() >= 16) { - ed.lblPasswordMatch->setText(""); - ed.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(true); - } else { - ed.lblPasswordMatch->setText(tr("Passwords don't match or under-lettered")); - ed.buttonBox->button(QDialogButtonBox::Ok)->setEnabled(false); - } - - }; - - QObject::connect(ed.txtConfirmPassword, &QLineEdit::textChanged, fnPasswordEdited); - QObject::connect(ed.txtPassword, &QLineEdit::textChanged, fnPasswordEdited); - if (d.exec() == QDialog::Accepted) { - QString str = ed.txtPassword->text(); // data comes from user inputs - int length = str.length(); - this->setPassword(str); + QString password = ed.txtPassword->text(); // data comes from user inputs + int length = password.length(); + this->setPassword(password); char *sequence = NULL; sequence = new char[length+1]; - strncpy(sequence, str.toLocal8Bit(), length +1); + strncpy(sequence, password.toLocal8Bit(), length +1); #define MESSAGE ((const unsigned char *) sequence) #define MESSAGE_LEN length @@ -614,7 +595,7 @@ void MainWindow::removeWalletEncryptionStartUp() { { - QMessageBox::warning(this, tr("You have still Plaintextdata on your disk!"), + QMessageBox::information(this, tr("You have still Plaintextdata on your disk!"), QString("WARNING: Delete it only if you have a backup of your Wallet Seed."), QMessageBox::Ok ); diff --git a/src/startupencryption.ui b/src/startupencryption.ui index 6abdad1..819a698 100644 --- a/src/startupencryption.ui +++ b/src/startupencryption.ui @@ -29,19 +29,6 @@ QDialogButtonBox::Cancel|QDialogButtonBox::Ok - - - - 10 - 229 - 127 - 25 - - - - Confirm Password: - - @@ -55,19 +42,6 @@ Qt::Horizontal - - - - 162 - 229 - 230 - 25 - - - - QLineEdit::Password - - @@ -113,25 +87,6 @@ Encryption Password: - - - - 10 - 175 - 382 - 17 - - - - color: red; - - - Passwords don't match - - - Qt::AlignCenter - -