Android notification example: Correct connect statements
The example breaks building 6.7 with examples on Android, due to QObject::connect() to a lambda without context object. Add context object. Fixes: QTBUG-123989 Pick-to: 6.7 6.6 6.5 6.2 Change-Id: Id3994e577a8a676220ac8d9f95d01c054839c143 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>bb10
parent
a07519f51f
commit
f54953a0ab
|
|
@ -41,11 +41,11 @@ int main(int argc, char *argv[])
|
|||
widget.setLayout(&mainLayout);
|
||||
|
||||
//! [Connect button signals]
|
||||
QObject::connect(&happyButton, &QPushButton::clicked, []() {
|
||||
QObject::connect(&happyButton, &QPushButton::clicked, &happyButton, []() {
|
||||
NotificationClient().setNotification("The user is happy!");
|
||||
});
|
||||
|
||||
QObject::connect(&sadButton, &QPushButton::clicked, []() {
|
||||
QObject::connect(&sadButton, &QPushButton::clicked, &happyButton, []() {
|
||||
NotificationClient().setNotification("The user is sad!");
|
||||
});
|
||||
//! [Connect button signals]
|
||||
|
|
|
|||
Loading…
Reference in New Issue