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

Can't get suggested filename from QWebEngineDownloadItem

    XMLWordPrintable

    Details

    • Type: User Story
    • Status: Closed
    • Priority: P2: Important
    • Resolution: Done
    • Affects Version/s: 5.7.0
    • Fix Version/s: 5.14.0 Beta 1
    • Component/s: WebEngine
    • Labels:
      None
    • Commits:
      a4eeb9dbd995d598bd3a639dd450def7c242b383 0884fab3b161b62c1e2bb1bac6bbd74560f06232

      Description

      In e.g. QTBUG-48206 using the filename part of QWebEngineDownloadItem::path() is the proposed way of getting a filename of a download.

      However, when I want to store a download named foo in a custom directory, and a ~/Downloads/foo happens to exist, I'd get foo(1) as proposed name.

      From an API perspective, I can see two ways of solving this, and IMHO both should exist:

      • Being able to pass a directory only to setPath, and let Chromium select a filename based on that.
      • Being able to get the filename part without any collision logic (i.e. only the part inferred from content-disposition/URL/etc.)

        Attachments

        1. main.cpp
          3 kB
          Tamas Zakor
        For Gerrit Dashboard: QTBUG-56978
        # Subject Branch Project Status CR V

          Activity

            People

            Assignee:
            ztamas Tamas Zakor
            Reporter:
            the compiler Florian Bruhin
            Votes:
            1 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:

                Gerrit Reviews

                There are no open Gerrit changes