diff options
author | Oliver Wolff <oliver.wolff@qt.io> | 2020-06-05 09:24:37 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2020-06-06 20:25:49 +0200 |
commit | 45b0f1be686cfba8dcecb9be5c875cae59c69276 (patch) | |
tree | 363dfd46575d147206267d854ce14747157f432e /src/widgets/dialogs/qfilesystemmodel.cpp | |
parent | aa81b90738ce9faee5e433617c8bd243cb238729 (diff) |
Remove winrt
Macros and the await helper function from qfunctions_winrt(_p).h are
needed in other Qt modules which use UWP APIs on desktop windows.
Task-number: QTBUG-84434
Change-Id: Ice09c11436ad151c17bdccd2c7defadd08c13925
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Diffstat (limited to 'src/widgets/dialogs/qfilesystemmodel.cpp')
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/src/widgets/dialogs/qfilesystemmodel.cpp b/src/widgets/dialogs/qfilesystemmodel.cpp index 1c6495f9b6..bbe1ef4376 100644 --- a/src/widgets/dialogs/qfilesystemmodel.cpp +++ b/src/widgets/dialogs/qfilesystemmodel.cpp @@ -57,9 +57,7 @@ #ifdef Q_OS_WIN # include <QtCore/QVarLengthArray> # include <qt_windows.h> -# ifndef Q_OS_WINRT -# include <shlobj.h> -# endif +# include <shlobj.h> #endif QT_BEGIN_NAMESPACE @@ -1777,7 +1775,7 @@ void QFileSystemModelPrivate::_q_directoryChanged(const QString &directory, cons removeNode(parentNode, toRemove[i]); } -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) static QString volumeName(const QString &path) { IShellItem *item = nullptr; @@ -1796,7 +1794,7 @@ static QString volumeName(const QString &path) item->Release(); return result; } -#endif // Q_OS_WIN && !Q_OS_WINRT +#endif // Q_OS_WIN /*! \internal @@ -1814,7 +1812,7 @@ QFileSystemModelPrivate::QFileSystemNode* QFileSystemModelPrivate::addNode(QFile #else Q_UNUSED(info) #endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) //The parentNode is "" so we are listing the drives if (parentNode->fileName.isEmpty()) node->volumeName = volumeName(fileName); |