Changeset View
Changeset View
Standalone View
Standalone View
src/qt/test/apptests.cpp
Show First 20 Lines • Show All 75 Lines • ▼ Show 20 Lines | #endif | ||||
Config &config = const_cast<Config &>(GetConfig()); | Config &config = const_cast<Config &>(GetConfig()); | ||||
// Create a temp data directory to backup the gui settings to | // Create a temp data directory to backup the gui settings to | ||||
fs::create_directories([] { | fs::create_directories([] { | ||||
BasicTestingSetup test{CBaseChainParams::REGTEST}; | BasicTestingSetup test{CBaseChainParams::REGTEST}; | ||||
return GetDataDir() / "blocks"; | return GetDataDir() / "blocks"; | ||||
}()); | }()); | ||||
qRegisterMetaType<interfaces::BlockAndHeaderTipInfo>( | |||||
"interfaces::BlockAndHeaderTipInfo"); | |||||
m_app.parameterSetup(); | m_app.parameterSetup(); | ||||
m_app.createOptionsModel(true /* reset settings */); | m_app.createOptionsModel(true /* reset settings */); | ||||
QScopedPointer<const NetworkStyle> style( | QScopedPointer<const NetworkStyle> style( | ||||
NetworkStyle::instantiate(Params().NetworkIDString())); | NetworkStyle::instantiate(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 20 Lines • Show All 43 Lines • Show Last 20 Lines |