Avoid a warning from the QNX QPA plugin.
The HDMI display on the Playbook is listed, but (normally) unattached, and hence generates an error if we attempt to register for events. This patch avoids the warning; a future change will actually watch for screens being attached / detached and update the QPlatformScreens and event registration correctly. Change-Id: I5a9cc773648d50f657fe1b3611fd42495ca7e836 Reviewed-by: Sean Harmer <sean.harmer@kdab.com> Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
This commit is contained in:
parent
a3963d8bbc
commit
9597e0d2a2
@ -100,6 +100,17 @@ void QQnxBpsEventFilter::registerForScreenEvents(QQnxScreen *screen)
|
||||
return;
|
||||
}
|
||||
|
||||
int attached;
|
||||
if (screen_get_display_property_iv(screen->nativeDisplay(), SCREEN_PROPERTY_ATTACHED, &attached) != BPS_SUCCESS) {
|
||||
qWarning() << "QQNX: unable to query display attachment";
|
||||
return;
|
||||
}
|
||||
|
||||
if (!attached) {
|
||||
qBpsEventFilterDebug() << "skipping event registration for non-attached screen";
|
||||
return;
|
||||
}
|
||||
|
||||
if (screen_request_events(screen->nativeContext()) != BPS_SUCCESS)
|
||||
qWarning("QQNX: failed to register for screen events on screen %p", screen->nativeContext());
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user