Skip to content
Snippets Groups Projects
Commit f9f0d28f authored by littletux89@gmail.com's avatar littletux89@gmail.com
Browse files

[+] Added process.

parent ca965490
No related branches found
No related tags found
1 merge request!11Cellframe clone
......@@ -50,6 +50,15 @@ QVariant DapAddWalletCommand::respondToClient(const QVariant &arg1, const QVaria
Q_UNUSED(arg8)
Q_UNUSED(arg9)
Q_UNUSED(arg10)
return 5;
QByteArray result;
QProcess process;
process.start(QString("%1 wallet new -w %2").arg(CLI_PATH).arg(arg1.toString()));
process.waitForFinished(-1);
result = process.readAll();
QStringList res = QString::fromLatin1(result).split(" ");
QStringList list;
list.append(arg1.toString());
list.append(res.at(res.size()-1).trimmed());
return result.isEmpty() ? QStringList() : list;
}
......@@ -9,6 +9,9 @@
#ifndef DAPADDWALLETCOMMAND_H
#define DAPADDWALLETCOMMAND_H
#include <QProcess>
#include <QString>
#include "DapAbstractCommand.h"
class DapAddWalletCommand : public DapAbstractCommand
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment