QNX: Do not crash if physical screen size is not set
If the QQNX_PHYSICAL_SCREEN_SIZE is not set or set incorrectly the application exits with a qFatal. This patch replaces the qFatal with a qWarning and sets the physical screen size to 15cm x 9cm. Change-Id: I9e1a36414289c9e9676ef550eac5c1d7be974553 Reviewed-by: Bernd Weimer <bweimer@blackberry.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>bb10
parent
ca85cc620e
commit
3e596ffa00
|
|
@ -97,9 +97,9 @@ static QSize determineScreenSize(screen_display_t display, bool primaryScreen) {
|
|||
const int envHeight = envPhySizeStrList.size() == 2 ? envPhySizeStrList[1].toInt() : -1;
|
||||
|
||||
if (envWidth <= 0 || envHeight <= 0) {
|
||||
qFatal("QQnxScreen: The value of QQNX_PHYSICAL_SCREEN_SIZE must be in the format "
|
||||
"\"width,height\" in mm, with width, height > 0. "
|
||||
"Example: QQNX_PHYSICAL_SCREEN_SIZE=150,90");
|
||||
qWarning("QQnxScreen: The value of QQNX_PHYSICAL_SCREEN_SIZE must be in the format "
|
||||
"\"width,height\" in mm, with width, height > 0. Defaulting to 150x90. "
|
||||
"Example: QQNX_PHYSICAL_SCREEN_SIZE=150,90");
|
||||
return QSize(150, 90);
|
||||
}
|
||||
|
||||
|
|
@ -114,8 +114,8 @@ static QSize determineScreenSize(screen_display_t display, bool primaryScreen) {
|
|||
return defSize;
|
||||
#else
|
||||
if (primaryScreen)
|
||||
qFatal("QQnxScreen: QQNX_PHYSICAL_SCREEN_SIZE variable not set. "
|
||||
"Could not determine physical screen size.");
|
||||
qWarning("QQnxScreen: QQNX_PHYSICAL_SCREEN_SIZE variable not set. "
|
||||
"Could not determine physical screen size. Defaulting to 150x90.");
|
||||
return QSize(150, 90);
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue