Changeset View
Changeset View
Standalone View
Standalone View
doc/developer-notes.md
| Show First 20 Lines • Show All 511 Lines • ▼ Show 20 Lines | |||||
| ----- | ----- | ||||
| - Do not display or manipulate dialogs in model code (classes `*Model`) | - Do not display or manipulate dialogs in model code (classes `*Model`) | ||||
| - *Rationale*: Model classes pass through events and data from the core, they | - *Rationale*: Model classes pass through events and data from the core, they | ||||
| should not interact with the user. That's where View classes come in. The converse also | should not interact with the user. That's where View classes come in. The converse also | ||||
| holds: try to not directly access core data structures from Views. | holds: try to not directly access core data structures from Views. | ||||
| - Avoid adding slow or blocking code in the GUI thread. In particular do not | |||||
| add new `interface::Node` and `interface::Wallet` method calls, even if they | |||||
| may be fast now, in case they are changed to lock or communicate across | |||||
| processes in the future. | |||||
| Prefer to offload work from the GUI thread to worker threads (see | |||||
| `RPCExecutor` in console code as an example) or take other steps (see | |||||
| https://doc.qt.io/archives/qq/qq27-responsive-guis.html) to keep the GUI | |||||
| responsive. | |||||
| - *Rationale*: Blocking the GUI thread can increase latency, and lead to | |||||
| hangs and deadlocks. | |||||
| Unit Tests | Unit Tests | ||||
| ----------- | ----------- | ||||
| - Test suite naming convention: The Boost test suite in file | - Test suite naming convention: The Boost test suite in file | ||||
| `src/test/foo_tests.cpp` should be named `foo_tests`. Test suite names must | `src/test/foo_tests.cpp` should be named `foo_tests`. Test suite names must | ||||
| be unique. | be unique. | ||||
| Subtrees | Subtrees | ||||
| ---------- | ---------- | ||||
| ▲ Show 20 Lines • Show All 82 Lines • Show Last 20 Lines | |||||