diff options
author | Sona Kurazyan <sona.kurazyan@qt.io> | 2021-02-25 14:40:51 +0100 |
---|---|---|
committer | Sona Kurazyan <sona.kurazyan@qt.io> | 2021-02-26 17:48:33 +0100 |
commit | 32b60c566f74c86ac51cd96ede41d85a0c95a298 (patch) | |
tree | 2df547627630b6e6a04d4e8956a7334efad43842 /src | |
parent | a1c28ab5317cdcbe15310ac11d07d4ffd0bec3f7 (diff) |
Migrate from old signal/slot connection syntax (part 2)
Change the syntax also for the connections that involve types that
are defined in the repc-generated files.
Pick-to: 5.15 5.12
Change-Id: I222a59c8fae438c5f0026e66a75d0fa905e49ccf
Reviewed-by: Michael Brasser <michael.brasser@live.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/remoteobjects/doc/snippets/doc_src_simpleswitch.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/remoteobjects/doc/snippets/doc_src_simpleswitch.cpp b/src/remoteobjects/doc/snippets/doc_src_simpleswitch.cpp index 0d2d199..f2f970a 100644 --- a/src/remoteobjects/doc/snippets/doc_src_simpleswitch.cpp +++ b/src/remoteobjects/doc/snippets/doc_src_simpleswitch.cpp @@ -200,12 +200,12 @@ Client::~Client() void Client::initConnections() { - // initialize connections between signals and slots + // initialize connections between signals and slots - // connect source replica signal currStateChanged(bool) with client's recSwitchState() slot to receive source's current state - QObject::connect(reptr.data(), SIGNAL(currStateChanged(bool)), this, SLOT(recSwitchState_slot(bool))); - // connect client's echoSwitchState(..) signal with replica's server_slot(..) to echo back received state - QObject::connect(this, SIGNAL(echoSwitchState(bool)),reptr.data(), SLOT(server_slot(bool))); + // connect source replica signal currStateChanged() with client's recSwitchState() slot to receive source's current state + QObject::connect(reptr.data(), &SimpleSwitchReplica::currStateChanged, this, &Client::recSwitchState_slot); + // connect client's echoSwitchState(..) signal with replica's server_slot(..) to echo back received state + QObject::connect(this, &Client::echoSwitchState, reptr.data(), &SimpleSwitchReplica::server_slot); } void Client::recSwitchState_slot(bool value) |