summaryrefslogtreecommitdiff
path: root/src/common/file_util.cpp
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2019-05-08 23:11:15 -0400
committerLioncash <mathew1800@gmail.com>2019-05-09 00:52:49 -0400
commit4ef3329f812a8b19b191633a7e1c661f2b0a4c09 (patch)
tree74c5c526b85a91c6096eac162f063fae8d0908bb /src/common/file_util.cpp
parent75a8b304d464525a260f0bd8ad2a7f8708c80ed2 (diff)
configuration/config: Move config loading and saving to functions based off groups
Over time our config values have grown quite numerous in size. Unfortunately it also makes the single functions we have for loading and saving values more error prone. For example, we were loading the core settings twice when they only should have been loaded once. In another section, a variable was shadowing another variable used to load settings from a completely different section. Finally, in one other case, there was an extraneous endGroup() call used that didn't need to be done. This was essentially dead code and also a bug waiting to happen. This separates the section loading code into its own separate functions. This keeps variables only visible to the code that actually needs it, and makes it much easier to visually see the end of each individual configuration group. It also makes it much easier to visually catch bugs during code review. While we're at it, this also uses QStringLiteral instead of raw string literals, which both avoids constructing a lot of QString instances, but also makes it much easier to disable implicit ASCII to QString and vice-versa in the future via setting QT_NO_CAST_FROM_ASCII and QT_NO_CAST_TO_ASCII as compilation flags.
Diffstat (limited to 'src/common/file_util.cpp')
0 files changed, 0 insertions, 0 deletions