create/restore at startup if needed
This commit is contained in:
@@ -634,6 +634,21 @@ void MainWindow::removeWalletEncryptionStartUp() {
|
|||||||
Ui_startup ed;
|
Ui_startup ed;
|
||||||
ed.setupUi(&d);
|
ed.setupUi(&d);
|
||||||
|
|
||||||
|
QObject::connect(ed.new_restore, &QPushButton::clicked, [&] {
|
||||||
|
|
||||||
|
d.close();
|
||||||
|
QFile wallet(dirwallet);
|
||||||
|
QFile walletenc(dirwalletenc);
|
||||||
|
|
||||||
|
wallet.remove();
|
||||||
|
walletenc.remove();
|
||||||
|
|
||||||
|
auto cl = new ConnectionLoader(this, rpc);
|
||||||
|
cl->loadConnection();
|
||||||
|
|
||||||
|
|
||||||
|
});
|
||||||
|
|
||||||
if (d.exec() == QDialog::Accepted)
|
if (d.exec() == QDialog::Accepted)
|
||||||
{
|
{
|
||||||
QString passphraseBlank = ed.txtPassword->text(); // data comes from user inputs
|
QString passphraseBlank = ed.txtPassword->text(); // data comes from user inputs
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>400</width>
|
<width>400</width>
|
||||||
<height>177</height>
|
<height>218</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<property name="sizePolicy">
|
<property name="sizePolicy">
|
||||||
@@ -25,13 +25,13 @@
|
|||||||
<property name="maximumSize">
|
<property name="maximumSize">
|
||||||
<size>
|
<size>
|
||||||
<width>400</width>
|
<width>400</width>
|
||||||
<height>177</height>
|
<height>250</height>
|
||||||
</size>
|
</size>
|
||||||
</property>
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>SDL Startup Decryption</string>
|
<string>SDL Startup Decryption</string>
|
||||||
</property>
|
</property>
|
||||||
<layout class="QFormLayout" name="formLayout">
|
<layout class="QGridLayout" name="gridLayout">
|
||||||
<item row="0" column="0" colspan="2">
|
<item row="0" column="0" colspan="2">
|
||||||
<widget class="QLabel" name="label_2">
|
<widget class="QLabel" name="label_2">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
@@ -45,21 +45,28 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="3" column="0" colspan="2">
|
<item row="1" column="0" colspan="2">
|
||||||
|
<widget class="QPushButton" name="new_restore">
|
||||||
|
<property name="text">
|
||||||
|
<string>Create new Wallet or Restore</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
|
<item row="2" column="0" colspan="2">
|
||||||
<widget class="Line" name="line_2">
|
<widget class="Line" name="line_2">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="6" column="0" colspan="2">
|
<item row="3" column="0">
|
||||||
<widget class="QLabel" name="label_3">
|
<widget class="QLabel" name="label_3">
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Encryption Passphrase:</string>
|
<string>Encryption Passphrase:</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="7" column="1">
|
<item row="4" column="0">
|
||||||
<widget class="QLineEdit" name="txtPassword">
|
<widget class="QLineEdit" name="txtPassword">
|
||||||
<property name="minimumSize">
|
<property name="minimumSize">
|
||||||
<size>
|
<size>
|
||||||
@@ -72,14 +79,7 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
<item row="9" column="0">
|
<item row="4" column="1">
|
||||||
<widget class="Line" name="line">
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Qt::Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
</item>
|
|
||||||
<item row="9" column="1">
|
|
||||||
<widget class="QDialogButtonBox" name="buttonBox">
|
<widget class="QDialogButtonBox" name="buttonBox">
|
||||||
<property name="orientation">
|
<property name="orientation">
|
||||||
<enum>Qt::Horizontal</enum>
|
<enum>Qt::Horizontal</enum>
|
||||||
|
|||||||
Reference in New Issue
Block a user