I'm writing test automation in QT. I'am using QTest::qWaitFor
to wait until the event loop switches to another tab in UI.
QTest::qWaitFor([tabs, ¤tIdx]() {
currentIdx = tabs->currentIndex();
return currentIdx == 1;
}, 5000);
Each time I'am using such construction following warning appears:
ignoring return value of function declared with 'warn_unused_result' attribute
I spent hours dealing with it but no result. I think the problem is the way functions consume returned values from lambda expressions. Is there any workaround?