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

QDesktopServices::storageLocation() does not work correctly on Vista when the registry have no records.

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: P2: Important P2: Important
    • 4.6.0
    • 4.4.3
    • Core: Other
    • None
    • 722d351de79713527

      On Vista, QDesktopServices::storageLocation() might not work correctly.

      For the following two cases:

      1. There are no records in:
      HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders

      2. There are records in that section of the registry.

      Please notice the comment in both files:
      "!Do not use this registry key"="Use the SHGetFolderPath or SHGetKnownFolderPath function instead"

      QDesktopServices::storageLocation(QDesktopServices::DataLocation) returns "" in case (1), which is a problem, and works correctly in case (2).

      QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation) returns the executable's directory in case (1), which is a problem, and works correctly in case (2).

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

            bachewii Jens
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved:

                There are no open Gerrit changes