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.)
|For Gerrit Dashboard: QTBUG-56978|
|259146,22||Add API to change download directory path and file name||dev||qt/qtwebengine||Status: MERGED||+2||0|
|261225,4||Add API to get the suggested download file name||dev||qt/qtwebengine||Status: MERGED||+2||0|