Details
-
Suggestion
-
Resolution: Fixed
-
P3: Somewhat important
-
4.5.3
-
None
Description
The QDesktopService class is part of QtGui, but some of its methods (at least storageLocation, also possibly displayName) do not seem to have any reason to be there - they just build a path according to the state of QCoreApplication. Indeed, it is perfectly possible to have a non-gui application that needs to access the data folder (or any other folder for that instance). In that case, the application will have to link to QtGui for the sole purpose of using methods that are not GUI-dependant at all.
This issue could probably easily be fixed by moving storageLocation to another static class of QtCore (QCoreApplication comes to mind), and keeping an obsoleted stub in QDesktopServices for backward compatibility.