Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. General and Desktop
  4. QDir::entryList() With QDir::AllDirs Filter Treats Windows Shortcut Files as Symbolic Links - Bug?
Forum Updated to NodeBB v4.3 + New Features

QDir::entryList() With QDir::AllDirs Filter Treats Windows Shortcut Files as Symbolic Links - Bug?

Scheduled Pinned Locked Moved Unsolved General and Desktop
9 Posts 2 Posters 556 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Crag_Hack
    wrote on last edited by Crag_Hack
    #1

    Hi I have found a peculiar behavior with Qt 5.15.2 treating Windows shortcut files as symbolic links. They are most definitely not symbolic links - is there a reason why Qt does this? Is this by design or a coding oversight?

    Christian EhrlicherC 1 Reply Last reply
    0
    • C Crag_Hack

      Hi I have found a peculiar behavior with Qt 5.15.2 treating Windows shortcut files as symbolic links. They are most definitely not symbolic links - is there a reason why Qt does this? Is this by design or a coding oversight?

      Christian EhrlicherC Offline
      Christian EhrlicherC Offline
      Christian Ehrlicher
      Lifetime Qt Champion
      wrote on last edited by
      #2

      @Crag_Hack said in QDir::entryList() With QDir::AllDirs Filter Treats Windows Shortcut Files as Symbolic Links - Bug?:

      Is this by design or a coding oversight?

      By design as this was the way to go for symbolic links a long time ago on windows.

      Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
      Visit the Qt Academy at https://academy.qt.io/catalog

      1 Reply Last reply
      2
      • C Offline
        C Offline
        Crag_Hack
        wrote on last edited by
        #3

        @Christian-Ehrlicher Lol after one too many stack overflow posts with people criticizing me for not adding any code I finally added too much code... I edited the first post for brevity.

        How long has Windows had symbolic link support for? Since the age of dinosaurs perhaps? Considering any program that old probably lost Windows compatibility long ago how come Qt hasn't updated their way of doing things?

        It looks like the only way to properly enumerate and traverse the file/directory structure with Windows shortcut files is to use the Win API which defeats the purpose of using Qt in the first place. Is there another way of doing things properly with Qt?

        Should we perhaps try to influence Qt to change the way of doing things?

        Thanks!

        1 Reply Last reply
        0
        • C Offline
          C Offline
          Crag_Hack
          wrote on last edited by
          #4

          @Christian-Ehrlicher Got any input? Thanks!

          Christian EhrlicherC 1 Reply Last reply
          0
          • C Crag_Hack

            @Christian-Ehrlicher Got any input? Thanks!

            Christian EhrlicherC Offline
            Christian EhrlicherC Offline
            Christian Ehrlicher
            Lifetime Qt Champion
            wrote on last edited by
            #5

            What should I write? Windows and symbolic links ... is a mess. I need admin rights to create them so they're not usable for me.

            Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
            Visit the Qt Academy at https://academy.qt.io/catalog

            1 Reply Last reply
            0
            • C Offline
              C Offline
              Crag_Hack
              wrote on last edited by Crag_Hack
              #6

              Eh I guess the only viable option then is to turn off symbolic links when dealing with shortcut files and otherwise resort to using the Win API if the need to properly handle such things is a requirement. Thanks though. I was hoping the Qt company could at least create an option to no longer treat shortcut files as symbolic links when using QDir::entryList() and related API members.

              Christian EhrlicherC 1 Reply Last reply
              0
              • C Crag_Hack

                Eh I guess the only viable option then is to turn off symbolic links when dealing with shortcut files and otherwise resort to using the Win API if the need to properly handle such things is a requirement. Thanks though. I was hoping the Qt company could at least create an option to no longer treat shortcut files as symbolic links when using QDir::entryList() and related API members.

                Christian EhrlicherC Offline
                Christian EhrlicherC Offline
                Christian Ehrlicher
                Lifetime Qt Champion
                wrote on last edited by
                #7

                @Crag_Hack You can ask them.

                Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                Visit the Qt Academy at https://academy.qt.io/catalog

                1 Reply Last reply
                0
                • C Offline
                  C Offline
                  Crag_Hack
                  wrote on last edited by
                  #8

                  @Christian-Ehrlicher Via this guy? https://bugreports.qt.io/issues/

                  Christian EhrlicherC 1 Reply Last reply
                  0
                  • C Crag_Hack

                    @Christian-Ehrlicher Via this guy? https://bugreports.qt.io/issues/

                    Christian EhrlicherC Offline
                    Christian EhrlicherC Offline
                    Christian Ehrlicher
                    Lifetime Qt Champion
                    wrote on last edited by
                    #9

                    @Crag_Hack Yes

                    Qt Online Installer direct download: https://download.qt.io/official_releases/online_installers/
                    Visit the Qt Academy at https://academy.qt.io/catalog

                    1 Reply Last reply
                    0

                    • Login

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • Users
                    • Groups
                    • Search
                    • Get Qt Extensions
                    • Unsolved