Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/apptests.cpp
Show All 40 Lines | |||||
* <QtTest/QtTestWidgets> should be included before <QtTest/QtTestGui>. | * <QtTest/QtTestWidgets> should be included before <QtTest/QtTestGui>. | ||||
* Also prevent the linter from sorting the includes. | * Also prevent the linter from sorting the includes. | ||||
*/ | */ | ||||
// clang-format off | // clang-format off | ||||
#include <QtTest/QtTestWidgets> | #include <QtTest/QtTestWidgets> | ||||
#include <QtTest/QtTestGui> | #include <QtTest/QtTestGui> | ||||
// clang-format on | // clang-format on | ||||
#include <string> | |||||
namespace { | namespace { | ||||
//! Call getblockchaininfo RPC and check first field of JSON output. | //! Call getblockchaininfo RPC and check first field of JSON output. | ||||
void TestRpcCommand(RPCConsole *console) { | void TestRpcCommand(RPCConsole *console) { | ||||
QEventLoop loop; | QEventLoop loop; | ||||
QTextEdit *messagesWidget = | QTextEdit *messagesWidget = | ||||
console->findChild<QTextEdit *>("messagesWidget"); | console->findChild<QTextEdit *>("messagesWidget"); | ||||
QObject::connect(messagesWidget, &QTextEdit::textChanged, &loop, | QObject::connect(messagesWidget, &QTextEdit::textChanged, &loop, | ||||
&QEventLoop::quit); | &QEventLoop::quit); | ||||
▲ Show 20 Lines • Show All 88 Lines • Show Last 20 Lines |