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

FolderDialog open /dev/block/xxx crash

    XMLWordPrintable

Details

    • Bug
    • Resolution: Unresolved
    • P1: Critical
    • None
    • 6.8
    • Quick: Controls 2
    • None
    • Linux/X11

    Description

      the folderDialog of QtQuick.Dialogs will display symlink to file under /dev/block,
      and if we select it, the application will crash at:

      void QQuickFileDialogDelegatePrivate::chooseFile()
      {
      ...
      
      Q_ASSERT(fileDialog);
      }

      maybe we should provide flags as FileDialog to skip symlink, or like regular file, filter out symlink to file. example code:
       

      import QtQuick
      import QtQuick.Controls
      import QtQuick.Dialogs
      
      ApplicationWindow {
          width: 480
          height: 272
          visible: true
          title: "test FolderDialog"
      
          Button {
              text: "folder"
      
              onClicked: {
                  dlgSaveDir.open()
              }
          }
      
          FolderDialog {
              id: dlgSaveDir
              currentFolder: StandardPaths.standardLocations(StandardPaths.PicturesLocation)[0]
              onAccepted: {
                  console.log("set folder to: " + selectedFolder)
                  saveModel.url = selectedFolder
              }
          }
      }
      

       

      Attachments

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

        Activity

          People

            qt.team.quick.subscriptions Qt Quick and Widgets Team
            niqingliang2003 niqingliang2003
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes