diff options
Diffstat (limited to 'src/widgets/dialogs')
-rw-r--r-- | src/widgets/dialogs/qcolordialog.cpp | 2 | ||||
-rw-r--r-- | src/widgets/dialogs/qfiledialog.cpp | 3 | ||||
-rw-r--r-- | src/widgets/dialogs/qfileinfogatherer.cpp | 4 | ||||
-rw-r--r-- | src/widgets/dialogs/qfilesystemmodel.cpp | 10 | ||||
-rw-r--r-- | src/widgets/dialogs/qmessagebox.cpp | 4 |
5 files changed, 9 insertions, 14 deletions
diff --git a/src/widgets/dialogs/qcolordialog.cpp b/src/widgets/dialogs/qcolordialog.cpp index e5f2fd1c49..3337cf328a 100644 --- a/src/widgets/dialogs/qcolordialog.cpp +++ b/src/widgets/dialogs/qcolordialog.cpp @@ -1616,7 +1616,7 @@ void QColorDialogPrivate::_q_pickScreenColor() q->grabMouse(); #endif -#ifdef Q_OS_WIN32 // excludes WinRT +#ifdef Q_OS_WIN32 // On Windows mouse tracking doesn't work over other processes's windows updateTimer->start(30); diff --git a/src/widgets/dialogs/qfiledialog.cpp b/src/widgets/dialogs/qfiledialog.cpp index b268864132..28153baceb 100644 --- a/src/widgets/dialogs/qfiledialog.cpp +++ b/src/widgets/dialogs/qfiledialog.cpp @@ -1832,9 +1832,6 @@ int QFileDialogPrivate::maxNameLength(const QString &path) { #if defined(Q_OS_UNIX) return ::pathconf(QFile::encodeName(path).data(), _PC_NAME_MAX); -#elif defined(Q_OS_WINRT) - Q_UNUSED(path); - return MAX_PATH; #elif defined(Q_OS_WIN) DWORD maxLength; const QString drive = path.left(3); diff --git a/src/widgets/dialogs/qfileinfogatherer.cpp b/src/widgets/dialogs/qfileinfogatherer.cpp index 7342efbd0d..b6fdac61d1 100644 --- a/src/widgets/dialogs/qfileinfogatherer.cpp +++ b/src/widgets/dialogs/qfileinfogatherer.cpp @@ -204,7 +204,7 @@ void QFileInfoGatherer::createWatcher() m_watcher = new QFileSystemWatcher(this); connect(m_watcher, &QFileSystemWatcher::directoryChanged, this, &QFileInfoGatherer::list); connect(m_watcher, &QFileSystemWatcher::fileChanged, this, &QFileInfoGatherer::updateFile); -# if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +# if defined(Q_OS_WIN) const QVariant listener = m_watcher->property("_q_driveListener"); if (listener.canConvert<QObject *>()) { if (QObject *driveListener = listener.value<QObject *>()) { @@ -212,7 +212,7 @@ void QFileInfoGatherer::createWatcher() connect(driveListener, SIGNAL(driveRemoved()), this, SLOT(driveRemoved())); } } -# endif // Q_OS_WIN && !Q_OS_WINRT +# endif // Q_OS_WIN #endif } 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); diff --git a/src/widgets/dialogs/qmessagebox.cpp b/src/widgets/dialogs/qmessagebox.cpp index 513a5c5658..c65d91cf9e 100644 --- a/src/widgets/dialogs/qmessagebox.cpp +++ b/src/widgets/dialogs/qmessagebox.cpp @@ -74,7 +74,7 @@ QT_BEGIN_NAMESPACE -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) HMENU qt_getWindowsSystemMenu(const QWidget *w) { if (QWindow *window = QApplicationPrivate::windowForWidget(w)) @@ -1600,7 +1600,7 @@ void QMessageBox::showEvent(QShowEvent *e) QAccessibleEvent event(this, QAccessible::Alert); QAccessible::updateAccessibility(&event); #endif -#if defined(Q_OS_WIN) && !defined(Q_OS_WINRT) +#if defined(Q_OS_WIN) if (const HMENU systemMenu = qt_getWindowsSystemMenu(this)) { EnableMenuItem(systemMenu, SC_CLOSE, d->detectedEscapeButton ? MF_BYCOMMAND|MF_ENABLED : MF_BYCOMMAND|MF_GRAYED); |