From 37045f8efc4bca2fcdeef467fc03cec1f9940bf7 Mon Sep 17 00:00:00 2001 From: Michael Weghorn Date: Wed, 10 Aug 2022 13:44:39 +0200 Subject: [PATCH] a11y atspi: Send D-Bus reply for "GetCaption" in expected format MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Just like for the "GetSummary" case, the argument in the reply for this AT-SPI table method needs to be wrapped in a variant. Fixes this warning from the output of the client side using libatspi: > (accerciser:181933): dbind-WARNING **: 11:50:36.394: atspi_dbus_get_property: > expected a variant when fetching Caption from interface org.a11y.atspi.Table; got (so) Fixes: QTBUG-105520 Change-Id: I18167359e4cd3bb14a94289ac7481f9e39a18ad0 Reviewed-by: Tor Arne Vestbø (cherry picked from commit 7594e8ca4d91935400f065e138ff1e4b4f212478) Reviewed-by: Qt Cherry-pick Bot --- src/gui/accessible/linux/atspiadaptor.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/accessible/linux/atspiadaptor.cpp b/src/gui/accessible/linux/atspiadaptor.cpp index 0c27422364f..06d33d48d75 100644 --- a/src/gui/accessible/linux/atspiadaptor.cpp +++ b/src/gui/accessible/linux/atspiadaptor.cpp @@ -2237,10 +2237,10 @@ bool AtSpiAdaptor::tableInterface(QAccessibleInterface *interface, const QString QAccessibleInterface * captionInterface= interface->tableInterface()->caption(); if (captionInterface) { QSpiObjectReference ref = QSpiObjectReference(connection, QDBusObjectPath(pathForInterface(captionInterface))); - sendReply(connection, message, QVariant::fromValue(ref)); + sendReply(connection, message, QVariant::fromValue(QDBusVariant(QVariant::fromValue(ref)))); } else { - sendReply(connection, message, QVariant::fromValue( - QSpiObjectReference(connection, QDBusObjectPath(ATSPI_DBUS_PATH_NULL)))); + sendReply(connection, message, QVariant::fromValue(QDBusVariant(QVariant::fromValue( + QSpiObjectReference(connection, QDBusObjectPath(ATSPI_DBUS_PATH_NULL)))))); } } else if (function == "GetNColumns"_L1) { connection.send(message.createReply(QVariant::fromValue(QDBusVariant(