test: Set organization name#803
Conversation
If `setOrganizationName()` and `setApplicationName()` has not been previously called, the `QSettings` object will not be able to read or write any settings.
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
|
Friendly ping @ryanofsky @sipsorcery @furszy @jarolrod |
A test suite should not leave any artifacts except for those explicitly expected. This change is easy to review with `git diff --ignore-all-space` command.
|
Building this PR with msvc and running Does that demonstrate the fix? |
Exactly. |
|
tACK 49cf635. |
| AppTests app_tests(app); | ||
| num_test_failures += QTest::qExec(&app_tests); | ||
| { | ||
| BitcoinApplication app; |
There was a problem hiding this comment.
In commit "qt, test: Clean settings after tests" (0dcbad3)
It seems reasonable to move the BitcoinApplication app into a nested scope, so BitcoinApplication is fully destroyed before settings.clear() is called. But I don't understand if this was a required change, or just cleanup, since I would expect the settings.clear() call to work in practice either way.
There was a problem hiding this comment.
It was a required change because ~BitcoinApplication calls ~BitcoinGUI, which in turn saves the window geometry to the settings.
From Qt docs:
Fixes #799.