QtTest: code tidies: use the 4-arg connect overload
The 3-arg connect is error-prone and makes the lifetime of the connection unclear. Change-Id: I51f9bd87caa9baa57d06c8f3fd9ed8b37ef49cae Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
This commit is contained in:
parent
844009f8e0
commit
c87cbc38f1
@ -150,8 +150,8 @@ private:
|
|||||||
static void updateHandler(QAccessibleEvent *event)
|
static void updateHandler(QAccessibleEvent *event)
|
||||||
{
|
{
|
||||||
auto ev = copyEvent(event);
|
auto ev = copyEvent(event);
|
||||||
if (ev->object()) {
|
if (auto obj = ev->object()) {
|
||||||
QObject::connect(ev->object(), &QObject::destroyed, [&, ev](){
|
QObject::connect(obj, &QObject::destroyed, obj, [&, ev](){
|
||||||
auto index= eventList().indexOf(ev);
|
auto index= eventList().indexOf(ev);
|
||||||
if (index == -1)
|
if (index == -1)
|
||||||
return;
|
return;
|
||||||
|
Loading…
Reference in New Issue
Block a user