Skip to content

Commit ecb6111

Browse files
Tuomas VaaralaQt Cherry-pick Bot
authored andcommitted
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 <[email protected]> (cherry picked from commit 1e10ede) Reviewed-by: Qt Cherry-pick Bot <[email protected]> (cherry picked from commit a65a730)
1 parent 3a1a3a3 commit ecb6111

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -709,7 +709,7 @@ void QQnxScreenEventHandler::handlePropertyEvent(screen_event_t event)
709709
errno = 0;
710710
int property;
711711
if (Q_UNLIKELY(screen_get_event_property_iv(event, SCREEN_PROPERTY_NAME, &property) != 0))
712-
qFatal("QQnx: failed to query window property, errno=%d", errno);
712+
qWarning("QQnx: failed to query window property, errno=%d", errno);
713713

714714
switch (property) {
715715
case SCREEN_PROPERTY_FOCUS:
@@ -730,7 +730,7 @@ void QQnxScreenEventHandler::handleKeyboardFocusPropertyEvent(screen_window_t wi
730730
errno = 0;
731731
int focus = 0;
732732
if (Q_UNLIKELY(window && screen_get_window_property_iv(window, SCREEN_PROPERTY_FOCUS, &focus) != 0))
733-
qFatal("QQnx: failed to query keyboard focus property, errno=%d", errno);
733+
qWarning("QQnx: failed to query keyboard focus property, errno=%d", errno);
734734

735735
QWindow *focusWindow = QQnxIntegration::instance()->window(window);
736736

@@ -749,12 +749,14 @@ void QQnxScreenEventHandler::handleGeometryPropertyEvent(screen_window_t window)
749749
{
750750
int pos[2];
751751
if (screen_get_window_property_iv(window, SCREEN_PROPERTY_POSITION, pos) != 0) {
752-
qFatal("QQnx: failed to query window property, errno=%d", errno);
752+
qWarning("QQnx: failed to query window property, errno=%d", errno);
753+
return;
753754
}
754755

755756
int size[2];
756757
if (screen_get_window_property_iv(window, SCREEN_PROPERTY_SIZE, size) != 0) {
757-
qFatal("QQnx: failed to query window property, errno=%d", errno);
758+
qWarning("QQnx: failed to query window property, errno=%d", errno);
759+
return;
758760
}
759761

760762
QRect rect(pos[0], pos[1], size[0], size[1]);

0 commit comments

Comments
 (0)