Windows QPA: Pass on Url of non-filesystem directory items

Do not attempt to copy directory items, which will fail and result
in empty result lists. Amends 5865e582fd.

Task-number: QTBUG-57070
Task-number: QTBUG-63645
Change-Id: I59efce196b28099ec8aff5a802ef0a4d9a098453
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
This commit is contained in:
Friedemann Kleint 2017-10-27 13:28:44 +02:00
parent d366d6dfd3
commit b4ac552561

View File

@ -1419,7 +1419,7 @@ QList<QUrl> QWindowsNativeOpenFileDialog::dialogResult() const
for (IShellItem *item : QWindowsShellItem::itemsFromItemArray(items)) {
QWindowsShellItem qItem(item);
const QString path = qItem.path();
if (path.isEmpty()) {
if (path.isEmpty() && !qItem.isDir()) {
const QString temporaryCopy = createTemporaryItemCopy(qItem);
if (temporaryCopy.isEmpty())
qWarning() << "Unable to create a local copy of" << qItem;