Browse Source

Bitcoin-Qt: small RPCConsole cleanup

- add missing initalisation for clientModel
- remove unneded RPCExecutor::start() code
0.8
Philip Kaufmann 12 years ago
parent
commit
bfad9982f8
  1. 10
      src/qt/rpcconsole.cpp

10
src/qt/rpcconsole.cpp

@ -38,7 +38,6 @@ class RPCExecutor : public QObject
Q_OBJECT Q_OBJECT
public slots: public slots:
void start();
void request(const QString &command); void request(const QString &command);
signals: signals:
@ -47,11 +46,6 @@ signals:
#include "rpcconsole.moc" #include "rpcconsole.moc"
void RPCExecutor::start()
{
// Nothing to do
}
/** /**
* Split shell command line into a list of arguments. Aims to emulate \c bash and friends. * Split shell command line into a list of arguments. Aims to emulate \c bash and friends.
* *
@ -187,6 +181,7 @@ void RPCExecutor::request(const QString &command)
RPCConsole::RPCConsole(QWidget *parent) : RPCConsole::RPCConsole(QWidget *parent) :
QDialog(parent), QDialog(parent),
ui(new Ui::RPCConsole), ui(new Ui::RPCConsole),
clientModel(0),
historyPtr(0) historyPtr(0)
{ {
ui->setupUi(this); ui->setupUi(this);
@ -388,12 +383,11 @@ void RPCConsole::startExecutor()
RPCExecutor *executor = new RPCExecutor(); RPCExecutor *executor = new RPCExecutor();
executor->moveToThread(thread); executor->moveToThread(thread);
// Notify executor when thread started (in executor thread)
connect(thread, SIGNAL(started()), executor, SLOT(start()));
// Replies from executor object must go to this object // Replies from executor object must go to this object
connect(executor, SIGNAL(reply(int,QString)), this, SLOT(message(int,QString))); connect(executor, SIGNAL(reply(int,QString)), this, SLOT(message(int,QString)));
// Requests from this object must go to executor // Requests from this object must go to executor
connect(this, SIGNAL(cmdRequest(QString)), executor, SLOT(request(QString))); connect(this, SIGNAL(cmdRequest(QString)), executor, SLOT(request(QString)));
// On stopExecutor signal // On stopExecutor signal
// - queue executor for deletion (in execution thread) // - queue executor for deletion (in execution thread)
// - quit the Qt event loop in the execution thread // - quit the Qt event loop in the execution thread

Loading…
Cancel
Save