Update the state before emitting, otherwise things could be not consistent
Details
Details
- Reviewers
davidedmundson - Group Reviewers
Frameworks - Commits
- R296:7dfdace2b445: Consistently emit MouseEventListener::pressed signal
Diff Detail
Diff Detail
- Repository
- R296 KDeclarative
- Lint
Automatic diff as part of commit; lint not applicable. - Unit
Automatic diff as part of commit; unit tests not applicable.
Comment Actions
connect(m_listener, &MEL::pressed, this, &ThisClass:blah); void ThisClass::blah() { if (m_listener->isPressed()) changeSomethingNowThatItsPressed(); }
The same reason why any setter sets the value before emitting.