'How to read json file on QTIFW
On QTIFW I see there is a function to read a file
string readFile(string filePath, string codecName)
But I'm thinking about read a json file.
Why? I would like to pass a few directories to registerPathForUninstallation, so I would like to read those from json.
{
"dir1": "John",
"dir2": "Smith",
}
How to read json file on QTIFW?
https://doc.qt.io/qtinstallerframework/scripting-installer.html#readFile-method
Also interested in alternative approaches to this problem.
Solution 1:[1]
It looks like it is a multithreaded app which is exposed to the threads context switching, starvations or contentions which by nature is indeterministic as other threads may do different stuff each time you measure the app. Also the queue itself may have different number of elements inside each time you measure. I would ensure that the conditions in each run are the same by using some kind of mocking. Please note that it is very unlikely that there are no other programs run in the background even you haven't run them explicitly (could be some daemons, etc.)
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | tomaszmi |
