Avoids propagating headers into scopes where they're not necessary.
Also uncovered reliance on an indirect inclusion within
CheatsManager.cpp, which is now fixed.
If a user indicates that they want to clone and edit an AR code, then
click cancel on the following dialog, we shouldn't actually clone the
code.
We also shouldn't resave the codes if the edit dialog is opened and then
closed again via cancel, as there's nothing that actually changed. This
way we don't perform disk accesses unless they're actually necessary.
QStringLiterals generate a buffer so that during runtime there's very
little cost to constructing a QString. However, this also means that
duplicated strings cannot be optimized out into a single entry that gets
referenced everywhere, taking up space in the binary.
Rather than use QStringLiteral(""), we can just use QString{} (the
default constructor) to signify the empty string. This gets rid of an
unnecessary string buffer from being created, saving a tiny bit of
space.
While we're at it, we can just use the character overloads of particular
functions when they're available instead of using a QString overload.
The characters in this case are Latin-1 to begin with, so we can just
specify the characters as QLatin1Char instances to use those overloads.
These will automatically convert to QChar if needed, so this is safe.