bitcoin-core / gui-qml

Bitcoin GUI (experimental QML-based fork)
MIT License
107 stars 40 forks source link

Setup AppMode within InitErrorMessage #344

Closed jarolrod closed 1 year ago

jarolrod commented 1 year ago

If you run the GUI with an invalid parameter, the initerrormessage window should appear. But, https://github.com/bitcoin-core/gui-qml/pull/289 introduced a dependency on AppMode being available into the OutlineButton which the initerrormessage window uses. So, the following appears on master and the initerrormessage window does not appear:

$ ./src/qt/bitcoin-qt -signsadfsad
Error: Cannot parse command line arguments: Invalid parameter -signsadfsad

QQmlApplicationEngine failed to load component
qrc:/qml/pages/initerrormessage.qml:32:9: Type OutlineButton unavailable
qrc:/qml/controls/OutlineButton.qml:7:1: module "org.bitcoincore.qt" is not installed

This encapsulates the setting of AppMode into a function, and runs in within the InitErrorMessageBox function:

Screen Shot 2023-06-03 at 12 52 55 AM

Windows Intel macOS Apple Silicon macOS ARM64 Android ARM32 Android

jarolrod commented 1 year ago

cc @johnny9