diff options
Diffstat (limited to 'src/plugins/platforms/qnx')
11 files changed, 27 insertions, 28 deletions
diff --git a/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp b/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp index a08ac2b839..90a09d3087 100644 --- a/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp +++ b/src/plugins/platforms/qnx/qqnxbuttoneventnotifier.cpp @@ -97,7 +97,7 @@ void QQnxButtonEventNotifier::start() m_readNotifier = new QSocketNotifier(m_fd, QSocketNotifier::Read); QObject::connect(m_readNotifier, SIGNAL(activated(int)), this, SLOT(updateButtonStates())); - qButtonDebug() << "successfully connected to Navigator. fd =" << m_fd; + qButtonDebug("successfully connected to Navigator. fd = %d", m_fd); } void QQnxButtonEventNotifier::updateButtonStates() @@ -121,7 +121,7 @@ void QQnxButtonEventNotifier::updateButtonStates() // Ensure data is null terminated buffer[bytes] = '\0'; - qButtonDebug() << "received PPS message:\n" << buffer; + qButtonDebug("received PPS message:\n%s", buffer); // Process received message QByteArray ppsData = QByteArray::fromRawData(buffer, bytes); diff --git a/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp b/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp index 79ff74b113..ce3a445d7c 100644 --- a/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp +++ b/src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp @@ -721,7 +721,7 @@ void QQnxInputContext::update(Qt::InputMethodQueries queries) initEvent(&caretEvent.event, sInputSession, EVENT_CARET, CARET_POS_CHANGED, sizeof(caretEvent)); caretEvent.old_pos = lastCaret; caretEvent.new_pos = m_caretPosition; - qInputContextDebug() << "ictrl_dispatch_event caret changed" << lastCaret << m_caretPosition; + qInputContextDebug("ictrl_dispatch_event caret changed %d %d", lastCaret, m_caretPosition); p_ictrl_dispatch_event(&caretEvent.event); } } @@ -914,7 +914,7 @@ bool QQnxInputContext::handleKeyboardEvent(int flags, int sym, int mod, int scan navigation_event_t navEvent; initEvent(&navEvent.event, sInputSession, EVENT_NAVIGATION, key, sizeof(navEvent)); navEvent.magnitude = 1; - qInputContextDebug() << "ictrl_dispatch_even navigation" << key; + qInputContextDebug("ictrl_dispatch_even navigation %d", key); p_ictrl_dispatch_event(&navEvent.event); } } else { @@ -927,7 +927,7 @@ bool QQnxInputContext::handleKeyboardEvent(int flags, int sym, int mod, int scan keyEvent.sequence_id = sequenceId; p_ictrl_dispatch_event(&keyEvent.event); - qInputContextDebug() << "ictrl_dispatch_even key" << key; + qInputContextDebug("ictrl_dispatch_even key %d", key); } return true; @@ -943,7 +943,7 @@ void QQnxInputContext::updateCursorPosition() QCoreApplication::sendEvent(input, &query); m_caretPosition = query.value(Qt::ImCursorPosition).toInt(); - qInputContextDebug() << m_caretPosition; + qInputContextDebug("%d", m_caretPosition); } void QQnxInputContext::endComposition() @@ -1116,7 +1116,7 @@ int32_t QQnxInputContext::processEvent(event_t *event) int flags = KEY_SYM_VALID | KEY_CAP_VALID; if (event->event_id == IMF_KEY_DOWN) flags |= KEY_DOWN; - qInputContextDebug() << "EVENT_KEY" << flags << keySym; + qInputContextDebug("EVENT_KEY %d %d", flags, keySym); QQnxScreenEventHandler::injectKeyboardEvent(flags, keySym, modifiers, 0, keyCap); result = 0; break; @@ -1156,7 +1156,7 @@ int32_t QQnxInputContext::onCommitText(spannable_string_t *text, int32_t new_cur int32_t QQnxInputContext::onDeleteSurroundingText(int32_t left_length, int32_t right_length) { - qInputContextDebug() << "L:" << left_length << " R:" << right_length; + qInputContextDebug("L: %d R: %d", int(left_length), int(right_length)); QObject *input = qGuiApp->focusObject(); if (!input) diff --git a/src/plugins/platforms/qnx/qqnxintegration.cpp b/src/plugins/platforms/qnx/qqnxintegration.cpp index 3a0e97af6e..9d38742d6f 100644 --- a/src/plugins/platforms/qnx/qqnxintegration.cpp +++ b/src/plugins/platforms/qnx/qqnxintegration.cpp @@ -453,11 +453,11 @@ void QQnxIntegration::createDisplays() Q_SCREEN_CHECKERROR(result, "Failed to query display attachment"); if (!isAttached) { - qIntegrationDebug() << "Skipping non-attached display" << i; + qIntegrationDebug("Skipping non-attached display %d", i); continue; } - qIntegrationDebug() << "Creating screen for display" << i; + qIntegrationDebug("Creating screen for display %d", i); createDisplay(displays[i], /*isPrimary=*/false); } // of displays iteration } diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp index 4955938a3a..0e16764b79 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatoreventhandler.cpp @@ -63,14 +63,14 @@ bool QQnxNavigatorEventHandler::handleOrientationCheck(int angle) { // reply to navigator that (any) orientation is acceptable // TODO: check if top window flags prohibit orientation change - qNavigatorEventHandlerDebug() << "angle=" << angle; + qNavigatorEventHandlerDebug("angle=%d", angle); return true; } void QQnxNavigatorEventHandler::handleOrientationChange(int angle) { // update screen geometry and reply to navigator that we're ready - qNavigatorEventHandlerDebug() << "angle=" << angle; + qNavigatorEventHandlerDebug("angle=%d", angle); emit rotationChanged(angle); } diff --git a/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp b/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp index 9ccda2d94a..1f630863b7 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatoreventnotifier.cpp @@ -91,8 +91,7 @@ void QQnxNavigatorEventNotifier::start() errno = 0; m_fd = open(navigatorControlPath, O_RDWR); if (m_fd == -1) { - qNavigatorEventNotifierDebug() << "failed to open navigator pps:" - << strerror(errno); + qNavigatorEventNotifierDebug("failed to open navigator pps: %s", strerror(errno)); return; } diff --git a/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp b/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp index fd1bbc4a85..d5234ca92f 100644 --- a/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp +++ b/src/plugins/platforms/qnx/qqnxnavigatorpps.cpp @@ -79,7 +79,7 @@ bool QQnxNavigatorPps::openPpsConnection() return false; } - qNavigatorDebug() << "successfully connected to Navigator. fd=" << m_fd; + qNavigatorDebug("successfully connected to Navigator. fd=%d", m_fd); return true; } diff --git a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp index c9a89def41..a758bdf7f4 100644 --- a/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp +++ b/src/plugins/platforms/qnx/qqnxrasterbackingstore.cpp @@ -139,7 +139,7 @@ void QQnxRasterBackingStore::beginPaint(const QRegion ®ion) platformWindow()->adjustBufferSize(); if (window()->requestedFormat().alphaBufferSize() > 0) { - foreach (const QRect &r, region.rects()) { + for (const QRect &r : region) { // Clear transparent regions const int bg[] = { SCREEN_BLIT_COLOR, 0x00000000, diff --git a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp index 0fe80d856d..b075690e3d 100644 --- a/src/plugins/platforms/qnx/qqnxrasterwindow.cpp +++ b/src/plugins/platforms/qnx/qqnxrasterwindow.cpp @@ -208,10 +208,9 @@ void QQnxRasterWindow::blitPreviousToCurrent(const QRegion ®ion, int dx, int QQnxBuffer &previousBuffer = m_buffers[m_previousBufferIndex]; // Break down region into non-overlapping rectangles - const QVector<QRect> rects = region.rects(); - for (int i = rects.size() - 1; i >= 0; i--) { + for (auto rit = region.rbegin(), rend = region.rend(); rit != rend; ++rit) { // Clip rectangle to bounds of target - const QRect rect = rects[i].intersected(currentBuffer.rect()); + const QRect rect = rit->intersected(currentBuffer.rect()); if (rect.isEmpty()) continue; diff --git a/src/plugins/platforms/qnx/qqnxscreen.cpp b/src/plugins/platforms/qnx/qqnxscreen.cpp index 16ddcd784b..678e83cd57 100644 --- a/src/plugins/platforms/qnx/qqnxscreen.cpp +++ b/src/plugins/platforms/qnx/qqnxscreen.cpp @@ -340,11 +340,12 @@ qreal QQnxScreen::refreshRate() const qWarning("QQnxScreen: Failed to query screen mode. Using default value of 60Hz"); return 60.0; } - qScreenDebug() << "screen mode:" << endl - << " width =" << displayMode.width << endl - << " height =" << displayMode.height << endl - << " refresh =" << displayMode.refresh << endl - << " interlaced =" << displayMode.interlaced; + qScreenDebug("screen mode:\n" + " width = %u\n" + " height = %u\n" + " refresh = %u\n" + " interlaced = %u", + uint(displayMode.width), uint(displayMode.height), uint(displayMode.refresh), uint(displayMode.interlaced)); return static_cast<qreal>(displayMode.refresh); } @@ -404,7 +405,7 @@ static bool isOrthogonal(int angle1, int angle2) void QQnxScreen::setRotation(int rotation) { - qScreenDebug() << "orientation =" << rotation; + qScreenDebug("orientation = %d", rotation); // Check if rotation changed // We only want to rotate if we are the primary screen if (m_currentRotation != rotation && isPrimaryScreen()) { diff --git a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp index 599d43a8c8..42651732c2 100644 --- a/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp +++ b/src/plugins/platforms/qnx/qqnxscreeneventhandler.cpp @@ -147,7 +147,7 @@ bool QQnxScreenEventHandler::handleEvent(screen_event_t event, int qnxType) default: // event ignored - qScreenEventDebug() << "unknown event" << qnxType; + qScreenEventDebug("unknown event %d", qnxType); return false; } diff --git a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp index 1174dc6ab3..025c03c058 100644 --- a/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp +++ b/src/plugins/platforms/qnx/qqnxvirtualkeyboardpps.cpp @@ -164,7 +164,7 @@ void QQnxVirtualKeyboardPps::ppsDataReady() { ssize_t nread = qt_safe_read(m_fd, m_buffer, ms_bufferSize - 1); - qVirtualKeyboardDebug() << "keyboardMessage size: " << nread; + qVirtualKeyboardDebug("keyboardMessage size: %zd", nread); if (nread < 0){ connect(); // reconnect return; @@ -230,7 +230,7 @@ void QQnxVirtualKeyboardPps::handleKeyboardInfoMessage() } setHeight(newHeight); - qVirtualKeyboardDebug() << "size=" << newHeight; + qVirtualKeyboardDebug("size=%d", newHeight); } bool QQnxVirtualKeyboardPps::showKeyboard() |