Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/apptests.cpp
// Copyright (c) 2018 The Bitcoin Core developers | // Copyright (c) 2018 The Bitcoin Core developers | ||||
// Distributed under the MIT software license, see the accompanying | // Distributed under the MIT software license, see the accompanying | ||||
// file COPYING or http://www.opensource.org/licenses/mit-license.php. | // file COPYING or http://www.opensource.org/licenses/mit-license.php. | ||||
#include <qt/test/apptests.h> | #include <qt/test/apptests.h> | ||||
#include <chainparams.h> | #include <chainparams.h> | ||||
#include <config.h> | #include <config.h> | ||||
#include <httprpc.h> | #include <httprpc.h> | ||||
#include <key.h> | |||||
#include <qt/bitcoin.h> | #include <qt/bitcoin.h> | ||||
#include <qt/bitcoingui.h> | #include <qt/bitcoingui.h> | ||||
#include <qt/networkstyle.h> | #include <qt/networkstyle.h> | ||||
#include <qt/rpcconsole.h> | #include <qt/rpcconsole.h> | ||||
#include <rpc/server.h> | #include <rpc/server.h> | ||||
#include <shutdown.h> | #include <shutdown.h> | ||||
#include <validation.h> | #include <validation.h> | ||||
▲ Show 20 Lines • Show All 67 Lines • ▼ Show 20 Lines | if (QApplication::platformName() == "minimal") { | ||||
"with 'test_bitcoin-qt -platform cocoa' on mac, or else use a " | "with 'test_bitcoin-qt -platform cocoa' on mac, or else use a " | ||||
"linux or windows build."); | "linux or windows build."); | ||||
return; | return; | ||||
} | } | ||||
#endif | #endif | ||||
Config &config = const_cast<Config &>(GetConfig()); | Config &config = const_cast<Config &>(GetConfig()); | ||||
// Already started by the common test setup, so stop it to avoid | |||||
// interference | |||||
ECC_Stop(); | |||||
LogInstance().DisconnectTestLogger(); | |||||
m_app.parameterSetup(); | m_app.parameterSetup(); | ||||
m_app.createOptionsModel(true /* reset settings */); | m_app.createOptionsModel(true /* reset settings */); | ||||
QScopedPointer<const NetworkStyle> style(NetworkStyle::instantiate( | QScopedPointer<const NetworkStyle> style(NetworkStyle::instantiate( | ||||
QString::fromStdString(Params().NetworkIDString()))); | QString::fromStdString(Params().NetworkIDString()))); | ||||
m_app.setupPlatformStyle(); | m_app.setupPlatformStyle(); | ||||
m_app.createWindow(&config, style.data()); | m_app.createWindow(&config, style.data()); | ||||
connect(&m_app, &BitcoinApplication::windowShown, this, | connect(&m_app, &BitcoinApplication::windowShown, this, | ||||
&AppTests::guiTests); | &AppTests::guiTests); | ||||
Show All 40 Lines |