Replace qFatal() statements with qWarning() in case of failed queries
In some cases the QNX events can be stale ie. referring to a window object that is already destroyed. This is not necessarily a fatal condition, but there are some qFatal() statements in this case which could be removed. Fixes: QTBUG-135076 Pick-to: 6.5 5.15 Change-Id: I885fa95c323590a814176b8a70ef5b7ee332012c Reviewed-by: James McDonnell <jmcdonnell@blackberry.com> (cherry picked from commit 1e10ede244b70455201df1c459b9586f3c015552) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org> (cherry picked from commit a65a730ebfdc82e6d3750c0fcd037231849daec6)
This commit is contained in:
parent
3a1a3a38ae
commit
ecb6111080
@ -709,7 +709,7 @@ void QQnxScreenEventHandler::handlePropertyEvent(screen_event_t event)
|
|||||||
errno = 0;
|
errno = 0;
|
||||||
int property;
|
int property;
|
||||||
if (Q_UNLIKELY(screen_get_event_property_iv(event, SCREEN_PROPERTY_NAME, &property) != 0))
|
if (Q_UNLIKELY(screen_get_event_property_iv(event, SCREEN_PROPERTY_NAME, &property) != 0))
|
||||||
qFatal("QQnx: failed to query window property, errno=%d", errno);
|
qWarning("QQnx: failed to query window property, errno=%d", errno);
|
||||||
|
|
||||||
switch (property) {
|
switch (property) {
|
||||||
case SCREEN_PROPERTY_FOCUS:
|
case SCREEN_PROPERTY_FOCUS:
|
||||||
@ -730,7 +730,7 @@ void QQnxScreenEventHandler::handleKeyboardFocusPropertyEvent(screen_window_t wi
|
|||||||
errno = 0;
|
errno = 0;
|
||||||
int focus = 0;
|
int focus = 0;
|
||||||
if (Q_UNLIKELY(window && screen_get_window_property_iv(window, SCREEN_PROPERTY_FOCUS, &focus) != 0))
|
if (Q_UNLIKELY(window && screen_get_window_property_iv(window, SCREEN_PROPERTY_FOCUS, &focus) != 0))
|
||||||
qFatal("QQnx: failed to query keyboard focus property, errno=%d", errno);
|
qWarning("QQnx: failed to query keyboard focus property, errno=%d", errno);
|
||||||
|
|
||||||
QWindow *focusWindow = QQnxIntegration::instance()->window(window);
|
QWindow *focusWindow = QQnxIntegration::instance()->window(window);
|
||||||
|
|
||||||
@ -749,12 +749,14 @@ void QQnxScreenEventHandler::handleGeometryPropertyEvent(screen_window_t window)
|
|||||||
{
|
{
|
||||||
int pos[2];
|
int pos[2];
|
||||||
if (screen_get_window_property_iv(window, SCREEN_PROPERTY_POSITION, pos) != 0) {
|
if (screen_get_window_property_iv(window, SCREEN_PROPERTY_POSITION, pos) != 0) {
|
||||||
qFatal("QQnx: failed to query window property, errno=%d", errno);
|
qWarning("QQnx: failed to query window property, errno=%d", errno);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
int size[2];
|
int size[2];
|
||||||
if (screen_get_window_property_iv(window, SCREEN_PROPERTY_SIZE, size) != 0) {
|
if (screen_get_window_property_iv(window, SCREEN_PROPERTY_SIZE, size) != 0) {
|
||||||
qFatal("QQnx: failed to query window property, errno=%d", errno);
|
qWarning("QQnx: failed to query window property, errno=%d", errno);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
QRect rect(pos[0], pos[1], size[0], size[1]);
|
QRect rect(pos[0], pos[1], size[0], size[1]);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user