[RPC] remove the option of having multiple timer interfaces

This commit is contained in:
Jonas Schnelli
2016-01-08 11:03:52 +01:00
committed by lateminer
parent f63fb94ab7
commit 3d541d041c
4 changed files with 25 additions and 17 deletions

View File

@@ -272,7 +272,9 @@ RPCConsole::RPCConsole(const PlatformStyle *platformStyle, QWidget *parent) :
#endif
// Register RPC timer interface
rpcTimerInterface = new QtRPCTimerInterface();
RPCRegisterTimerInterface(rpcTimerInterface);
// avoid accidentally overwriting an existing, non QTThread
// based timer interface
RPCSetTimerInterfaceIfUnset(rpcTimerInterface);
startExecutor();
setTrafficGraphRange(INITIAL_TRAFFIC_GRAPH_MINS);
@@ -287,7 +289,7 @@ RPCConsole::~RPCConsole()
{
GUIUtil::saveWindowGeometry("nRPCConsoleWindow", this);
Q_EMIT stopExecutor();
RPCUnregisterTimerInterface(rpcTimerInterface);
RPCUnsetTimerInterface(rpcTimerInterface);
delete rpcTimerInterface;
delete ui;
}