diff --git a/src/gui/kernel/qplatformclipboard_qpa.cpp b/src/gui/kernel/qplatformclipboard_qpa.cpp index 454ee56bfa..66693409d1 100644 --- a/src/gui/kernel/qplatformclipboard_qpa.cpp +++ b/src/gui/kernel/qplatformclipboard_qpa.cpp @@ -104,6 +104,7 @@ bool QPlatformClipboard::supportsMode(QClipboard::Mode mode) const bool QPlatformClipboard::ownsMode(QClipboard::Mode mode) const { + Q_UNUSED(mode); return false; } diff --git a/src/gui/painting/qpainter.cpp b/src/gui/painting/qpainter.cpp index e45d773169..75e7f8e79a 100644 --- a/src/gui/painting/qpainter.cpp +++ b/src/gui/painting/qpainter.cpp @@ -7420,8 +7420,9 @@ void QPainter::setRedirected(const QPaintDevice *device, const QPoint &offset) { Q_ASSERT(device != 0); - - qWarning() << "QPainter::setRedirected(): ignoring call to deprecated function, use QWidget::render() instead"; + Q_UNUSED(replacement) + Q_UNUSED(offset) + qWarning("QPainter::setRedirected(): ignoring call to deprecated function, use QWidget::render() instead"); } /*! @@ -7443,7 +7444,8 @@ void QPainter::setRedirected(const QPaintDevice *device, */ void QPainter::restoreRedirected(const QPaintDevice *device) { - qWarning() << "QPainter::restoreRedirected(): ignoring call to deprecated function, use QWidget::render() instead"; + Q_UNUSED(device) + qWarning("QPainter::restoreRedirected(): ignoring call to deprecated function, use QWidget::render() instead"); } /*! @@ -7465,6 +7467,8 @@ void QPainter::restoreRedirected(const QPaintDevice *device) */ QPaintDevice *QPainter::redirected(const QPaintDevice *device, QPoint *offset) { + Q_UNUSED(device) + Q_UNUSED(offset) return 0; } diff --git a/src/platformsupport/fontdatabases/basicunix/qbasicunixfontdatabase.cpp b/src/platformsupport/fontdatabases/basicunix/qbasicunixfontdatabase.cpp index ee4bf26bb0..8012f84797 100644 --- a/src/platformsupport/fontdatabases/basicunix/qbasicunixfontdatabase.cpp +++ b/src/platformsupport/fontdatabases/basicunix/qbasicunixfontdatabase.cpp @@ -308,6 +308,7 @@ QStringList QBasicUnixFontDatabase::fallbacksForFamily(const QString family, con Q_UNUSED(family); Q_UNUSED(style); Q_UNUSED(script); + Q_UNUSED(styleHint); return QStringList(); } diff --git a/src/platformsupport/inputmethods/ibus/qibusplatforminputcontext.cpp b/src/platformsupport/inputmethods/ibus/qibusplatforminputcontext.cpp index 4bfd41cf14..34838ff490 100644 --- a/src/platformsupport/inputmethods/ibus/qibusplatforminputcontext.cpp +++ b/src/platformsupport/inputmethods/ibus/qibusplatforminputcontext.cpp @@ -54,6 +54,8 @@ #include +enum { debug = 0 }; + class QIBusPlatformInputContextPrivate { public: @@ -127,7 +129,8 @@ void QIBusPlatformInputContext::update() QGuiApplication::sendEvent(o, &query); QRect r = query.value().toRect(); if(r.isValid()) { - qDebug() << "mocroFocus" << r; + if (debug) + qDebug() << "microFocus" << r; d->context->SetCursorLocation(r.x(), r.y(), r.width(), r.height()); } } @@ -139,7 +142,8 @@ void QIBusPlatformInputContext::setFocusObject(QObject *object) if (!d->valid) return; - qDebug() << "setFocusObject" << object; + if (debug) + qDebug() << "setFocusObject" << object; if (object) d->context->FocusIn(); else @@ -152,9 +156,11 @@ void QIBusPlatformInputContext::commitText(const QDBusVariant &text) const QDBusArgument arg = text.variant().value(); QIBusText t; - qDebug() << arg.currentSignature(); + if (debug) + qDebug() << arg.currentSignature(); t.fromDBusArgument(arg); - qDebug() << "commit text:" << t.text; + if (debug) + qDebug() << "commit text:" << t.text; QInputMethodEvent event; event.setCommitString(t.text); @@ -167,7 +173,8 @@ void QIBusPlatformInputContext::updatePreeditText(const QDBusVariant &text, uint QIBusText t; t.fromDBusArgument(arg); - qDebug() << "preedit text:" << t.text; + if (debug) + qDebug() << "preedit text:" << t.text; QList attributes = t.attributes.imAttributes(); attributes += QInputMethodEvent::Attribute(QInputMethodEvent::Cursor, cursorPos, visible ? 1 : 0, QVariant()); @@ -221,7 +228,7 @@ QIBusPlatformInputContextPrivate::QIBusPlatformInputContextPrivate() valid(false) { if (!connection || !connection->isConnected()) { - qDebug() << "not connected"; + qDebug("QIBusPlatformInputContext: not connected."); return; } @@ -229,20 +236,20 @@ QIBusPlatformInputContextPrivate::QIBusPlatformInputContextPrivate() QLatin1String("/org/freedesktop/IBus"), *connection); if (!bus->isValid()) { - qDebug() << "invalid bus"; + qWarning("QIBusPlatformInputContext: invalid bus."); return; } QDBusReply ic = bus->CreateInputContext(QLatin1String("QIBusInputContext")); if (!ic.isValid()) { - qDebug() << "CreateInputContext failed"; + qWarning("QIBusPlatformInputContext: CreateInputContext failed."); return; } context = new QIBusInputContextProxy(QLatin1String("org.freedesktop.IBus"), ic.value().path(), *connection); if (!context->isValid()) { - qDebug() << "invalid input context"; + qWarning("QIBusPlatformInputContext: invalid input context."); return; } @@ -252,11 +259,12 @@ QIBusPlatformInputContextPrivate::QIBusPlatformInputContextPrivate() IBUS_CAP_LOOKUP_TABLE = 1 << 2, IBUS_CAP_FOCUS = 1 << 3, IBUS_CAP_PROPERTY = 1 << 4, - IBUS_CAP_SURROUNDING_TEXT = 1 << 5, + IBUS_CAP_SURROUNDING_TEXT = 1 << 5 }; context->SetCapabilities(IBUS_CAP_PREEDIT_TEXT|IBUS_CAP_FOCUS); - qDebug() << ">>>> valid!"; + if (debug) + qDebug(">>>> valid!"); valid = true; } @@ -273,14 +281,15 @@ QDBusConnection *QIBusPlatformInputContextPrivate::createConnection() int pos2 = display.indexOf('.', pos); if (pos2 > 0) displayNumber = display.mid(pos, pos2 - pos); - qDebug() << "host=" << host << "displayNumber" << displayNumber; + if (debug) + qDebug() << "host=" << host << "displayNumber" << displayNumber; QFile file(QDir::homePath() + QLatin1String("/.config/ibus/bus/") + QLatin1String(QDBusConnection::localMachineId()) + QLatin1Char('-') + QString::fromLocal8Bit(host) + QLatin1Char('-') + QString::fromLocal8Bit(displayNumber)); if (!file.exists()) { - qDebug() << "ibus config file does not exist"; + qWarning("QIBusPlatformInputContext: ibus config file '%s' does not exist.", qPrintable(file.fileName())); return 0; } @@ -300,7 +309,8 @@ QDBusConnection *QIBusPlatformInputContextPrivate::createConnection() pid = line.mid(sizeof("IBUS_DAEMON_PID=") - 1).toInt(); } - qDebug() << "IBUS_ADDRESS=" << address << "PID=" << pid; + if (debug) + qDebug() << "IBUS_ADDRESS=" << address << "PID=" << pid; if (address.isEmpty() || pid < 0 || kill(pid, 0) != 0) return 0; diff --git a/src/plugins/platforms/xcb/qxcbwindow.cpp b/src/plugins/platforms/xcb/qxcbwindow.cpp index 7b7b23ce0c..1664065a7b 100644 --- a/src/plugins/platforms/xcb/qxcbwindow.cpp +++ b/src/plugins/platforms/xcb/qxcbwindow.cpp @@ -122,7 +122,6 @@ QXcbWindow::QXcbWindow(QWindow *window) void QXcbWindow::create() { - bool wasCreated = (m_window != 0); destroy(); m_windowState = Qt::WindowNoState;