summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/qnx
diff options
context:
space:
mode:
authorBernd Weimer <bweimer@blackberry.com>2014-05-06 10:40:03 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-13 08:42:46 +0200
commit8094bb537ac87d477b04b6d486653983c8423e02 (patch)
tree219f3366fda79efe4c6764018c1ce81ed748dd81 /src/plugins/platforms/qnx
parentd075df993c078478e2eb8ff909dfe63ae1b2a6d7 (diff)
QNX: Silence startup warnings
Missing PPS objects for navigator, virtual keyboard and buttons can be expected on QNX and should not lead to warnings. Virtual keyboard info message does not contain locale object any more. Change-Id: I447d439ffbf4ea6e03f6a8bca4422a9a121d85f4 Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com> Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Diffstat (limited to 'src/plugins/platforms/qnx')
-rw-r--r--src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp2
-rw-r--r--src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp3
-rw-r--r--src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp30
3 files changed, 10 insertions, 25 deletions
diff --git a/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp b/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp
index 2f531efd8b..d3f843ac39 100644
--- a/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp
+++ b/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp
@@ -90,7 +90,9 @@ void QQnxButtonEventNotifier::start()
errno = 0;
m_fd = qt_safe_open(ppsPath, O_RDONLY);
if (m_fd == -1) {
+#if defined(Q_OS_BLACKBERRY) || defined (QQNXBUTTON_DEBUG)
qWarning("QQNX: failed to open buttons pps, errno=%d", errno);
+#endif
return;
}
diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp b/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp
index 640944fb45..8c8f1b2afe 100644
--- a/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp
+++ b/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp
@@ -93,7 +93,8 @@ void QQnxNavigatorEventNotifier::start()
errno = 0;
m_fd = open(navigatorControlPath, O_RDWR);
if (m_fd == -1) {
- qWarning("QQNX: failed to open navigator pps, errno=%d", errno);
+ qNavigatorEventNotifierDebug() << Q_FUNC_INFO << ": failed to open navigator pps:"
+ << strerror(errno);
return;
}
diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp
index 2b6ee3d1dc..78180ec4a7 100644
--- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp
+++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp
@@ -128,15 +128,16 @@ bool QQnxVirtualKeyboardPps::connect()
m_fd = ::open(ms_PPSPath, O_RDWR);
if (m_fd == -1)
{
- qCritical("QQnxVirtualKeyboard: Unable to open \"%s\" for keyboard: %s (%d).",
- ms_PPSPath, strerror(errno), errno);
+ qVirtualKeyboardDebug() << Q_FUNC_INFO << ": Unable to open" << ms_PPSPath
+ << ":" << strerror(errno);
close();
return false;
}
m_buffer = new char[ms_bufferSize];
if (!m_buffer) {
- qCritical("QQnxVirtualKeyboard: Unable to allocate buffer of %d bytes. Size is unavailable.", ms_bufferSize);
+ qCritical("QQnxVirtualKeyboard: Unable to allocate buffer of %d bytes. "
+ "Size is unavailable.", ms_bufferSize);
return false;
}
@@ -156,7 +157,7 @@ bool QQnxVirtualKeyboardPps::queryPPSInfo()
// Request info, requires id to regenerate res message.
pps_encoder_add_string(m_encoder, "msg", "info");
- pps_encoder_add_string(m_encoder, "id", "libWebView");
+ pps_encoder_add_string(m_encoder, "id", "1");
return writeCurrentPPSEncoder();
}
@@ -220,7 +221,6 @@ void QQnxVirtualKeyboardPps::ppsDataReady()
void QQnxVirtualKeyboardPps::handleKeyboardInfoMessage()
{
int newHeight = 0;
- const char *value;
if (pps_decoder_push(m_decoder, "dat") != PPS_DECODER_OK) {
qCritical("QQnxVirtualKeyboard: Keyboard PPS dat object not found");
@@ -230,27 +230,9 @@ void QQnxVirtualKeyboardPps::handleKeyboardInfoMessage()
qCritical("QQnxVirtualKeyboard: Keyboard PPS size field not found");
return;
}
- if (pps_decoder_push(m_decoder, "locale") != PPS_DECODER_OK) {
- qCritical("QQnxVirtualKeyboard: Keyboard PPS locale object not found");
- return;
- }
- if (pps_decoder_get_string(m_decoder, "languageId", &value) != PPS_DECODER_OK) {
- qCritical("QQnxVirtualKeyboard: Keyboard PPS languageId field not found");
- return;
- }
- const QString languageId = QString::fromLatin1(value);
- if (pps_decoder_get_string(m_decoder, "countryId", &value) != PPS_DECODER_OK) {
- qCritical("QQnxVirtualKeyboard: Keyboard PPS size countryId not found");
- return;
- }
- const QString countryId = QString::fromLatin1(value);
-
setHeight(newHeight);
- const QLocale locale = QLocale(languageId + QLatin1Char('_') + countryId);
- setLocale(locale);
-
- qVirtualKeyboardDebug() << Q_FUNC_INFO << "size=" << newHeight << "locale=" << locale;
+ qVirtualKeyboardDebug() << Q_FUNC_INFO << "size=" << newHeight;
}
bool QQnxVirtualKeyboardPps::showKeyboard()