only one passphrase at beginning
This commit is contained in:
@@ -60,8 +60,7 @@ std::map<QString, ChatItem> ChatDataStore::getAllNewContactRequests()
|
||||
if (
|
||||
(c.second.isOutgoing() == false) &&
|
||||
(c.second.getType() == "Cont") &&
|
||||
(c.second.isContact() == false) &&
|
||||
(c.second.getMemo().isEmpty())
|
||||
(c.second.isContact() == false)
|
||||
)
|
||||
|
||||
{
|
||||
|
||||
@@ -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
|
||||
);
|
||||
|
||||
@@ -29,19 +29,6 @@
|
||||
<set>QDialogButtonBox::Cancel|QDialogButtonBox::Ok</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>229</y>
|
||||
<width>127</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Confirm Password:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="Line" name="line_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
@@ -55,19 +42,6 @@
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="txtConfirmPassword">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>162</x>
|
||||
<y>229</y>
|
||||
<width>230</width>
|
||||
<height>25</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="echoMode">
|
||||
<enum>QLineEdit::Password</enum>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
@@ -113,25 +87,6 @@
|
||||
<string>Encryption Password:</string>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLabel" name="lblPasswordMatch">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>10</x>
|
||||
<y>175</y>
|
||||
<width>382</width>
|
||||
<height>17</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="styleSheet">
|
||||
<string notr="true">color: red;</string>
|
||||
</property>
|
||||
<property name="text">
|
||||
<string>Passwords don't match</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
<widget class="QLineEdit" name="txtPassword">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
|
||||
Reference in New Issue
Block a user