summaryrefslogtreecommitdiffstats
path: root/src/platformsupport
diff options
context:
space:
mode:
Diffstat (limited to 'src/platformsupport')
-rw-r--r--src/platformsupport/dnd/qsimpledrag.cpp15
-rw-r--r--src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm4
-rw-r--r--src/platformsupport/linuxaccessibility/atspiadaptor.cpp8
3 files changed, 21 insertions, 6 deletions
diff --git a/src/platformsupport/dnd/qsimpledrag.cpp b/src/platformsupport/dnd/qsimpledrag.cpp
index d8ef17ede3..18e6b97e3c 100644
--- a/src/platformsupport/dnd/qsimpledrag.cpp
+++ b/src/platformsupport/dnd/qsimpledrag.cpp
@@ -253,8 +253,19 @@ void QBasicDrag::updateCursor(Qt::DropAction action)
}
QCursor *cursor = qApp->overrideCursor();
- if (cursor && cursorShape != cursor->shape()) {
- qApp->changeOverrideCursor(QCursor(cursorShape));
+ QPixmap pixmap = m_drag->dragCursor(action);
+ if (!cursor) {
+ qApp->changeOverrideCursor((pixmap.isNull()) ? QCursor(cursorShape) : QCursor(pixmap));
+ } else {
+ if (!pixmap.isNull()) {
+ if ((cursor->pixmap().cacheKey() != pixmap.cacheKey())) {
+ qApp->changeOverrideCursor(QCursor(pixmap));
+ }
+ } else {
+ if (cursorShape != cursor->shape()) {
+ qApp->changeOverrideCursor(QCursor(cursorShape));
+ }
+ }
}
updateAction(action);
}
diff --git a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
index 8306a47e4f..66ca2d37fa 100644
--- a/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
+++ b/src/platformsupport/fontdatabases/mac/qcoretextfontdatabase.mm
@@ -79,8 +79,8 @@ static const char *languageForWritingSystem[] = {
"my", // Myanmar
"ka", // Georgian
"km", // Khmer
- "zh-cn", // SimplifiedChinese
- "zh-tw", // TraditionalChinese
+ "zh-Hans", // SimplifiedChinese
+ "zh-Hant", // TraditionalChinese
"ja", // Japanese
"ko", // Korean
"vi", // Vietnamese
diff --git a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
index f69e2365d8..6926f546a2 100644
--- a/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
+++ b/src/platformsupport/linuxaccessibility/atspiadaptor.cpp
@@ -1023,7 +1023,11 @@ void AtSpiAdaptor::notify(QAccessibleEvent *event)
case QAccessible::TextCaretMoved: {
if (sendObject || sendObject_text_caret_moved) {
QAIPointer iface = QAIPointer(event->accessibleInterface());
- Q_ASSERT(iface->textInterface());
+ if (!iface->textInterface()) {
+ qWarning() << "Sending TextCaretMoved from object that does not implement text interface: " << iface << iface->object();
+ return;
+ }
+
QString path = pathForInterface(iface);
QDBusVariant cursorData;
int pos = iface->textInterface()->cursorPosition();
@@ -1503,7 +1507,7 @@ QString AtSpiAdaptor::pathForObject(QObject *object) const
qAtspiDebug() << "AtSpiAdaptor::pathForObject: warning: creating path with QAction as object.";
}
quintptr uintptr = reinterpret_cast<quintptr>(object);
- if (!m_handledObjects.contains(uintptr))
+ if (!m_handledObjects.contains(uintptr) || m_handledObjects.value(uintptr) == 0)
m_handledObjects[uintptr] = QPointer<QObject>(object);
return QLatin1String(QSPI_OBJECT_PATH_PREFIX) + QString::number(uintptr);
}