5
5
#include < qml/bitcoin.h>
6
6
7
7
#include < chainparams.h>
8
+ #include < common/args.h>
9
+ #include < common/system.h>
8
10
#include < init.h>
9
11
#include < interfaces/chain.h>
10
12
#include < interfaces/init.h>
30
32
#include < qt/initexecutor.h>
31
33
#include < qt/networkstyle.h>
32
34
#include < qt/peertablemodel.h>
33
- #include < util/system.h>
34
35
#include < util/threadnames.h>
35
36
#include < util/translation.h>
36
37
@@ -145,7 +146,7 @@ void setupChainQSettings(QGuiApplication* app, QString chain)
145
146
int QmlGuiMain (int argc, char * argv[])
146
147
{
147
148
#ifdef WIN32
148
- util ::WinCmdLineArgs winArgs;
149
+ common ::WinCmdLineArgs winArgs;
149
150
std::tie (argc, argv) = winArgs.get ();
150
151
#endif // WIN32
151
152
@@ -192,7 +193,7 @@ int QmlGuiMain(int argc, char* argv[])
192
193
193
194
// / Check for chain settings (Params() calls are only valid after this clause).
194
195
try {
195
- SelectParams (gArgs .GetChainName ());
196
+ SelectParams (gArgs .GetChainType ());
196
197
} catch (std::exception &e) {
197
198
InitError (Untranslated (strprintf (" %s\n " , e.what ())));
198
199
return EXIT_FAILURE;
@@ -248,7 +249,7 @@ int QmlGuiMain(int argc, char* argv[])
248
249
#endif
249
250
250
251
ChainModel chain_model{*chain};
251
- chain_model.setCurrentNetworkName (QString::fromStdString (gArgs .GetChainName ( )));
252
+ chain_model.setCurrentNetworkName (QString::fromStdString (ChainTypeToString ( gArgs .GetChainType () )));
252
253
setupChainQSettings (&app, chain_model.currentNetworkName ());
253
254
254
255
QObject::connect (&node_model, &NodeModel::setTimeRatioList, &chain_model, &ChainModel::setTimeRatioList);
@@ -268,7 +269,7 @@ int QmlGuiMain(int argc, char* argv[])
268
269
269
270
QQmlApplicationEngine engine;
270
271
271
- QScopedPointer<const NetworkStyle> network_style{NetworkStyle::instantiate (Params ().NetworkIDString ())};
272
+ QScopedPointer<const NetworkStyle> network_style{NetworkStyle::instantiate (Params ().GetChainType ())};
272
273
assert (!network_style.isNull ());
273
274
engine.addImageProvider (QStringLiteral (" images" ), new ImageProvider{network_style.data ()});
274
275
0 commit comments