Uploaded image for project: 'Qt'
  1. Qt
  2. QTBUG-8822

CLONE -QDesktopService::storageLocation should be moved to QtCore

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Fixed
    • P3: Somewhat important
    • 5.0.0
    • 4.5.3
    • Core: Other
    • 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.

      Attachments

        No reviews matched the request. Check your Options in the drop-down menu of this sections header.

        Activity

          People

            Unassigned Unassigned
            marcusl Marcus Lindblom Sonestedt
            Votes:
            3 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved:

              Gerrit Reviews

                There are no open Gerrit changes