Setup AppMode within InitErrorMessage #344

Manually merged
jarolrod merged 1 commit from appmode-initerror into main 2023-06-04 15:41:17 +00:00 AGit
jarolrod commented 2023-06-03 05:07:31 +00:00 (Migrated from github.com)

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

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: <img width="612" alt="Screen Shot 2023-06-03 at 12 52 55 AM" src="https://git.fish.foo/attachments/979329a1-23ee-434e-adf7-cbdc3648dd6f"> [![Windows](https://img.shields.io/badge/OS-Windows-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/win64/unsecure_win_gui.zip?branch=pull/344) [![Intel macOS](https://img.shields.io/badge/OS-Intel%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos/unsecure_mac_gui.zip?branch=pull/344) [![Apple Silicon macOS](https://img.shields.io/badge/OS-Apple%20Silicon%20macOS-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/macos_arm64/unsecure_mac_arm64_gui.zip?branch=pull/344) [![ARM64 Android](https://img.shields.io/badge/OS-Android-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android/unsecure_android_apk.zip?branch=pull/344) [![ARM32 Android](https://img.shields.io/badge/OS-Android%2032bit-green)](https://api.cirrus-ci.com/v1/artifact/github/bitcoin-core/gui-qml/android32/unsecure_android_32bit_apk.zip?branch=pull/344)
jarolrod commented 2023-06-03 05:09:05 +00:00 (Migrated from github.com)

cc @johnny9

cc @johnny9
johnny9 (Migrated from github.com) approved these changes 2023-06-04 01:01:20 +00:00
johnny9 (Migrated from github.com) left a comment

ACK 8eac738279

Good find.

ACK 8eac7382796f6e976ba52c339ebd7e1fa3466489 Good find.
Sign in to join this conversation.
No description provided.