qt5base-lts/tests/auto/dbus
Ahmad Samir d50fd6acfa tst_qdbusconnection: iterate over member container directly
The loops don't change the m_connections container. The call chain is:
- registerObjectPeer() unittest constructs a MyServer, which connects
  QDBusServer::newConnection to MyServer::handleConnection(), the
  latter stores each new connection's name in m_connections
- An QTestEventLoop is entered, which triggers handleConnection(),
  handleConnection() calls exitLoop() at the bottom (this is repeated
  multiple times)
- server.unregisterObject() is called, iterating over m_connections
- server.registerObject() is called iterating over m_connections
- between the unregisterObject() call and the registerObject() calls
  m_connections is not modified AFAICS

Thus no need for taking a copy of m_connections (not that it matters
much, it's a QStringList with size() == 3).

Change-Id: Idaea2ca4d3b27fc88d39f8434e3817a2a4098c72
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2023-08-15 21:27:50 +03:00
..
qdbusabstractadaptor CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusabstractinterface CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusconnection tst_qdbusconnection: iterate over member container directly 2023-08-15 21:27:50 +03:00
qdbusconnection_delayed CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusconnection_no_app CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusconnection_no_bus CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusconnection_no_libdbus CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusconnection_signalorder CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusconnection_spyhook CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbuscontext CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusinterface CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbuslocalcalls CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusmarshall dbus test headers: port away from Q_FOREACH 2023-08-13 09:19:22 +03:00
qdbusmetaobject CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusmetatype Fix spelling of D-Bus in the source code 2023-07-06 21:51:29 +02:00
qdbuspendingcall CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbuspendingreply CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusreply CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusservicewatcher CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusthreading CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbustype CMake: Make qtbase tests standalone projects 2023-07-05 15:09:32 +02:00
qdbusxmlparser QDBusIntrospection: Add Annotation struct 2023-07-06 21:51:15 +02:00
CMakeLists.txt QDBusConnectionPrivate: Fix handling of queued messages 2023-05-11 19:58:12 +02:00