In b263b91340 I exchanged QString::sprintf
with QString::asprintf as the former was declared deprecated from Qt 5.5
onwards. I forgot to check the docs though. If I had, I would have
noticed that in contrast to sprintf, asprintf is a static function which
returns the assembled String (sprintf wrote it to the object it was
being called on). Thus I also have to assign the return value of
asprintf to a variable in order to have it have an effect.
This commit adds all the missing includes when the PCH header is not used.
Also, some includes are reordered and/or made consistent (e.g. "#include <QtEndian>" -> "#include <QtCore/QtEndian>").
According to Qt's documentation the PCH header doesn't need to be included.
From https://doc.qt.io/qt-5/qmake-precompiledheaders.html:
"To make your project use precompiled headers, you only need to define the PRECOMPILED_HEADER variable in your project file."
"qmake will handle the rest, to ensure the creation and use of the precompiled header file. You do not need to include the precompiled header file in HEADERS, as qmake will do this if the configuration supports precompiled headers."