fix restore from Gui
This commit is contained in:
@@ -190,17 +190,10 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
|
|
||||||
restoreSeed.seed->setReadOnly(true);
|
restoreSeed.seed->setReadOnly(true);
|
||||||
restoreSeed.seed->setLineWrapMode(QPlainTextEdit::LineWrapMode::NoWrap);
|
restoreSeed.seed->setLineWrapMode(QPlainTextEdit::LineWrapMode::NoWrap);
|
||||||
QString seedJson = QString::fromStdString(reply.get<json::string_t>());
|
QString seedJson = QString::fromStdString(reply["seed"].get<json::string_t>());
|
||||||
int startPos = seedJson.indexOf("seed") +7;
|
restoreSeed.seed->setPlainText(seedJson);
|
||||||
int endPos = seedJson.indexOf("}") -1;
|
|
||||||
int length = endPos - startPos;
|
|
||||||
QString seed = seedJson.mid(startPos, length);
|
|
||||||
restoreSeed.seed->setPlainText(seed);
|
|
||||||
|
|
||||||
int startPosB = seedJson.indexOf("birthday") +10;
|
QString birthday = QString::number(reply["birthday"].get<json::number_unsigned_t>());
|
||||||
int endPosB = seedJson.indexOf("seed") -2;
|
|
||||||
int lengthB = endPosB - startPosB;
|
|
||||||
QString birthday = seedJson.mid(startPosB, lengthB);
|
|
||||||
restoreSeed.birthday->setPlainText(birthday);
|
restoreSeed.birthday->setPlainText(birthday);
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -278,8 +271,6 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
}
|
}
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// });
|
|
||||||
|
|
||||||
dialog.exec();
|
dialog.exec();
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user