summaryrefslogtreecommitdiffstats
path: root/src/gui/doc/snippets/textdocument-end/textdocumentendsnippet.cpp
diff options
context:
space:
mode:
authorTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-02-05 19:10:24 +0100
committerTor Arne Vestbø <tor.arne.vestbo@qt.io>2021-02-11 14:01:45 +0000
commit62af65551f3d4c775ff7f7353feacac177650e81 (patch)
tree9687d5746156af43cc07f2ddcff3df0b4853ee9d /src/gui/doc/snippets/textdocument-end/textdocumentendsnippet.cpp
parent9bc849f9c4fe921763859d9c8f363563d6a59548 (diff)
macOS: Initialize standard NSUserDefaults as early as possible
The standard user defaults are initialized from an ordered list of domains, as documented by NSUserDefaults.standardUserDefaults. This includes e.g. parsing command line arguments, such as -AppleLocale "fr_FR", as well as global defaults. AppKit does this during [NSUserDefaults init], which in turn initializes the locale returned by CFLocaleCopyCurrent() and NSLocale.currentLocale. If those functions are called before NSUserDefaults does its thing the locale will already have been created, and the logic in NSUserDefaults won't have any effect -- nor is there any way for us to set/override the locale after this. To ensure that the -AppleLocale command line override is available through the lower level Core Foundation preferences APIs, we need to initialize the user defaults as early as possible via the Foundation-API. Change-Id: I906a5a8b05a7216e60020ec45f8da725b801d2c5 Reviewed-by: Edward Welbourne <edward.welbourne@qt.io> Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Diffstat (limited to 'src/gui/doc/snippets/textdocument-end/textdocumentendsnippet.cpp')
0 files changed, 0 insertions, 0 deletions