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

Enhancement: QFileOpenEvent Should Return Multiple Files

    XMLWordPrintable

Details

    • Suggestion
    • Resolution: Unresolved
    • P3: Somewhat important
    • Some future release
    • 4.4.0
    • Core: Event loop
    • None

    Description

      It would be useful with a files() member in QFileOpenEvent which returns a list of all selected files. Currently, only the file() method is available and one event is received for each file. It would be better to have a single event for all selected files. This matches the underlying Mac OS event system which provides an array of all files. It also seems consistent with the Qt4 style of returning lists such as QFileDialog::filesSelected().

      The reason for this enhancement is to examine all files before performing an action. For example, when wanting to process certain file types before other file types. Using the existing QFileOpenEvent, there is no way of knowing how many more, if any, files events are still pending so it is not possible to simply store the filenames as they arrive and wait for the final event before doing something.

      For backward compatibility when multiple files are selected, additional events could be returned (as happens today) if the user calls only file(). If the user calls the proposed files(), however, the additional Qt open events would be suppressed because the user retrieved the complete file list

      Attachments

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

        Activity

          People

            sorvig Morten Sørvig
            sanonymous Nokia Qt Support (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:

              Gerrit Reviews

                There are no open Gerrit changes