summaryrefslogtreecommitdiffstats
path: root/src/gui/accessible
diff options
context:
space:
mode:
authorIsak Fyksen <[email protected]>2024-10-24 14:12:48 +0200
committerVolker Hilsheimer <[email protected]>2025-01-09 12:32:34 +0000
commitcaf22e481d41d09d608cf1c94dfb740c419d81db (patch)
treeaee685cb829d16df101f6bcc345df52344e8e974 /src/gui/accessible
parent71d114588d9312e89195a32357ec402fc22b062e (diff)
Replace QPair/qMakePair with std::pair in qtbase/gui
Task-number: QTBUG-115841 Pick-to: 6.9 Change-Id: Iebd96760ff7b3d7674816553312ba8dc3229c86a Reviewed-by: Marc Mutz <[email protected]> Reviewed-by: Volker Hilsheimer <[email protected]>
Diffstat (limited to 'src/gui/accessible')
-rw-r--r--src/gui/accessible/linux/atspiadaptor.cpp2
-rw-r--r--src/gui/accessible/linux/qspi_struct_marshallers_p.h3
-rw-r--r--src/gui/accessible/linux/qspiapplicationadaptor.cpp8
-rw-r--r--src/gui/accessible/linux/qspiapplicationadaptor_p.h2
-rw-r--r--src/gui/accessible/qaccessible.cpp2
-rw-r--r--src/gui/accessible/qaccessiblecache.cpp2
6 files changed, 9 insertions, 10 deletions
diff --git a/src/gui/accessible/linux/atspiadaptor.cpp b/src/gui/accessible/linux/atspiadaptor.cpp
index 194e3e61448..51df6727264 100644
--- a/src/gui/accessible/linux/atspiadaptor.cpp
+++ b/src/gui/accessible/linux/atspiadaptor.cpp
@@ -1707,7 +1707,7 @@ QStringList AtSpiAdaptor::accessibleInterfaces(QAccessibleInterface *interface)
QSpiRelationArray AtSpiAdaptor::relationSet(QAccessibleInterface *interface, const QDBusConnection &connection) const
{
- typedef QPair<QAccessibleInterface*, QAccessible::Relation> RelationPair;
+ typedef std::pair<QAccessibleInterface*, QAccessible::Relation> RelationPair;
const QList<RelationPair> relationInterfaces = interface->relations();
QSpiRelationArray relations;
diff --git a/src/gui/accessible/linux/qspi_struct_marshallers_p.h b/src/gui/accessible/linux/qspi_struct_marshallers_p.h
index 4338b49dd25..1a8ba63b8a8 100644
--- a/src/gui/accessible/linux/qspi_struct_marshallers_p.h
+++ b/src/gui/accessible/linux/qspi_struct_marshallers_p.h
@@ -18,7 +18,6 @@
#include <QtGui/private/qtguiglobal_p.h>
#include <QtCore/qlist.h>
-#include <QtCore/qpair.h>
#include <QtDBus/QDBusArgument>
#include <QtDBus/QDBusConnection>
#include <QtDBus/QDBusObjectPath>
@@ -92,7 +91,7 @@ typedef QList<QSpiEventListener> QSpiEventListenerArray;
QDBusArgument &operator<<(QDBusArgument &argument, const QSpiEventListener &action);
const QDBusArgument &operator>>(const QDBusArgument &argument, QSpiEventListener &action);
-typedef QPair<unsigned int, QSpiObjectReferenceArray> QSpiRelationArrayEntry;
+typedef std::pair<unsigned int, QSpiObjectReferenceArray> QSpiRelationArrayEntry;
typedef QList<QSpiRelationArrayEntry> QSpiRelationArray;
//a(iisv)
diff --git a/src/gui/accessible/linux/qspiapplicationadaptor.cpp b/src/gui/accessible/linux/qspiapplicationadaptor.cpp
index 649278bac5f..c3593b9f060 100644
--- a/src/gui/accessible/linux/qspiapplicationadaptor.cpp
+++ b/src/gui/accessible/linux/qspiapplicationadaptor.cpp
@@ -162,7 +162,7 @@ bool QSpiApplicationAdaptor::eventFilter(QObject *target, QEvent *event)
SLOT(notifyKeyboardListenerError(QDBusError,QDBusMessage)), timeout);
if (sent) {
//queue the event and send it after callback
- keyEvents.enqueue(QPair<QPointer<QObject>, QKeyEvent*> (QPointer<QObject>(target), copyKeyEvent(keyEvent)));
+ keyEvents.enqueue(std::pair{QPointer<QObject>(target), copyKeyEvent(keyEvent)});
return true;
}
break;
@@ -188,10 +188,10 @@ void QSpiApplicationAdaptor::notifyKeyboardListenerCallback(const QDBusMessage&
}
Q_ASSERT(message.arguments().size() == 1);
if (message.arguments().at(0).toBool() == true) {
- QPair<QPointer<QObject>, QKeyEvent*> event = keyEvents.dequeue();
+ std::pair<QPointer<QObject>, QKeyEvent*> event = keyEvents.dequeue();
delete event.second;
} else {
- QPair<QPointer<QObject>, QKeyEvent*> event = keyEvents.dequeue();
+ std::pair<QPointer<QObject>, QKeyEvent*> event = keyEvents.dequeue();
if (event.first)
QCoreApplication::postEvent(event.first.data(), event.second);
}
@@ -201,7 +201,7 @@ void QSpiApplicationAdaptor::notifyKeyboardListenerError(const QDBusError& error
{
qWarning() << "QSpiApplication::keyEventError " << error.name() << error.message();
while (!keyEvents.isEmpty()) {
- QPair<QPointer<QObject>, QKeyEvent*> event = keyEvents.dequeue();
+ std::pair<QPointer<QObject>, QKeyEvent*> event = keyEvents.dequeue();
if (event.first)
QCoreApplication::postEvent(event.first.data(), event.second);
}
diff --git a/src/gui/accessible/linux/qspiapplicationadaptor_p.h b/src/gui/accessible/linux/qspiapplicationadaptor_p.h
index b8529513856..f7e543c1327 100644
--- a/src/gui/accessible/linux/qspiapplicationadaptor_p.h
+++ b/src/gui/accessible/linux/qspiapplicationadaptor_p.h
@@ -53,7 +53,7 @@ private Q_SLOTS:
private:
static QKeyEvent* copyKeyEvent(QKeyEvent*);
- QQueue<QPair<QPointer<QObject>, QKeyEvent*> > keyEvents;
+ QQueue<std::pair<QPointer<QObject>, QKeyEvent*> > keyEvents;
QDBusConnection dbusConnection;
};
diff --git a/src/gui/accessible/qaccessible.cpp b/src/gui/accessible/qaccessible.cpp
index 0ff9ee8afd0..e1d62c34a0b 100644
--- a/src/gui/accessible/qaccessible.cpp
+++ b/src/gui/accessible/qaccessible.cpp
@@ -362,7 +362,7 @@ Q_STATIC_LOGGING_CATEGORY(lcAccessibilityCore, "qt.accessibility.core");
interfaces of the calling object, together with the relations
for each object.
- Each entry in the list is a QPair where the \c second member stores
+ Each entry in the list is a std::pair where the \c second member stores
the relation type(s) between the \c returned object represented by the
\c first member and the \c origin (the caller) interface/object.
diff --git a/src/gui/accessible/qaccessiblecache.cpp b/src/gui/accessible/qaccessiblecache.cpp
index c86baaa15b0..1508617a39b 100644
--- a/src/gui/accessible/qaccessiblecache.cpp
+++ b/src/gui/accessible/qaccessiblecache.cpp
@@ -116,7 +116,7 @@ QAccessible::Id QAccessibleCache::insert(QObject *object, QAccessibleInterface *
QObject *obj = iface->object();
Q_ASSERT(object == obj);
if (obj) {
- objectToId.insert(obj, qMakePair(id, obj->metaObject()));
+ objectToId.insert(obj, std::pair(id, obj->metaObject()));
connect(obj, &QObject::destroyed, this, &QAccessibleCache::objectDestroyed);
}
idToInterface.insert(id, iface);