Commit 6684883
Initialize Fact QVariant as invalid
Adjusted the default Fact _rawValue from 0 to QVariant::Invalid and
updated _variantToString to return placeholders for Facts that haven't
received a value yet. This makes it possible to distinguish them from
those that are legitimately 0 (or the equivalent for their type). It
also avoids starting every Fact's QVariant lifecycle as an integer,
which is incorrect in most cases.
Related code that set initial values for a few VehicleFactGroup Facts
(Hobbs meter, altitude above terrain, flight distance & time) has been
updated or removed for consistency.1 parent b44a33f commit 6684883
File tree
4 files changed
+14
-7
lines changed- src
- FactSystem
- Vehicle
- FactGroups
4 files changed
+14
-7
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
321 | 321 | | |
322 | 322 | | |
323 | 323 | | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
324 | 336 | | |
325 | 337 | | |
326 | 338 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
191 | 191 | | |
192 | 192 | | |
193 | 193 | | |
194 | | - | |
| 194 | + | |
195 | 195 | | |
196 | 196 | | |
197 | 197 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
49 | 49 | | |
50 | 50 | | |
51 | 51 | | |
52 | | - | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
252 | 252 | | |
253 | 253 | | |
254 | 254 | | |
255 | | - | |
256 | | - | |
257 | | - | |
258 | 255 | | |
259 | 256 | | |
260 | 257 | | |
| |||
347 | 344 | | |
348 | 345 | | |
349 | 346 | | |
350 | | - | |
351 | | - | |
352 | 347 | | |
353 | 348 | | |
354 | 349 | | |
| |||
0 commit comments