Fixup of PR 13082: fix a misspell in DefaultAppArgs and no longer use globalVars.appArgs in a boolean context (#13386)#13386
Conversation
… instance of globalVars.apppArgs falsy in a logical context
This comment was marked as resolved.
This comment was marked as resolved.
I do not really understand why we need to check if the value of
At the stage where add-ons or plugins from the scratchpad are loaded |
|
@seanbudd I've removed the overloaded operator and |
When checking the change log translation, I have found a wrong reference in an item of the change log. I have thus checked all the refs for 2022.2. Link to issue number: None Follow-up of various issues. Summary of the issue: Some of the GitHub references in the change log were targetting wrong issue or PR. Description of user facing changes The references have been fixed in the change log document. Description of development approach Fixed the following references: Fixup of PR 13082: fix a misspell in DefaultAppArgs and no longer use globalVars.appArgs in a boolean context (#13386) #13386 replaced by Windows 10/11 Calculator: allow NVDA to announce more operations by suppressing only a limited number of keyboard commands #13383 Revert "Update to py2exe 0.11.0.1 (#13066)" #13508 replaced by Windows 11 Design Elements Are Not Reported by NVDA When Mouse Tracking Is On #13506 Fixup of PR 13082: fix a misspell in DefaultAppArgs and no longer use globalVars.appArgs in a boolean context (#13386) #13386 (bis) replaced by Windows 11 Notepad: status bar is not announced #13688 Also, I have replaced #13276 (Libre Office issue) by #13277 (associated PR) since the issue description is not related at all with the change for developers.
Link to issue number:
Fix-up of PR #13082
Summary of the issue:
PR #13082 added fake implementation of
globalVars.appArgswhich is used in cases where command line arguments are not parsed. It introduced two mistakes however:DefautAppArgs(note the missing "l")appArgsin a boolean context to check if log viewer should be opened, determine if log fragment can be marked for copy etc. The new class was alwaysTruein a boolean context.Description of how this pull request fixes the issue:
DefaultAppArgs.logHandlerno longer checks boolean value ofappArgs. This is safe since:logHandler.Logger.markFragmentStartandlogHandler.Logger.getFragmentare used only in NVDA and they are invoked by the user action (even before Store current NVDA's language in globalVars regardless if it has been provided from the command line or not. #13082appArgswas always truthy in that context).appArgsbeing falthy inlogHandler.Logger._logintroduced in 2827a34 can also be safely removed since even for NVDA_slaveactivateLogVieweris set toFalse(only two cases where it is set toTrueoccur when user invokes log viewer via keyboard command). Also while this is not clarified in this commit at a guess I'd say this check has been added not for any additional security but just to avoidAttributeErrorbeing raised when trying to accessglobalVars.appArgs.securewhen logging from slave.Testing strategy:
None needed.
Known issues with pull request:
None known
Change log entries:
None needed - at a point where add-ons are loaded
appArgswas always truthy.Code Review Checklist: