diff --git a/src/corelib/kernel/qcoreevent.cpp b/src/corelib/kernel/qcoreevent.cpp index 1e6b328c757..58ca8279ea6 100644 --- a/src/corelib/kernel/qcoreevent.cpp +++ b/src/corelib/kernel/qcoreevent.cpp @@ -194,7 +194,7 @@ QT_BEGIN_NAMESPACE \omitvalue Pointer \value Polish The widget is polished. \value PolishRequest The widget should be polished. - \value QueryWhatsThis The widget should accept the event if it has "What's This?" help. + \value QueryWhatsThis The widget should accept the event if it has "What's This?" help (QHelpEvent). \value ReadOnlyChange Widget's read-only state has changed (since Qt 5.4). \value RequestSoftwareInputPanel A widget wants to open a software input panel (SIP). \value Resize Widget's size changed (QResizeEvent). diff --git a/src/gui/painting/qpaintengine_raster.cpp b/src/gui/painting/qpaintengine_raster.cpp index 0e3163eefbc..f7578a3c575 100644 --- a/src/gui/painting/qpaintengine_raster.cpp +++ b/src/gui/painting/qpaintengine_raster.cpp @@ -641,6 +641,7 @@ QRasterPaintEngineState::QRasterPaintEngineState() txscale = 1.; flags.fast_pen = true; + flags.non_complex_pen = false; flags.antialiased = false; flags.bilinear = false; flags.legacy_rounding = false; diff --git a/src/network/kernel/qnetworkinterface.cpp b/src/network/kernel/qnetworkinterface.cpp index 70674e9adf5..75a26848a68 100644 --- a/src/network/kernel/qnetworkinterface.cpp +++ b/src/network/kernel/qnetworkinterface.cpp @@ -706,7 +706,7 @@ int QNetworkInterface::index() const \sa QUdpSocket */ -int QNetworkInterface::maxTransmissionUnit() const +int QNetworkInterface::maximumTransmissionUnit() const { return d ? d->mtu : 0; } diff --git a/src/network/kernel/qnetworkinterface.h b/src/network/kernel/qnetworkinterface.h index f7ef192dc04..148fd5e10d6 100644 --- a/src/network/kernel/qnetworkinterface.h +++ b/src/network/kernel/qnetworkinterface.h @@ -153,7 +153,7 @@ public: bool isValid() const; int index() const; - int maxTransmissionUnit() const; + int maximumTransmissionUnit() const; QString name() const; QString humanReadableName() const; InterfaceFlags flags() const; diff --git a/src/plugins/platforms/windows/qwindowsglcontext.cpp b/src/plugins/platforms/windows/qwindowsglcontext.cpp index 4bdf3167e42..e9c52e2c02b 100644 --- a/src/plugins/platforms/windows/qwindowsglcontext.cpp +++ b/src/plugins/platforms/windows/qwindowsglcontext.cpp @@ -391,6 +391,15 @@ static PIXELFORMATDESCRIPTOR pfd.dwFlags |= PFD_DOUBLEBUFFER; pfd.cDepthBits = format.depthBufferSize() >= 0 ? format.depthBufferSize() : 32; + const int redBufferSize = format.redBufferSize(); + if (redBufferSize != -1) + pfd.cRedBits = BYTE(redBufferSize); + const int greenBufferSize = format.greenBufferSize(); + if (greenBufferSize != -1) + pfd.cGreenBits = BYTE(greenBufferSize); + const int blueBufferSize = format.blueBufferSize(); + if (blueBufferSize != -1) + pfd.cBlueBits = BYTE(blueBufferSize); pfd.cAlphaBits = format.alphaBufferSize() > 0 ? format.alphaBufferSize() : 8; pfd.cStencilBits = format.stencilBufferSize() > 0 ? format.stencilBufferSize() : 8; if (additional.formatFlags & QWindowsGLAccumBuffer) diff --git a/src/plugins/platforms/windows/qwindowstabletsupport.cpp b/src/plugins/platforms/windows/qwindowstabletsupport.cpp index 78e33e57ab4..dcad23e4463 100644 --- a/src/plugins/platforms/windows/qwindowstabletsupport.cpp +++ b/src/plugins/platforms/windows/qwindowstabletsupport.cpp @@ -111,6 +111,61 @@ inline QPointF QWindowsTabletDeviceData::scaleCoordinates(int coordX, int coordY return QPointF(x, y); } +template +static void formatOptions(Stream &str, unsigned options) +{ + if (options & CXO_SYSTEM) + str << " CXO_SYSTEM"; + if (options & CXO_PEN) + str << " CXO_PEN"; + if (options & CXO_MESSAGES) + str << " CXO_MESSAGES"; + if (options & CXO_MARGIN) + str << " CXO_MARGIN"; + if (options & CXO_MGNINSIDE) + str << " CXO_MGNINSIDE"; + if (options & CXO_CSRMESSAGES) + str << " CXO_CSRMESSAGES"; +} + +#ifndef QT_NO_DEBUG_STREAM +QDebug operator<<(QDebug d, const QWindowsTabletDeviceData &t) +{ + QDebugStateSaver saver(d); + d.nospace(); + d << "TabletDevice id:" << t.uniqueId << " pressure: " << t.minPressure + << ".." << t.maxPressure << " tan pressure: " << t.minTanPressure << ".." + << t.maxTanPressure << " area:" << t.minX << t.minY <" << TabletPacketQSize; + << "->" << TabletPacketQSize << "\nobtained: " << lcMine; return new QWindowsTabletSupport(window, context); } @@ -238,17 +295,23 @@ QString QWindowsTabletSupport::description() const WORD specificationVersion = 0; m_winTab32DLL.wTInfo(WTI_INTERFACE, IFC_SPECVERSION, &specificationVersion); const unsigned opts = options(); - QString result = QString::fromLatin1("%1 specification: v%2.%3 implementation: v%4.%5 options: 0x%6") - .arg(QString::fromWCharArray(winTabId.data())) - .arg(specificationVersion >> 8).arg(specificationVersion & 0xFF) - .arg(implementationVersion >> 8).arg(implementationVersion & 0xFF) - .arg(opts, 0, 16); - if (opts & CXO_MESSAGES) - result += QLatin1String(" CXO_MESSAGES"); - if (opts & CXO_CSRMESSAGES) - result += QLatin1String(" CXO_CSRMESSAGES"); + WORD devices = 0; + m_winTab32DLL.wTInfo(WTI_INTERFACE, IFC_NDEVICES, &devices); + WORD cursors = 0; + m_winTab32DLL.wTInfo(WTI_INTERFACE, IFC_NCURSORS, &cursors); + WORD extensions = 0; + m_winTab32DLL.wTInfo(WTI_INTERFACE, IFC_NEXTENSIONS, &extensions); + QString result; + QTextStream str(&result); + str << '"' << QString::fromWCharArray(winTabId.data()) + << "\" specification: v" << (specificationVersion >> 8) + << '.' << (specificationVersion & 0xFF) << " implementation: v" + << (implementationVersion >> 8) << '.' << (implementationVersion & 0xFF) + << ' ' << devices << " device(s), " << cursors << " cursor(s), " + << extensions << " extensions" << ", options: 0x" << hex << opts << dec; + formatOptions(str, opts); if (m_tiltSupport) - result += QLatin1String(" tilt"); + str << " tilt"; return result; } @@ -306,20 +369,6 @@ static inline QTabletEvent::PointerType pointerType(unsigned currentCursor) return QTabletEvent::UnknownPointer; } -#ifndef QT_NO_DEBUG_STREAM -QDebug operator<<(QDebug d, const QWindowsTabletDeviceData &t) -{ - QDebugStateSaver saver(d); - d.nospace(); - d << "TabletDevice id:" << t.uniqueId << " pressure: " << t.minPressure - << ".." << t.maxPressure << " tan pressure: " << t.minTanPressure << ".." - << t.maxTanPressure << " area:" << t.minX << t.minY <isAmbiguous()) - qWarning("QAction::eventFilter: Ambiguous shortcut overload: %s", se->key().toString(QKeySequence::NativeText).toLatin1().constData()); + qWarning("QAction::event: Ambiguous shortcut overload: %s", se->key().toString(QKeySequence::NativeText).toLatin1().constData()); else activate(Trigger); return true; diff --git a/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp b/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp index 0b4ed4870dc..b73ed8eaec4 100644 --- a/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp +++ b/tests/auto/network/kernel/qnetworkinterface/tst_qnetworkinterface.cpp @@ -143,7 +143,7 @@ void tst_QNetworkInterface::dump() qDebug() << " flags: " << qPrintable(flags); qDebug() << " type: " << i.type(); qDebug() << " hw address:" << qPrintable(i.hardwareAddress()); - qDebug() << " MTU: " << i.maxTransmissionUnit(); + qDebug() << " MTU: " << i.maximumTransmissionUnit(); int count = 0; foreach (const QNetworkAddressEntry &e, i.addressEntries()) { @@ -187,7 +187,7 @@ void tst_QNetworkInterface::consistencyCheck() if (iface.index()) interfaceIndexes << iface.index(); - QVERIFY(iface.maxTransmissionUnit() >= 0); + QVERIFY(iface.maximumTransmissionUnit() >= 0); const QList addresses = iface.addressEntries(); for (auto entry : addresses) { @@ -275,7 +275,7 @@ void tst_QNetworkInterface::localAddress() << "pmtu" << pmtu; // check that the Path MTU is less than or equal the interface's MTU - QVERIFY(pmtu <= outgoingIface->maxTransmissionUnit()); + QVERIFY(pmtu <= outgoingIface->maximumTransmissionUnit()); } void tst_QNetworkInterface::interfaceFromXXX_data()