diff options
author | Liang Qi <liang.qi@qt.io> | 2019-07-01 10:21:37 +0200 |
---|---|---|
committer | Liang Qi <liang.qi@qt.io> | 2019-07-01 10:21:37 +0200 |
commit | d25c3227299a6a281db37e68e45f0b02db3f5297 (patch) | |
tree | 08f436f8aebe2c8aaaee570f88e71bd2d0c8f6e7 /src/gui/kernel/qsimpledrag.cpp | |
parent | 222b81f5dac2a5d32027b15d3a784819291431f6 (diff) | |
parent | a39b19b0c7419021b3c22dc4d4bced0995f3a29f (diff) |
Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
src/network/ssl/qsslsocket_openssl.cpp
src/platformsupport/vkconvenience/qvkconvenience.cpp
Change-Id: I97ce6ed185f7fdad8102cc58d3cfec0119fd7bb4
Diffstat (limited to 'src/gui/kernel/qsimpledrag.cpp')
-rw-r--r-- | src/gui/kernel/qsimpledrag.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/gui/kernel/qsimpledrag.cpp b/src/gui/kernel/qsimpledrag.cpp index bba2a863a9..d3070a3d1a 100644 --- a/src/gui/kernel/qsimpledrag.cpp +++ b/src/gui/kernel/qsimpledrag.cpp @@ -309,11 +309,15 @@ void QBasicDrag::updateCursor(Qt::DropAction action) m_dndHasSetOverrideCursor = true; } else { QCursor *cursor = QGuiApplication::overrideCursor(); - if (!pixmap.isNull()) { - if (cursor->pixmap().cacheKey() != pixmap.cacheKey()) - QGuiApplication::changeOverrideCursor(QCursor(pixmap)); - } else if (cursorShape != cursor->shape()) { - QGuiApplication::changeOverrideCursor(QCursor(cursorShape)); + if (!cursor) { + QGuiApplication::changeOverrideCursor(pixmap.isNull() ? QCursor(cursorShape) : QCursor(pixmap)); + } else { + if (!pixmap.isNull()) { + if (cursor->pixmap().cacheKey() != pixmap.cacheKey()) + QGuiApplication::changeOverrideCursor(QCursor(pixmap)); + } else if (cursorShape != cursor->shape()) { + QGuiApplication::changeOverrideCursor(QCursor(cursorShape)); + } } } #endif |