From 16988b9c065df20ad50541ffb6d87a17fe8d6e79 Mon Sep 17 00:00:00 2001 From: Rmys Date: Wed, 10 Nov 2021 14:29:44 +0300 Subject: [PATCH] qt5-base rebuild --- .../toolkit/qt5/qt5-base/files/qt_kde.patch | 1522 ++++++++++++++++- desktop/toolkit/qt5/qt5-base/pspec.xml | 2 +- .../qt5/qt5-declarative/files/qt_kde.patch | 968 ++++++++++- desktop/toolkit/qt5/qt5-declarative/pspec.xml | 2 +- .../toolkit/qt5/qt5-svg/files/qt_kde.patch | 213 ++- desktop/toolkit/qt5/qt5-svg/pspec.xml | 2 +- desktop/toolkit/qt5/qt5-tools/pspec.xml | 2 +- .../qt5/qt5-wayland/files/qt_kde.patch | 367 +++- desktop/toolkit/qt5/qt5-wayland/pspec.xml | 2 +- 9 files changed, 3009 insertions(+), 71 deletions(-) diff --git a/desktop/toolkit/qt5/qt5-base/files/qt_kde.patch b/desktop/toolkit/qt5/qt5-base/files/qt_kde.patch index ae1dc71d21..5cf68efdd9 100644 --- a/desktop/toolkit/qt5/qt5-base/files/qt_kde.patch +++ b/desktop/toolkit/qt5/qt5-base/files/qt_kde.patch @@ -62342,10 +62342,10 @@ index 9de22cef33..ff868a3268 100644 } diff --git a/src/corelib/mimetypes/qmimeglobpattern.cpp b/src/corelib/mimetypes/qmimeglobpattern.cpp -index 1016884437..943eb84b94 100644 +index 1016884437..3ab5bd4cb4 100644 --- a/src/corelib/mimetypes/qmimeglobpattern.cpp +++ b/src/corelib/mimetypes/qmimeglobpattern.cpp -@@ -83,7 +83,10 @@ void QMimeGlobMatchResult::addMatch(const QString &mimeType, int weight, const Q +@@ -83,11 +83,48 @@ void QMimeGlobMatchResult::addMatch(const QString &mimeType, int weight, const Q } if (!m_matchingMimeTypes.contains(mimeType)) { m_matchingMimeTypes.append(mimeType); @@ -62357,8 +62357,196 @@ index 1016884437..943eb84b94 100644 m_knownSuffixLength = knownSuffixLength; } } + ++QMimeGlobPattern::PatternType QMimeGlobPattern::detectPatternType(const QString &pattern) const ++{ ++ const int patternLength = pattern.length(); ++ if (!patternLength) ++ return OtherPattern; ++ ++ const bool starCount = pattern.count(QLatin1Char('*')) == 1; ++ const bool hasSquareBracket = pattern.indexOf(QLatin1Char('[')) != -1; ++ const bool hasQuestionMark = pattern.indexOf(QLatin1Char('?')) != -1; ++ ++ if (!hasSquareBracket && !hasQuestionMark) { ++ if (starCount == 1) { ++ // Patterns like "*~", "*.extension" ++ if (pattern.at(0) == QLatin1Char('*')) ++ return SuffixPattern; ++ // Patterns like "README*" (well this is currently the only one like that...) ++ if (pattern.at(patternLength - 1) == QLatin1Char('*')) ++ return PrefixPattern; ++ } ++ // Names without any wildcards like "README" ++ if (starCount == 0) ++ return LiteralPattern; ++ } ++ ++ if (pattern == QLatin1String("[0-9][0-9][0-9].vdr")) ++ return VdrPattern; ++ ++ if (pattern == QLatin1String("*.anim[1-9j]")) ++ return AnimPattern; ++ ++ return OtherPattern; ++} ++ ++ + /*! + \internal + \class QMimeGlobPattern +@@ -97,58 +134,66 @@ void QMimeGlobMatchResult::addMatch(const QString &mimeType, int weight, const Q + \sa QMimeType, QMimeDatabase, QMimeMagicRuleMatcher, QMimeMagicRule + */ + +-bool QMimeGlobPattern::matchFileName(const QString &inputFilename) const ++bool QMimeGlobPattern::matchFileName(const QString &inputFileName) const + { + // "Applications MUST match globs case-insensitively, except when the case-sensitive + // attribute is set to true." + // The constructor takes care of putting case-insensitive patterns in lowercase. +- const QString filename = m_caseSensitivity == Qt::CaseInsensitive ? inputFilename.toLower() : inputFilename; ++ const QString fileName = m_caseSensitivity == Qt::CaseInsensitive ++ ? inputFileName.toLower() : inputFileName; + +- const int pattern_len = m_pattern.length(); +- if (!pattern_len) ++ const int patternLength = m_pattern.length(); ++ if (!patternLength) + return false; +- const int len = filename.length(); +- +- const int starCount = m_pattern.count(QLatin1Char('*')); ++ const int fileNameLength = fileName.length(); + +- // Patterns like "*~", "*.extension" +- if (m_pattern[0] == QLatin1Char('*') && m_pattern.indexOf(QLatin1Char('[')) == -1 && starCount == 1) +- { +- if (len + 1 < pattern_len) return false; ++ switch (m_patternType) { ++ case SuffixPattern: { ++ if (fileNameLength + 1 < patternLength) ++ return false; + +- const QChar *c1 = m_pattern.unicode() + pattern_len - 1; +- const QChar *c2 = filename.unicode() + len - 1; ++ const QChar *c1 = m_pattern.unicode() + patternLength - 1; ++ const QChar *c2 = fileName.unicode() + fileNameLength - 1; + int cnt = 1; +- while (cnt < pattern_len && *c1-- == *c2--) ++ while (cnt < patternLength && *c1-- == *c2--) + ++cnt; +- return cnt == pattern_len; ++ return cnt == patternLength; + } +- +- // Patterns like "README*" (well this is currently the only one like that...) +- if (starCount == 1 && m_pattern.at(pattern_len - 1) == QLatin1Char('*')) { +- if (len + 1 < pattern_len) return false; +- if (m_pattern.at(0) == QLatin1Char('*')) +- return filename.indexOf(m_pattern.midRef(1, pattern_len - 2)) != -1; ++ case PrefixPattern: { ++ if (fileNameLength + 1 < patternLength) ++ return false; + + const QChar *c1 = m_pattern.unicode(); +- const QChar *c2 = filename.unicode(); ++ const QChar *c2 = fileName.unicode(); + int cnt = 1; +- while (cnt < pattern_len && *c1++ == *c2++) ++ while (cnt < patternLength && *c1++ == *c2++) + ++cnt; +- return cnt == pattern_len; ++ return cnt == patternLength; + } +- +- // Names without any wildcards like "README" +- if (m_pattern.indexOf(QLatin1Char('[')) == -1 && starCount == 0 && m_pattern.indexOf(QLatin1Char('?'))) +- return (m_pattern == filename); +- +- // Other (quite rare) patterns, like "*.anim[1-9j]": use slow but correct method ++ case LiteralPattern: ++ return (m_pattern == fileName); ++ case VdrPattern: // "[0-9][0-9][0-9].vdr" case ++ return fileNameLength == 7 ++ && fileName.at(0).isDigit() && fileName.at(1).isDigit() && fileName.at(2).isDigit() ++ && QStringView{fileName}.mid(3, 4) == QLatin1String(".vdr"); ++ case AnimPattern: { // "*.anim[1-9j]" case ++ if (fileNameLength < 6) ++ return false; ++ const QChar lastChar = fileName.at(fileNameLength - 1); ++ const bool lastCharOK = (lastChar.isDigit() && lastChar != QLatin1Char('0')) ++ || lastChar == QLatin1Char('j'); ++ return lastCharOK && QStringView{fileName}.mid(fileNameLength - 6, 5) == QLatin1String(".anim"); ++ } ++ case OtherPattern: ++ // Other fallback patterns: slow but correct method + #if QT_CONFIG(regularexpression) +- QRegularExpression rx(QRegularExpression::wildcardToRegularExpression(m_pattern)); +- return rx.match(filename).hasMatch(); ++ QRegularExpression rx(QRegularExpression::wildcardToRegularExpression(m_pattern)); ++ return rx.match(fileName).hasMatch(); + #else +- return false; ++ return false; + #endif ++ } ++ return false; + } + + static bool isSimplePattern(const QString &pattern) +diff --git a/src/corelib/mimetypes/qmimeglobpattern_p.h b/src/corelib/mimetypes/qmimeglobpattern_p.h +index 49f145e8db..88d032c787 100644 +--- a/src/corelib/mimetypes/qmimeglobpattern_p.h ++++ b/src/corelib/mimetypes/qmimeglobpattern_p.h +@@ -80,7 +80,10 @@ public: + + explicit QMimeGlobPattern(const QString &thePattern, const QString &theMimeType, unsigned theWeight = DefaultWeight, Qt::CaseSensitivity s = Qt::CaseInsensitive) : + m_pattern(s == Qt::CaseInsensitive ? thePattern.toLower() : thePattern), +- m_mimeType(theMimeType), m_weight(theWeight), m_caseSensitivity(s) ++ m_mimeType(theMimeType), ++ m_weight(theWeight), ++ m_caseSensitivity(s), ++ m_patternType(detectPatternType(m_pattern)) + { + } + +@@ -90,9 +93,10 @@ public: + qSwap(m_mimeType, other.m_mimeType); + qSwap(m_weight, other.m_weight); + qSwap(m_caseSensitivity, other.m_caseSensitivity); ++ qSwap(m_patternType, other.m_patternType); + } + +- bool matchFileName(const QString &filename) const; ++ bool matchFileName(const QString &inputFileName) const; + + inline const QString &pattern() const { return m_pattern; } + inline unsigned weight() const { return m_weight; } +@@ -100,10 +104,21 @@ public: + inline bool isCaseSensitive() const { return m_caseSensitivity == Qt::CaseSensitive; } + + private: ++ enum PatternType { ++ SuffixPattern, ++ PrefixPattern, ++ LiteralPattern, ++ VdrPattern, // special handling for "[0-9][0-9][0-9].vdr" pattern ++ AnimPattern, // special handling for "*.anim[1-9j]" pattern ++ OtherPattern ++ }; ++ PatternType detectPatternType(const QString &pattern) const; ++ + QString m_pattern; + QString m_mimeType; + int m_weight; + Qt::CaseSensitivity m_caseSensitivity; ++ PatternType m_patternType; + }; + Q_DECLARE_SHARED(QMimeGlobPattern) + diff --git a/src/corelib/mimetypes/qmimeprovider.cpp b/src/corelib/mimetypes/qmimeprovider.cpp -index 12ce442f70..80616cccad 100644 +index 12ce442f70..4642d0f2d0 100644 --- a/src/corelib/mimetypes/qmimeprovider.cpp +++ b/src/corelib/mimetypes/qmimeprovider.cpp @@ -244,15 +244,18 @@ void QMimeBinaryProvider::addFileNameMatches(const QString &fileName, QMimeGlobM @@ -62387,6 +62575,14 @@ index 12ce442f70..80616cccad 100644 } void QMimeBinaryProvider::matchGlobList(QMimeGlobMatchResult &result, CacheFile *cacheFile, int off, const QString &fileName) +@@ -272,7 +275,6 @@ void QMimeBinaryProvider::matchGlobList(QMimeGlobMatchResult &result, CacheFile + //qDebug() << pattern << mimeType << weight << caseSensitive; + QMimeGlobPattern glob(pattern, QString() /*unused*/, weight, qtCaseSensitive); + +- // TODO: this could be done faster for literals where a simple == would do. + if (glob.matchFileName(fileName)) + result.addMatch(QLatin1String(mimeType), weight, pattern); + } diff --git a/src/corelib/plugin/qlibrary_unix.cpp b/src/corelib/plugin/qlibrary_unix.cpp index a5c72f81d9..5cd21b67a4 100644 --- a/src/corelib/plugin/qlibrary_unix.cpp @@ -76143,6 +76339,149 @@ index 5d8f89eadd..9fe510827a 100644 if (d->activeStroker == &d->stroker) d->stroker.setForceOpen(path.hasExplicitOpen()); +diff --git a/src/gui/painting/qpainterpath.cpp b/src/gui/painting/qpainterpath.cpp +index ab60afd9cd..e5c6879251 100644 +--- a/src/gui/painting/qpainterpath.cpp ++++ b/src/gui/painting/qpainterpath.cpp +@@ -1248,7 +1248,7 @@ void QPainterPath::addText(const QPointF &point, const QFont &f, const QString & + + if (si.analysis.flags < QScriptAnalysis::TabOrObject) { + QGlyphLayout glyphs = eng->shapedGlyphs(&si); +- QFontEngine *fe = f.d->engineForScript(si.analysis.script); ++ QFontEngine *fe = eng->fontEngine(si); + Q_ASSERT(fe); + fe->addOutlineToPath(x, y, glyphs, this, + si.analysis.bidiLevel % 2 +diff --git a/src/gui/painting/qpdf.cpp b/src/gui/painting/qpdf.cpp +index de9fc13331..2c8d3c3b53 100644 +--- a/src/gui/painting/qpdf.cpp ++++ b/src/gui/painting/qpdf.cpp +@@ -856,14 +856,14 @@ void QPdfEngine::drawRects (const QRectF *rects, int rectCount) + if (!d->hasPen && !d->hasBrush) + return; + +- if (d->simplePen || !d->hasPen) { +- // draw strokes natively in this case for better output +- if(!d->simplePen && !d->stroker.matrix.isIdentity()) ++ if ((d->simplePen && !d->needsTransform) || !d->hasPen) { ++ // draw natively in this case for better output ++ if (!d->hasPen && d->needsTransform) // i.e. this is just a fillrect + *d->currentPage << "q\n" << QPdf::generateMatrix(d->stroker.matrix); + for (int i = 0; i < rectCount; ++i) + *d->currentPage << rects[i].x() << rects[i].y() << rects[i].width() << rects[i].height() << "re\n"; + *d->currentPage << (d->hasPen ? (d->hasBrush ? "B\n" : "S\n") : "f\n"); +- if(!d->simplePen && !d->stroker.matrix.isIdentity()) ++ if (!d->hasPen && d->needsTransform) + *d->currentPage << "Q\n"; + } else { + QPainterPath p; +@@ -920,7 +920,8 @@ void QPdfEngine::drawPath (const QPainterPath &p) + + if (d->simplePen) { + // draw strokes natively in this case for better output +- *d->currentPage << QPdf::generatePath(p, QTransform(), d->hasBrush ? QPdf::FillAndStrokePath : QPdf::StrokePath); ++ *d->currentPage << QPdf::generatePath(p, d->needsTransform ? d->stroker.matrix : QTransform(), ++ d->hasBrush ? QPdf::FillAndStrokePath : QPdf::StrokePath); + } else { + if (d->hasBrush) + *d->currentPage << QPdf::generatePath(p, d->stroker.matrix, QPdf::FillPath); +@@ -967,7 +968,7 @@ void QPdfEngine::drawPixmap (const QRectF &rectangle, const QPixmap &pixmap, con + + *d->currentPage + << QPdf::generateMatrix(QTransform(rectangle.width() / sr.width(), 0, 0, rectangle.height() / sr.height(), +- rectangle.x(), rectangle.y()) * (d->simplePen ? QTransform() : d->stroker.matrix)); ++ rectangle.x(), rectangle.y()) * (!d->needsTransform ? QTransform() : d->stroker.matrix)); + if (bitmap) { + // set current pen as d->brush + d->brush = d->pen.brush(); +@@ -1007,7 +1008,7 @@ void QPdfEngine::drawImage(const QRectF &rectangle, const QImage &image, const Q + + *d->currentPage + << QPdf::generateMatrix(QTransform(rectangle.width() / sr.width(), 0, 0, rectangle.height() / sr.height(), +- rectangle.x(), rectangle.y()) * (d->simplePen ? QTransform() : d->stroker.matrix)); ++ rectangle.x(), rectangle.y()) * (!d->needsTransform ? QTransform() : d->stroker.matrix)); + setBrush(); + d->currentPage->streamImage(im.width(), im.height(), object); + *d->currentPage << "Q\n"; +@@ -1056,7 +1057,7 @@ void QPdfEngine::drawTextItem(const QPointF &p, const QTextItem &textItem) + } + + *d->currentPage << "q\n"; +- if(!d->simplePen) ++ if (d->needsTransform) + *d->currentPage << QPdf::generateMatrix(d->stroker.matrix); + + bool hp = d->hasPen; +@@ -1135,12 +1136,12 @@ void QPdfEngine::updateState(const QPaintEngineState &state) + d->pen = state.pen(); + } + d->hasPen = d->pen.style() != Qt::NoPen; ++ bool oldCosmetic = d->stroker.cosmeticPen; + d->stroker.setPen(d->pen, state.renderHints()); + QBrush penBrush = d->pen.brush(); +- bool cosmeticPen = qt_pen_is_cosmetic(d->pen, state.renderHints()); + bool oldSimple = d->simplePen; +- d->simplePen = (d->hasPen && !cosmeticPen && (penBrush.style() == Qt::SolidPattern) && penBrush.isOpaque() && d->opacity == 1.0); +- if (oldSimple != d->simplePen) ++ d->simplePen = (d->hasPen && (penBrush.style() == Qt::SolidPattern) && penBrush.isOpaque() && d->opacity == 1.0); ++ if (oldSimple != d->simplePen || oldCosmetic != d->stroker.cosmeticPen) + flags |= DirtyTransform; + } else if (flags & DirtyHints) { + d->stroker.setPen(d->pen, state.renderHints()); +@@ -1224,8 +1225,13 @@ void QPdfEngine::setupGraphicsState(QPaintEngine::DirtyFlags flags) + + if (flags & DirtyTransform) { + *d->currentPage << "q\n"; +- if (d->simplePen && !d->stroker.matrix.isIdentity()) +- *d->currentPage << QPdf::generateMatrix(d->stroker.matrix); ++ d->needsTransform = false; ++ if (!d->stroker.matrix.isIdentity()) { ++ if (d->simplePen && !d->stroker.cosmeticPen) ++ *d->currentPage << QPdf::generateMatrix(d->stroker.matrix); ++ else ++ d->needsTransform = true; // I.e. page-wide xf not set, local xf needed ++ } + } + if (flags & DirtyBrush) + setBrush(); +@@ -1480,7 +1486,7 @@ int QPdfEngine::metric(QPaintDevice::PaintDeviceMetric metricType) const + + QPdfEnginePrivate::QPdfEnginePrivate() + : clipEnabled(false), allClipped(false), hasPen(true), hasBrush(false), simplePen(false), +- pdfVersion(QPdfEngine::Version_1_4), ++ needsTransform(false), pdfVersion(QPdfEngine::Version_1_4), + outDevice(nullptr), ownsDevice(false), + embedFonts(true), + grayscale(false), +@@ -1539,6 +1545,7 @@ bool QPdfEngine::begin(QPaintDevice *pdev) + d->graphicsState = 0; + d->patternColorSpace = 0; + d->simplePen = false; ++ d->needsTransform = false; + + d->pages.clear(); + d->imageCache.clear(); +@@ -2753,6 +2760,8 @@ int QPdfEnginePrivate::addBrushPattern(const QTransform &m, bool *specifyColor, + return gradientBrush(brush, matrix, gStateObject); + } + ++ matrix = brush.transform() * matrix; ++ + if ((!brush.isOpaque() && brush.style() < Qt::LinearGradientPattern) || opacity != 1.0) + *gStateObject = addConstantAlphaObject(qRound(brush.color().alpha() * opacity), + qRound(pen.color().alpha() * opacity)); +diff --git a/src/gui/painting/qpdf_p.h b/src/gui/painting/qpdf_p.h +index 4ff540e67b..6964c67d93 100644 +--- a/src/gui/painting/qpdf_p.h ++++ b/src/gui/painting/qpdf_p.h +@@ -271,6 +271,7 @@ public: + bool hasPen; + bool hasBrush; + bool simplePen; ++ bool needsTransform; + qreal opacity; + QPdfEngine::PdfVersion pdfVersion; + diff --git a/src/gui/painting/qpen.cpp b/src/gui/painting/qpen.cpp index 01e581d2ed..254abf88c0 100644 --- a/src/gui/painting/qpen.cpp @@ -76233,9 +76572,18 @@ index 94020dc665..d792d43dd7 100644 return; } diff --git a/src/gui/text/qfontdatabase.cpp b/src/gui/text/qfontdatabase.cpp -index 1a4d8f938b..0f5219410d 100644 +index 1a4d8f938b..feb8ce22f2 100644 --- a/src/gui/text/qfontdatabase.cpp +++ b/src/gui/text/qfontdatabase.cpp +@@ -964,7 +964,7 @@ QFontEngine *loadSingleEngine(int script, + if (style->key.stretch != 0 && request.stretch != 0 + && (request.styleName.isEmpty() || request.styleName != style->styleName)) { + def.stretch = (request.stretch * 100 + style->key.stretch / 2) / style->key.stretch; +- } else { ++ } else if (request.stretch == QFont::AnyStretch) { + def.stretch = 100; + } + @@ -2679,6 +2679,12 @@ QFontEngine *QFontDatabase::findFont(const QFontDef &request, int script) return engine; } @@ -76262,6 +76610,51 @@ index f1fd755e91..d9c0239940 100644 ensureFallbackFamiliesQueried(); Q_ASSERT(at < m_engines.size()); if (!m_engines.at(at)) { +diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp +index a2b3c8dc76..9d70873590 100644 +--- a/src/gui/text/qtextdocumentlayout.cpp ++++ b/src/gui/text/qtextdocumentlayout.cpp +@@ -105,14 +105,13 @@ public: + + bool sizeDirty; + bool layoutDirty; +- bool fullLayoutCompleted; + + QVector > floats; + }; + + QTextFrameData::QTextFrameData() + : maximumWidth(QFIXED_MAX), +- currentLayoutStruct(nullptr), sizeDirty(true), layoutDirty(true), fullLayoutCompleted(false) ++ currentLayoutStruct(nullptr), sizeDirty(true), layoutDirty(true) + { + } + +@@ -2944,7 +2943,7 @@ QRectF QTextDocumentLayoutPrivate::layoutFrame(QTextFrame *f, int layoutFrom, in + QTextFrameData *fd = data(f); + QFixed newContentsWidth; + +- bool fullLayout = (f == document->rootFrame() && !fd->fullLayoutCompleted); ++ bool fullLayout = false; + { + QTextFrameFormat fformat = f->frameFormat(); + // set sizes of this frame from the format +@@ -3398,7 +3397,6 @@ void QTextDocumentLayoutPrivate::layoutFlow(QTextFrame::Iterator it, QTextLayout + cp.contentsWidth = layoutStruct->contentsWidth; + checkPoints.append(cp); + checkPoints.reserve(checkPoints.size()); +- fd->fullLayoutCompleted = true; + } else { + currentLazyLayoutPosition = checkPoints.constLast().positionInFrame; + // ####### +@@ -3810,7 +3808,6 @@ void QTextDocumentLayout::documentChanged(int from, int oldLength, int length) + d->contentHasAlignment = false; + d->currentLazyLayoutPosition = 0; + d->checkPoints.clear(); +- data(d->docPrivate->rootFrame())->fullLayoutCompleted = false; + d->layoutStep(); + } else { + d->ensureLayoutedByPosition(from); diff --git a/src/gui/text/qtextengine.cpp b/src/gui/text/qtextengine.cpp index b7459bf826..cdaa729785 100644 --- a/src/gui/text/qtextengine.cpp @@ -76529,7 +76922,7 @@ index 4c9e722166..91c41d8240 100644 const auto result = frameReader.read(*m_socket); switch (result) { diff --git a/src/network/access/qhttpnetworkconnection.cpp b/src/network/access/qhttpnetworkconnection.cpp -index b0116319b0..9745f3b322 100644 +index b0116319b0..b918da48c4 100644 --- a/src/network/access/qhttpnetworkconnection.cpp +++ b/src/network/access/qhttpnetworkconnection.cpp @@ -1077,8 +1077,10 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest() @@ -76544,6 +76937,76 @@ index b0116319b0..9745f3b322 100644 if (networkLayerState == IPv4) channels[0].networkLayerPreference = QAbstractSocket::IPv4Protocol; +@@ -1118,31 +1120,50 @@ void QHttpNetworkConnectionPrivate::_q_startNextRequest() + int normalRequests = queuedRequests - preConnectRequests; + neededOpenChannels = qMax(normalRequests, preConnectRequests); + } ++ ++ if (neededOpenChannels <= 0) ++ return; ++ ++ QQueue channelsToConnect; ++ ++ // use previously used channels first + for (int i = 0; i < activeChannelCount && neededOpenChannels > 0; ++i) { +- bool connectChannel = false; +- if (channels[i].socket) { +- if ((channels[i].socket->state() == QAbstractSocket::ConnectingState) +- || (channels[i].socket->state() == QAbstractSocket::HostLookupState) +- || channels[i].pendingEncrypt) // pendingEncrypt == "EncryptingState" +- neededOpenChannels--; +- +- if (neededOpenChannels <= 0) +- break; +- if (!channels[i].reply && !channels[i].isSocketBusy() && (channels[i].socket->state() == QAbstractSocket::UnconnectedState)) +- connectChannel = true; +- } else { // not previously used channel +- connectChannel = true; ++ if (!channels[i].socket) ++ continue; ++ ++ if ((channels[i].socket->state() == QAbstractSocket::ConnectingState) ++ || (channels[i].socket->state() == QAbstractSocket::HostLookupState) ++ || channels[i].pendingEncrypt) { // pendingEncrypt == "EncryptingState" ++ neededOpenChannels--; ++ continue; + } + +- if (connectChannel) { +- if (networkLayerState == IPv4) +- channels[i].networkLayerPreference = QAbstractSocket::IPv4Protocol; +- else if (networkLayerState == IPv6) +- channels[i].networkLayerPreference = QAbstractSocket::IPv6Protocol; +- channels[i].ensureConnection(); ++ if (!channels[i].reply && !channels[i].isSocketBusy() ++ && (channels[i].socket->state() == QAbstractSocket::UnconnectedState)) { ++ channelsToConnect.enqueue(i); + neededOpenChannels--; + } + } ++ ++ // use other channels ++ for (int i = 0; i < activeChannelCount && neededOpenChannels > 0; ++i) { ++ if (channels[i].socket) ++ continue; ++ ++ channelsToConnect.enqueue(i); ++ neededOpenChannels--; ++ } ++ ++ while (!channelsToConnect.isEmpty()) { ++ const int channel = channelsToConnect.dequeue(); ++ ++ if (networkLayerState == IPv4) ++ channels[channel].networkLayerPreference = QAbstractSocket::IPv4Protocol; ++ else if (networkLayerState == IPv6) ++ channels[channel].networkLayerPreference = QAbstractSocket::IPv6Protocol; ++ ++ channels[channel].ensureConnection(); ++ } + } + + diff --git a/src/network/access/qhttpnetworkconnectionchannel.cpp b/src/network/access/qhttpnetworkconnectionchannel.cpp index 9325787d5f..f1db274402 100644 --- a/src/network/access/qhttpnetworkconnectionchannel.cpp @@ -76659,6 +77122,21 @@ index 249ffe61a5..af6c20463c 100644 m_proxyInfo = (ProxyInfo)getConnectivityManager(context).getDefaultProxy(); return m_proxyInfo; } +diff --git a/src/network/doc/src/ssl.qdoc b/src/network/doc/src/ssl.qdoc +index e485a1b393..efe4111cfe 100644 +--- a/src/network/doc/src/ssl.qdoc ++++ b/src/network/doc/src/ssl.qdoc +@@ -36,8 +36,8 @@ + the Secure Sockets Layer (SSL) protocol, using the \l{OpenSSL Toolkit} + to perform encryption and protocol handling. + +- From Qt version 5.6 onwards, the officially supported version for OpenSSL +- is 1.0.0 or later. ++ From Qt version 5.15 onwards, the officially supported version for OpenSSL ++ is 1.1.1 or later. + + \annotatedlist ssl + diff --git a/src/network/kernel/qnetworkproxy_mac.cpp b/src/network/kernel/qnetworkproxy_mac.cpp index 3f3b37f666..97f43420ca 100644 --- a/src/network/kernel/qnetworkproxy_mac.cpp @@ -76685,6 +77163,19 @@ index d8453e879c..160e6c802a 100644 jar/QtAndroidBearer.jar ANDROID_LIB_DEPENDENCIES = \ plugins/bearer/libplugins_bearer_qandroidbearer.so +diff --git a/src/network/socket/qhttpsocketengine.cpp b/src/network/socket/qhttpsocketengine.cpp +index ca7680b71f..6629b7eace 100644 +--- a/src/network/socket/qhttpsocketengine.cpp ++++ b/src/network/socket/qhttpsocketengine.cpp +@@ -645,7 +645,7 @@ void QHttpSocketEngine::slotSocketReadNotification() + d->socket->readAll(); + //We're done with the reply and need to reset it for the next connection + delete d->reply; +- d->reply = new QHttpNetworkReply; ++ d->reply = new QHttpNetworkReply(QUrl(), this); + } + + if (priv->phase == QAuthenticatorPrivate::Done) diff --git a/src/network/socket/qsocks5socketengine.cpp b/src/network/socket/qsocks5socketengine.cpp index 4f866e4da0..3a046fd116 100644 --- a/src/network/socket/qsocks5socketengine.cpp @@ -76817,6 +77308,138 @@ index f11a59395d..11d2c8717d 100644 \since 5.0 */ +diff --git a/src/network/ssl/qsslcertificate_openssl.cpp b/src/network/ssl/qsslcertificate_openssl.cpp +index ca9d61ccb1..5022b899aa 100644 +--- a/src/network/ssl/qsslcertificate_openssl.cpp ++++ b/src/network/ssl/qsslcertificate_openssl.cpp +@@ -65,10 +65,17 @@ bool QSslCertificate::operator==(const QSslCertificate &other) const + { + if (d == other.d) + return true; ++ + if (d->null && other.d->null) + return true; +- if (d->x509 && other.d->x509) +- return q_X509_cmp(d->x509, other.d->x509) == 0; ++ ++ if (d->x509 && other.d->x509) { ++ const int ret = q_X509_cmp(d->x509, other.d->x509); ++ if (ret >= -1 && ret <= 1) ++ return ret == 0; ++ QSslSocketBackendPrivate::logAndClearErrorQueue(); ++ } ++ + return false; + } + +@@ -327,9 +334,12 @@ static QVariant x509UnknownExtensionToValue(X509_EXTENSION *ext) + // we cast away the const-ness here because some versions of openssl + // don't use const for the parameters in the functions pointers stored + // in the object. ++ Q_ASSERT(ext); ++ + X509V3_EXT_METHOD *meth = const_cast(q_X509V3_EXT_get(ext)); + if (!meth) { + ASN1_OCTET_STRING *value = q_X509_EXTENSION_get_data(ext); ++ Q_ASSERT(value); + QByteArray result( reinterpret_cast(q_ASN1_STRING_get0_data(value)), + q_ASN1_STRING_length(value)); + return result; +@@ -363,7 +373,6 @@ static QVariant x509UnknownExtensionToValue(X509_EXTENSION *ext) + else + return list; + } else if (meth->i2s && ext_internal) { +- //qCDebug(lcSsl) << meth->i2s(meth, ext_internal); + QVariant result(QString::fromUtf8(meth->i2s(meth, ext_internal))); + return result; + } else if (meth->i2r && ext_internal) { +@@ -400,6 +409,8 @@ static QVariant x509ExtensionToValue(X509_EXTENSION *ext) + case NID_basic_constraints: + { + BASIC_CONSTRAINTS *basic = reinterpret_cast(q_X509V3_EXT_d2i(ext)); ++ if (!basic) ++ return QVariant(); + + QVariantMap result; + result[QLatin1String("ca")] = basic->ca ? true : false; +@@ -413,6 +424,8 @@ static QVariant x509ExtensionToValue(X509_EXTENSION *ext) + case NID_info_access: + { + AUTHORITY_INFO_ACCESS *info = reinterpret_cast(q_X509V3_EXT_d2i(ext)); ++ if (!info) ++ return QVariant(); + + QVariantMap result; + for (int i=0; i < q_SKM_sk_num(ACCESS_DESCRIPTION, info); i++) { +@@ -442,7 +455,8 @@ static QVariant x509ExtensionToValue(X509_EXTENSION *ext) + case NID_subject_key_identifier: + { + void *ext_internal = q_X509V3_EXT_d2i(ext); +- ++ if (!ext_internal) ++ return QVariant(); + // we cast away the const-ness here because some versions of openssl + // don't use const for the parameters in the functions pointers stored + // in the object. +@@ -454,6 +468,8 @@ static QVariant x509ExtensionToValue(X509_EXTENSION *ext) + case NID_authority_key_identifier: + { + AUTHORITY_KEYID *auth_key = reinterpret_cast(q_X509V3_EXT_d2i(ext)); ++ if (!auth_key) ++ return QVariant(); + + QVariantMap result; + +@@ -482,9 +498,16 @@ static QVariant x509ExtensionToValue(X509_EXTENSION *ext) + + QSslCertificateExtension QSslCertificatePrivate::convertExtension(X509_EXTENSION *ext) + { ++ Q_ASSERT(ext); ++ + QSslCertificateExtension result; + + ASN1_OBJECT *obj = q_X509_EXTENSION_get_object(ext); ++ if (!obj) { ++ qCWarning(lcSsl, "Invalid (nullptr) ASN1_OBJECT"); ++ return result; ++ } ++ + QByteArray oid = QSslCertificatePrivate::asn1ObjectId(obj); + QByteArray name = QSslCertificatePrivate::asn1ObjectName(obj); + +@@ -521,10 +544,17 @@ QList QSslCertificate::extensions() const + return result; + + int count = q_X509_get_ext_count(d->x509); ++ if (count <= 0) ++ return result; ++ + result.reserve(count); + + for (int i = 0; i < count; i++) { + X509_EXTENSION *ext = q_X509_get_ext(d->x509, i); ++ if (!ext) { ++ qCWarning(lcSsl) << "Invalid (nullptr) extension at index" << i; ++ continue; ++ } + result << QSslCertificatePrivate::convertExtension(ext); + } + +diff --git a/src/network/ssl/qsslcertificate_qt.cpp b/src/network/ssl/qsslcertificate_qt.cpp +index 8b5035ad96..4b1510eb3c 100644 +--- a/src/network/ssl/qsslcertificate_qt.cpp ++++ b/src/network/ssl/qsslcertificate_qt.cpp +@@ -311,7 +311,9 @@ bool QSslCertificatePrivate::parse(const QByteArray &data) + + if (elem.type() == QAsn1Element::Context0Type) { + QDataStream versionStream(elem.value()); +- if (!elem.read(versionStream) || elem.type() != QAsn1Element::IntegerType) ++ if (!elem.read(versionStream) ++ || elem.type() != QAsn1Element::IntegerType ++ || elem.value().isEmpty()) + return false; + + versionString = QByteArray::number(elem.value().at(0) + 1); diff --git a/src/network/ssl/qsslkey_openssl.cpp b/src/network/ssl/qsslkey_openssl.cpp index 43cb8c6de8..10f6c6c26e 100644 --- a/src/network/ssl/qsslkey_openssl.cpp @@ -78245,6 +78868,53 @@ index a641935dc5..ceee4a3a59 100644 #if QT_CONFIG(thread) mysql_thread_init(); +diff --git a/src/plugins/sqldrivers/psql/qsql_psql.cpp b/src/plugins/sqldrivers/psql/qsql_psql.cpp +index ccaeca9362..d9fb343261 100644 +--- a/src/plugins/sqldrivers/psql/qsql_psql.cpp ++++ b/src/plugins/sqldrivers/psql/qsql_psql.cpp +@@ -1198,8 +1198,7 @@ bool QPSQLDriver::open(const QString &db, + const QString &connOpts) + { + Q_D(QPSQLDriver); +- if (isOpen()) +- close(); ++ close(); + QString connectString; + if (!host.isEmpty()) + connectString.append(QLatin1String("host=")).append(qQuote(host)); +@@ -1242,21 +1241,19 @@ bool QPSQLDriver::open(const QString &db, + void QPSQLDriver::close() + { + Q_D(QPSQLDriver); +- if (isOpen()) { + +- d->seid.clear(); +- if (d->sn) { +- disconnect(d->sn, SIGNAL(activated(QSocketDescriptor)), this, SLOT(_q_handleNotification())); +- delete d->sn; +- d->sn = nullptr; +- } +- +- if (d->connection) +- PQfinish(d->connection); +- d->connection = nullptr; +- setOpen(false); +- setOpenError(false); ++ d->seid.clear(); ++ if (d->sn) { ++ disconnect(d->sn, SIGNAL(activated(QSocketDescriptor)), this, SLOT(_q_handleNotification())); ++ delete d->sn; ++ d->sn = nullptr; + } ++ ++ if (d->connection) ++ PQfinish(d->connection); ++ d->connection = nullptr; ++ setOpen(false); ++ setOpenError(false); + } + + QSqlResult *QPSQLDriver::createResult() const diff --git a/src/plugins/styles/mac/qmacstyle_mac.mm b/src/plugins/styles/mac/qmacstyle_mac.mm index d1febd81d4..67c045e8bd 100644 --- a/src/plugins/styles/mac/qmacstyle_mac.mm @@ -79333,6 +80003,32 @@ index 479d91be0e..1eac50df81 100644 the description should give more context, such as \gui{Saves the current document}. This property has to be \l{Internationalization with Qt}{localized}. +diff --git a/src/widgets/styles/qstyle.cpp b/src/widgets/styles/qstyle.cpp +index d80dafcce6..0d71762c8b 100644 +--- a/src/widgets/styles/qstyle.cpp ++++ b/src/widgets/styles/qstyle.cpp +@@ -2450,17 +2450,19 @@ QDebug operator<<(QDebug debug, QStyle::State state) + const QStyle * QStyle::proxy() const + { + Q_D(const QStyle); +- return d->proxyStyle; ++ return d->proxyStyle == this ? this : d->proxyStyle->proxy(); + } + + /* \internal + + This function sets the base style that style calls will be +- redirected to. Note that ownership is not transferred. ++ redirected to. Note that ownership is not transferred. \a style ++ must be a valid pointer (not nullptr). + */ + void QStyle::setProxy(QStyle *style) + { + Q_D(QStyle); ++ Q_ASSERT(style); + d->proxyStyle = style; + } + diff --git a/src/widgets/styles/qstyleanimation.cpp b/src/widgets/styles/qstyleanimation.cpp index b9202eae69..f4a2ebe913 100644 --- a/src/widgets/styles/qstyleanimation.cpp @@ -79350,7 +80046,7 @@ index b9202eae69..f4a2ebe913 100644 if (target() && isUpdateNeeded()) updateTarget(); diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp -index 14bca7fbe4..72f7ad7455 100644 +index 14bca7fbe4..822e6f895f 100644 --- a/src/widgets/styles/qstylesheetstyle.cpp +++ b/src/widgets/styles/qstylesheetstyle.cpp @@ -1324,11 +1324,11 @@ QPainterPath QRenderRule::borderClip(QRect r) @@ -79375,26 +80071,6 @@ index 14bca7fbe4..72f7ad7455 100644 } } -@@ -3539,8 +3540,8 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q - const uint horizontalAlignMask = Qt::AlignHCenter | Qt::AlignLeft | Qt::AlignRight; - const uint verticalAlignMask = Qt::AlignVCenter | Qt::AlignTop | Qt::AlignLeft; - -- if (rule.hasPosition() && rule.position()->textAlignment != 0) { -- Qt::Alignment textAlignment = rule.position()->textAlignment; -+ const Qt::Alignment textAlignment = rule.position()->textAlignment; -+ if (rule.hasPosition() && textAlignment != 0) { - tf |= (textAlignment & verticalAlignMask) ? (textAlignment & verticalAlignMask) : Qt::AlignVCenter; - tf |= (textAlignment & horizontalAlignMask) ? (textAlignment & horizontalAlignMask) : Qt::AlignHCenter; - if (!styleHint(SH_UnderlineShortcut, button, w)) -@@ -3599,6 +3600,8 @@ void QStyleSheetStyle::drawControl(ControlElement ce, const QStyleOption *opt, Q - iconRect.translate(pixelMetric(PM_ButtonShiftHorizontal, opt, w), - pixelMetric(PM_ButtonShiftVertical, opt, w)); - p->drawPixmap(iconRect, pixmap); -+ }else { -+ tf |= textAlignment; - } - - if (button->state & (State_On | State_Sunken)) diff --git a/src/widgets/widgets/qcombobox.cpp b/src/widgets/widgets/qcombobox.cpp index 474a538fb2..41dccd1f5e 100644 --- a/src/widgets/widgets/qcombobox.cpp @@ -79474,6 +80150,19 @@ index 81a98f2d14..97fb6370fd 100644 QObject::connect(platformMenu, SIGNAL(destroyed()), container, SLOT(deleteLater())); container->resize(widget->sizeHint()); widget->setParent(container); +diff --git a/src/widgets/widgets/qplaintextedit.cpp b/src/widgets/widgets/qplaintextedit.cpp +index 87e8af1382..6694b79dda 100644 +--- a/src/widgets/widgets/qplaintextedit.cpp ++++ b/src/widgets/widgets/qplaintextedit.cpp +@@ -972,7 +972,7 @@ void QPlainTextEditPrivate::pageUpDown(QTextCursor::MoveOperation op, QTextCurso + } + + if (moveCursor) { +- control->setTextCursor(cursor); ++ control->setTextCursor(cursor, moveMode == QTextCursor::KeepAnchor); + pageUpDownLastCursorYIsValid = true; + } + } diff --git a/src/widgets/widgets/qpushbutton.cpp b/src/widgets/widgets/qpushbutton.cpp index 3d075bf92f..d182d7d33d 100644 --- a/src/widgets/widgets/qpushbutton.cpp @@ -79541,11 +80230,88 @@ index 328df6a8f2..84841c1cc0 100644 painter.setLayoutDirection(layoutDirection()); if (!d->pixmap.isNull()) painter.drawPixmap(QPoint(), d->pixmap); +diff --git a/src/widgets/widgets/qtextedit.cpp b/src/widgets/widgets/qtextedit.cpp +index 8ddda78f7d..656062fcd6 100644 +--- a/src/widgets/widgets/qtextedit.cpp ++++ b/src/widgets/widgets/qtextedit.cpp +@@ -270,7 +270,7 @@ void QTextEditPrivate::pageUpDown(QTextCursor::MoveOperation op, QTextCursor::Mo + vbar->triggerAction(QAbstractSlider::SliderPageStepAdd); + } + } +- control->setTextCursor(cursor); ++ control->setTextCursor(cursor, moveMode == QTextCursor::KeepAnchor); + } + + #if QT_CONFIG(scrollbar) +diff --git a/src/widgets/widgets/qwidgetlinecontrol.cpp b/src/widgets/widgets/qwidgetlinecontrol.cpp +index 9dd61c2c6a..087657ab85 100644 +--- a/src/widgets/widgets/qwidgetlinecontrol.cpp ++++ b/src/widgets/widgets/qwidgetlinecontrol.cpp +@@ -1948,10 +1948,15 @@ void QWidgetLineControl::processKeyEvent(QKeyEvent* event) + return; + } + +- if (unknown) ++ if (unknown) { + event->ignore(); +- else ++ } else { ++#ifndef QT_NO_CLIPBOARD ++ if (QApplication::clipboard()->supportsSelection()) ++ copy(QClipboard::Selection); ++#endif + event->accept(); ++ } + } + + bool QWidgetLineControl::isUndoAvailable() const diff --git a/src/widgets/widgets/qwidgettextcontrol.cpp b/src/widgets/widgets/qwidgettextcontrol.cpp -index 40b8af663c..e2a07c0043 100644 +index 40b8af663c..961f954b95 100644 --- a/src/widgets/widgets/qwidgettextcontrol.cpp +++ b/src/widgets/widgets/qwidgettextcontrol.cpp -@@ -1942,10 +1942,14 @@ void QWidgetTextControlPrivate::contextMenuEvent(const QPoint &screenPos, const +@@ -922,7 +922,7 @@ QTextDocument *QWidgetTextControl::document() const + return d->doc; + } + +-void QWidgetTextControl::setTextCursor(const QTextCursor &cursor) ++void QWidgetTextControl::setTextCursor(const QTextCursor &cursor, bool selectionClipboard) + { + Q_D(QWidgetTextControl); + d->cursorIsFocusIndicator = false; +@@ -936,6 +936,11 @@ void QWidgetTextControl::setTextCursor(const QTextCursor &cursor) + d->repaintOldAndNewSelection(oldSelection); + if (posChanged) + emit cursorPositionChanged(); ++ ++#ifndef QT_NO_CLIPBOARD ++ if (selectionClipboard) ++ d->setClipboardSelection(); ++#endif + } + + QTextCursor QWidgetTextControl::textCursor() const +@@ -1225,6 +1230,9 @@ void QWidgetTextControlPrivate::keyPressEvent(QKeyEvent *e) + if (e == QKeySequence::SelectAll) { + e->accept(); + q->selectAll(); ++#ifndef QT_NO_CLIPBOARD ++ setClipboardSelection(); ++#endif + return; + } + #ifndef QT_NO_CLIPBOARD +@@ -1376,6 +1384,10 @@ process: + + accept: + ++#ifndef QT_NO_CLIPBOARD ++ setClipboardSelection(); ++#endif ++ + e->accept(); + cursorOn = true; + +@@ -1942,10 +1954,14 @@ void QWidgetTextControlPrivate::contextMenuEvent(const QPoint &screenPos, const if (!menu) return; menu->setAttribute(Qt::WA_DeleteOnClose); @@ -79562,6 +80328,19 @@ index 40b8af663c..e2a07c0043 100644 menu->popup(screenPos); #endif } +diff --git a/src/widgets/widgets/qwidgettextcontrol_p.h b/src/widgets/widgets/qwidgettextcontrol_p.h +index c445ecaf80..71dc988b56 100644 +--- a/src/widgets/widgets/qwidgettextcontrol_p.h ++++ b/src/widgets/widgets/qwidgettextcontrol_p.h +@@ -105,7 +105,7 @@ public: + void setDocument(QTextDocument *document); + QTextDocument *document() const; + +- void setTextCursor(const QTextCursor &cursor); ++ void setTextCursor(const QTextCursor &cursor, bool selectionClipboard = false); + QTextCursor textCursor() const; + + void setTextInteractionFlags(Qt::TextInteractionFlags flags); diff --git a/src/xml/sax/qxml.cpp b/src/xml/sax/qxml.cpp index ea6124f45d..7a444713c1 100644 --- a/src/xml/sax/qxml.cpp @@ -80604,10 +81383,19 @@ index f31e2bf41b..48e4f4c9c0 100644 m1.shear(0.5f, 0.25f); QCOMPARE(m1.type(), QTransform::TxShear); diff --git a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp -index 12e8083622..bbb7276bfb 100644 +index 12e8083622..6f783f6b6c 100644 --- a/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp +++ b/tests/auto/gui/text/qfontdatabase/tst_qfontdatabase.cpp -@@ -309,7 +309,17 @@ void tst_QFontDatabase::aliases() +@@ -79,6 +79,8 @@ private slots: + void registerOpenTypePreferredNamesSystem(); + void registerOpenTypePreferredNamesApplication(); + ++ void stretchRespected(); ++ + private: + QString m_ledFont; + QString m_testFont; +@@ -309,7 +311,17 @@ void tst_QFontDatabase::aliases() QFontDatabase db; const QStringList families = db.families(); QVERIFY(!families.isEmpty()); @@ -80626,6 +81414,35 @@ index 12e8083622..bbb7276bfb 100644 QVERIFY(db.hasFamily(firstFont)); const QString alias = QStringLiteral("AliasToFirstFont") + firstFont; QVERIFY(!db.hasFamily(alias)); +@@ -343,6 +355,28 @@ static QString testString() + return QStringLiteral("foo bar"); + } + ++void tst_QFontDatabase::stretchRespected() ++{ ++ int italicId = QFontDatabase::addApplicationFont(m_testFontItalic); ++ QVERIFY(italicId != -1); ++ ++ QVERIFY(!QFontDatabase::applicationFontFamilies(italicId).isEmpty()); ++ ++ QString italicFontName = QFontDatabase::applicationFontFamilies(italicId).first(); ++ ++ QFont italicFont = QFontDatabase().font(italicFontName, ++ QString::fromLatin1("Italic"), 14); ++ QVERIFY(italicFont.italic()); ++ ++ QFont italicStretchedFont = italicFont; ++ italicStretchedFont.setStretch( 400 ); ++ ++ QVERIFY(QFontMetricsF(italicFont).horizontalAdvance(QStringLiteral("foobar")) < ++ QFontMetricsF(italicStretchedFont).horizontalAdvance(QStringLiteral("foobar"))); ++ ++ QFontDatabase::removeApplicationFont(italicId); ++} ++ + void tst_QFontDatabase::condensedFontWidthNoFontMerging() + { + int regularFontId = QFontDatabase::addApplicationFont(m_testFont); diff --git a/tests/auto/gui/text/qtextimagehandler/data/image.png b/tests/auto/gui/text/qtextimagehandler/data/image.png new file mode 100644 index 0000000000..dd589dd49c @@ -81164,7 +81981,7 @@ index 0000000000..e244bf2889 +AM2KHvDxb9Pur6jIOqm9mvYpI3llJu2ICcp/HKiRI0iVV2a/bd1YQzY= +-----END CERTIFICATE----- diff --git a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp -index e89b7f5a44..115d111974 100644 +index e89b7f5a44..445e6a2d98 100644 --- a/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp +++ b/tests/auto/network/ssl/qsslcertificate/tst_qsslcertificate.cpp @@ -79,6 +79,9 @@ private slots: @@ -81258,6 +82075,430 @@ index e89b7f5a44..115d111974 100644 } void tst_QSslCertificate::fromPath_data() +@@ -1061,6 +1128,7 @@ void tst_QSslCertificate::verify() + #if QT_CONFIG(securetransport) + QSKIP("Not implemented in SecureTransport"); + #endif ++ + QList errors; + QList toVerify; + +diff --git a/tests/auto/network/ssl/qsslcertificate/verify-certs/README b/tests/auto/network/ssl/qsslcertificate/verify-certs/README +index 87cb293ef6..f4317331b6 100644 +--- a/tests/auto/network/ssl/qsslcertificate/verify-certs/README ++++ b/tests/auto/network/ssl/qsslcertificate/verify-certs/README +@@ -1,2 +1,9 @@ + openssl verify -CAfile cacert.pem -untrusted test-intermediate-ca-cert.pem test-intermediate-is-ca-cert.pem + openssl verify -CAfile cacert.pem -untrusted test-ocsp-good-cert.pem test-intermediate-not-ca-cert.pem ++ ++1. cacert.pem is, obviously, a root CA certificate. ++2. test-intermediate-ca-cert.pem is a certificate, signed by the root CA, an intermediate CA. ++3. test-intermediate-is-ca-cert.pem is a certificate, signed by test-intermediate-ca-cert.pem. ++4. test-ocsp-good-cert.pem is signed by root CA, it has CA:FALSE but keyUsage allowing to sign ++ CSRs - this is how OpenSSL would report us 'invalid CA certificate' instead of 'No issuer found'. ++5. test-intermediate-not-ca-cert.pem is signed by test-ocsp-good-cert.pem. +diff --git a/tests/auto/network/ssl/qsslcertificate/verify-certs/cacert.pem b/tests/auto/network/ssl/qsslcertificate/verify-certs/cacert.pem +index 8c75c54bcb..5b9b570479 100644 +--- a/tests/auto/network/ssl/qsslcertificate/verify-certs/cacert.pem ++++ b/tests/auto/network/ssl/qsslcertificate/verify-certs/cacert.pem +@@ -1,23 +1,25 @@ + -----BEGIN CERTIFICATE----- +-MIID6zCCAtOgAwIBAgIJAP4bjANFSx0BMA0GCSqGSIb3DQEBBQUAMIGrMSYwJAYD +-VQQDEx1XZXN0cG9pbnQgQ2VydGlmaWNhdGUgVGVzdCBDQTETMBEGA1UECBMKTGFu +-Y2FzaGlyZTELMAkGA1UEBhMCVUsxHTAbBgkqhkiG9w0BCQEWDmNhQGV4YW1wbGUu +-Y29tMUAwPgYDVQQKEzdXZXN0cG9pbnQgQ2VydGlmaWNhdGUgVGVzdCBSb290IENl +-cnRpZmljYXRpb24gQXV0aG9yaXR5MB4XDTExMDczMTIxMDExNloXDTIxMDcyODIx +-MDExNlowgasxJjAkBgNVBAMTHVdlc3Rwb2ludCBDZXJ0aWZpY2F0ZSBUZXN0IENB +-MRMwEQYDVQQIEwpMYW5jYXNoaXJlMQswCQYDVQQGEwJVSzEdMBsGCSqGSIb3DQEJ +-ARYOY2FAZXhhbXBsZS5jb20xQDA+BgNVBAoTN1dlc3Rwb2ludCBDZXJ0aWZpY2F0 +-ZSBUZXN0IFJvb3QgQ2VydGlmaWNhdGlvbiBBdXRob3JpdHkwggEiMA0GCSqGSIb3 +-DQEBAQUAA4IBDwAwggEKAoIBAQC5xMKXviXuxFO67WzFIImO5RY3Y+dqt7maTB+p +-JiHkn98rJoBB4J1cDnEUIs5ErO+kqOjW7JwF50fePNJ5K+I6SbRVn9gxAI59ZA6O +-9UvOPZOw4/6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CERTIFICATE----- +diff --git a/tests/auto/network/ssl/qsslcertificate/verify-certs/test-intermediate-ca-cert.pem b/tests/auto/network/ssl/qsslcertificate/verify-certs/test-intermediate-ca-cert.pem +index d00490caba..4e850907ad 100644 +--- a/tests/auto/network/ssl/qsslcertificate/verify-certs/test-intermediate-ca-cert.pem ++++ b/tests/auto/network/ssl/qsslcertificate/verify-certs/test-intermediate-ca-cert.pem +@@ -1,66 +1,26 @@ +-Certificate: +- Data: +- Version: 3 (0x2) +- Serial Number: 28 (0x1c) +- Signature Algorithm: sha1WithRSAEncryption +- Issuer: CN=Westpoint Certificate Test CA, ST=Lancashire, C=UK/emailAddress=ca@example.com, O=Westpoint Certificate Test Root Certification Authority +- Validity +- Not Before: Jul 31 21:01:18 2011 GMT +- Not After : Jul 28 21:01:18 2021 GMT +- Subject: ST=Lancashire, C=UK/emailAddress=test@example.com, O=Test intermediate CA +- Subject Public Key Info: +- Public Key Algorithm: rsaEncryption +- Public-Key: (1024 bit) +- Modulus: +- 00:bc:bd:83:c1:bc:36:d8:9c:74:68:5a:46:48:25: +- 83:59:f8:35:1e:8f:dc:2c:52:3b:7c:2e:ea:40:c4: +- 93:b6:39:31:df:f5:a6:f8:01:17:67:93:21:59:9b: +- 89:7f:ed:2a:19:7b:25:a5:e1:71:12:99:e5:14:28: +- df:75:b5:17:1c:3b:1d:3d:74:48:4f:b7:42:f4:3a: +- ab:56:05:2b:fc:d3:27:97:01:08:5b:ad:26:9b:f2: +- 87:51:9c:7e:e1:f1:ef:1c:bf:ad:7e:38:d9:76:89: +- 30:a6:8c:2f:6f:87:9f:9e:57:13:14:b4:45:30:f3: +- be:58:df:8a:d2:ee:7b:1d:89 +- Exponent: 65537 (0x10001) +- X509v3 extensions: +- Authority Information Access: +- OCSP - URI:http://ocsp.example.com:8888/ +- +- X509v3 Basic Constraints: +- CA:TRUE +- Signature Algorithm: sha1WithRSAEncryption +- 33:84:9d:0e:b2:59:04:dc:ef:e3:04:8b:00:6c:64:ea:58:9e: +- 36:59:76:27:59:a0:b8:ee:0d:86:83:ff:db:65:eb:6c:1f:16: +- 47:e7:f5:e6:c3:88:81:73:7e:ed:12:8d:7e:fd:5e:b1:5c:68: +- 47:f8:f9:ca:e3:e0:c0:f3:12:b2:24:3b:77:2c:98:de:05:6d: +- a8:ec:27:b8:af:ab:84:25:26:73:b4:58:4c:7c:c1:74:97:98: +- ab:0e:e6:99:70:bc:38:b0:9a:e3:d9:5c:75:fa:46:d2:87:55: +- 09:86:8f:ef:4a:e4:ef:3e:32:c6:ac:9d:27:86:29:b8:78:38: +- 7b:87:6c:57:72:bd:57:99:73:36:db:fa:52:bd:7b:a7:05:cd: +- 28:b8:85:fc:11:47:5e:c6:77:72:6a:fb:73:3e:8b:a4:6d:f8: +- 17:f4:12:d5:36:e0:ef:5c:f8:b2:a1:69:3e:4c:cf:86:5f:63: +- f6:02:60:95:7f:61:e8:cb:7f:14:66:da:36:2e:78:13:3e:68: +- ae:3f:13:c1:79:88:18:18:3f:23:f3:9a:e1:e7:7e:ae:50:e4: +- b7:80:76:31:92:74:79:2c:de:d0:74:fe:81:7c:f6:01:14:6a: +- 1f:5f:88:85:6a:11:1d:50:af:f1:97:4d:67:40:c3:e9:ae:6f: +- 60:e2:bc:e2 + -----BEGIN CERTIFICATE----- +-MIIDUDCCAjigAwIBAgIBHDANBgkqhkiG9w0BAQUFADCBqzEmMCQGA1UEAxMdV2Vz +-dHBvaW50IENlcnRpZmljYXRlIFRlc3QgQ0ExEzARBgNVBAgTCkxhbmNhc2hpcmUx +-CzAJBgNVBAYTAlVLMR0wGwYJKoZIhvcNAQkBFg5jYUBleGFtcGxlLmNvbTFAMD4G +-A1UEChM3V2VzdHBvaW50IENlcnRpZmljYXRlIFRlc3QgUm9vdCBDZXJ0aWZpY2F0 +-aW9uIEF1dGhvcml0eTAeFw0xMTA3MzEyMTAxMThaFw0yMTA3MjgyMTAxMThaMGIx +-EzARBgNVBAgTCkxhbmNhc2hpcmUxCzAJBgNVBAYTA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Clbu1qPEwmbCeuPDHpcXMzYUEm/vHTJFNxfvLgiLYwZpxhYZiHeMMEUYxQRrmI1 ++DJbcpZT4nYyaVKinvMmw5KG85cLsyjIgzhUwLGSAfB+p4pIX+R8GQZtdn26+FN9c ++U+ZDfAUJ0hrPmd89KuSXm96tarx/EYnGzwletTL2IJWS1zxpGFlpyFgWq3m054iD ++UAWX8IPCQRMwhoKmSqNbhtYIKLXyDe3Xg6yD0ySDKjlB + -----END CERTIFICATE----- +diff --git a/tests/auto/network/ssl/qsslcertificate/verify-certs/test-intermediate-is-ca-cert.pem b/tests/auto/network/ssl/qsslcertificate/verify-certs/test-intermediate-is-ca-cert.pem +index 396cad86cb..3f13c93473 100644 +--- a/tests/auto/network/ssl/qsslcertificate/verify-certs/test-intermediate-is-ca-cert.pem ++++ b/tests/auto/network/ssl/qsslcertificate/verify-certs/test-intermediate-is-ca-cert.pem +@@ -1,53 +1,25 @@ +-Certificate: +- Data: +- Version: 3 (0x2) +- Serial Number: 29 (0x1d) +- Signature Algorithm: sha1WithRSAEncryption +- Issuer: ST=Lancashire, C=UK/emailAddress=test@example.com, O=Test intermediate CA +- Validity +- Not Before: Jul 31 21:01:18 2011 GMT +- Not After : Jul 28 21:01:18 2021 GMT +- Subject: CN=example.com +- Subject Public Key Info: +- Public Key Algorithm: rsaEncryption +- Public-Key: (1024 bit) +- Modulus: +- 00:c9:bb:98:5b:27:cd:b1:8a:a9:38:fc:aa:bb:ad: +- a1:ed:cb:94:94:3e:79:90:ae:35:f3:87:b1:2a:4e: +- d5:ff:55:93:e0:1a:68:2a:36:94:05:38:a7:72:64: +- a3:31:0f:61:5c:ec:76:41:f1:35:4a:5e:bc:ef:51: +- 90:9e:33:b4:08:7a:3f:f0:04:a8:46:99:96:25:b3: +- 03:c8:cd:8c:33:42:76:82:b9:db:61:c6:91:ed:76: +- 86:ae:04:38:d7:e5:5c:a9:a9:f9:b6:13:f4:90:40: +- 6d:ec:2f:ba:ed:bc:ff:88:05:f0:7b:c8:ac:bd:d0: +- 72:3a:91:64:86:06:89:66:0d +- Exponent: 65537 (0x10001) +- X509v3 extensions: +- X509v3 Basic Constraints: +- CA:FALSE +- Authority Information Access: +- OCSP - URI:http://ocsp.example.com:8888/ +- +- Signature Algorithm: sha1WithRSAEncryption +- 22:30:97:01:ea:d0:a8:d8:b5:32:97:c8:c9:8b:7d:01:02:53: +- 74:f8:0a:10:dc:fc:73:b2:50:bb:59:47:f3:e4:9f:44:94:d5: +- ca:c0:64:da:83:00:95:43:15:a5:e3:30:ce:66:ca:55:8c:16: +- 03:1e:55:02:8b:c7:ad:ed:2e:ae:ee:31:59:53:37:ff:26:86: +- 93:9d:e2:69:2e:c0:2a:66:38:a5:b5:54:a1:02:0a:83:67:e0: +- 91:cf:fc:09:c3:70:71:b6:cf:fc:d3:e9:9f:f5:1c:4d:55:ec: +- 66:f7:07:71:fc:d6:17:de:e1:ab:e6:f2:7b:83:46:1e:b9:96: +- 95:8f + -----BEGIN CERTIFICATE----- +-MIICNjCCAZ+gAwIBAgIBHTANBgkqhkiG9w0BAQUFADBiMRMwEQYDVQQIEwpMYW5j +-YXNoaXJlMQswCQYDVQQGEwJVSzEfMB0GCSqGSIb3DQEJARYQdGVzdEBleGFtcGxl +-LmNvbTEdMBsGA1UEChMUVGVzdCBpbnRlcm1lZGlhdGUgQ0EwHhcNMTEwNzMxMjEw +-MTE4WhcNMjEwNzI4MjEwMTE4WjAWMRQwEgYDVQQDEwtleGFtcGxlLmNvbTCBnzAN +-BgkqhkiG9w0BAQEFAAOBjQAwgYkCgYEAybuYWyfNsYqpOPyqu62h7cuUlD55kK41 +-84exKk7V/1WT4BpoKjaUBTincmSjMQ9hXOx2QfE1Sl6871GQnjO0CHo/8ASoRpmW +-JbMDyM2MM0J2grnbYcaR7XaGrgQ41+Vcqan5thP0kEBt7C+67bz/iAXwe8isvdBy +-OpFkhgaJZg0CAwEAAaNIMEYwCQYDVR0TBAIwADA5BggrBgEFBQcBAQQtMCswKQYI +-KwY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YbMc5Yyw73hrqVgpe302TdGr5x4vgeQwk99r37v1dmHKWiI9PcQyy/Qp576Y ++V6pdL164D4cD6OgohSzqd0d3BwAvC8lO9MCJiL5l2TiaJpcEMxS8ycQCwaUp6HC1 ++y+HHtfSYu9DRu4PXKccWlQIDAQABo2swaTAOBgNVHQ8BAf8EBAMCBeAwHQYDVR0l ++BBYwFAYIKwYBBQUHAwIGCCsGAQUFBwMEMDgGCCsGAQUFBwEBBCwwKjAoBggrBgEF ++BQcwAYYcaHR0cDovL29jc3AuZXhhbXBsZS5jb206ODg4ODANBgkqhkiG9w0BAQsF ++AAOCAQEAcMAO6aZesrll+VnceYD2A77Uckqu7UaJ+Cno/aXxaZuBVmfyhdUyK9DF ++bqLNGooR2DGbCjnoOpAaNGngfEkLH/aiDOaGgF9hPOfeUo2Axw7ElfVvwoyEy4zy ++h7GLaA491mjg3XF5ZB56wxbWiBO7nvnHP2ln6x8L5A9RZIofxmChwNuDulB5aog5 ++xfoZn8nqM+HQZNUNx5gX/QgPaVu3ytcVy0t8KYQesATc4hu3kaUPP372Unm4qOyA ++WjX8g4zgCs4aVhjNqWEuX4FPyZQeY0IE5BK+H50z0m+rfH02Amlvq7TYpN50A9wL ++qLirP+moVzEWJKJP0HWT/jo7Ze53FA== + -----END CERTIFICATE----- +diff --git a/tests/auto/network/ssl/qsslcertificate/verify-certs/test-intermediate-not-ca-cert.pem b/tests/auto/network/ssl/qsslcertificate/verify-certs/test-intermediate-not-ca-cert.pem +index 34ad2b10a8..836afd85d3 100644 +--- a/tests/auto/network/ssl/qsslcertificate/verify-certs/test-intermediate-not-ca-cert.pem ++++ b/tests/auto/network/ssl/qsslcertificate/verify-certs/test-intermediate-not-ca-cert.pem +@@ -1,54 +1,24 @@ +-Certificate: +- Data: +- Version: 3 (0x2) +- Serial Number: 27 (0x1b) +- Signature Algorithm: sha1WithRSAEncryption +- Issuer: CN=example.com, ST=Lancashire, C=UK/emailAddress=test@example.com, O=Some organisation +- Validity +- Not Before: Jul 31 21:01:18 2011 GMT +- Not After : Jul 28 21:01:18 2021 GMT +- Subject: CN=example.com +- Subject Public Key Info: +- Public Key Algorithm: rsaEncryption +- Public-Key: (1024 bit) +- Modulus: +- 00:ea:d6:97:b5:3c:f4:37:8a:58:b4:7a:49:31:55: +- dd:c8:84:ee:36:f6:72:3a:31:99:d1:df:af:bb:f9: +- 17:e9:d8:47:d2:20:4b:94:ce:ea:c1:6b:23:9a:da: +- 02:41:29:51:34:05:13:c0:98:4d:87:f8:91:a8:85: +- 81:e4:ab:26:3d:26:59:29:16:7d:04:db:57:7b:f0: +- b6:2b:5d:cf:e7:82:ba:83:a7:bc:63:43:03:2a:2b: +- 18:40:89:4c:1e:90:bc:bf:10:24:81:50:0d:2e:e8: +- 8e:a9:0a:fc:f8:cd:97:98:3c:cc:55:b7:f2:b2:0d: +- 0e:36:53:3a:b2:d0:45:90:8b +- Exponent: 65537 (0x10001) +- X509v3 extensions: +- X509v3 Basic Constraints: +- CA:FALSE +- Authority Information Access: +- OCSP - URI:http://ocsp.example.com:8888/ +- +- Signature Algorithm: sha1WithRSAEncryption +- 82:d8:53:9c:d8:0b:0a:b3:9d:b4:0a:9f:93:ec:96:a6:31:6b: +- 79:c9:d2:1c:76:0b:b7:f3:9f:b9:7a:dd:d7:b7:7b:26:ba:0a: +- 54:2a:a3:ad:89:8e:3c:b8:8e:ea:09:53:58:73:9a:b3:a0:40: +- 90:02:f2:60:04:b8:f0:2a:61:bd:91:9b:5e:81:5f:bf:cc:f2: +- 33:33:8a:70:07:f5:ea:c0:05:38:34:f7:dc:ea:0c:74:01:5d: +- dd:92:ab:f2:87:64:1b:7c:be:ae:37:c1:6c:ae:99:73:a5:aa: +- 45:20:32:57:19:cb:30:45:61:2c:3b:23:52:ee:f0:cc:12:80: +- 97:34 + -----BEGIN CERTIFICATE----- +-MIICSTCCAbKgAwIBAgIBGzANBgkqhkiG9w0BAQUFADB1MRQwEgYDVQQDEwtleGFt +-cGxlLmNvbTETMBEGA1U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E----- +diff --git a/tests/auto/network/ssl/qsslcertificate/verify-certs/test-ocsp-good-cert.pem b/tests/auto/network/ssl/qsslcertificate/verify-certs/test-ocsp-good-cert.pem +index 34b26c6d5e..d4cd3e1f92 100644 +--- a/tests/auto/network/ssl/qsslcertificate/verify-certs/test-ocsp-good-cert.pem ++++ b/tests/auto/network/ssl/qsslcertificate/verify-certs/test-ocsp-good-cert.pem +@@ -1,67 +1,24 @@ +-Certificate: +- Data: +- Version: 3 (0x2) +- Serial Number: 1 (0x1) +- Signature Algorithm: sha1WithRSAEncryption +- Issuer: CN=Westpoint Certificate Test CA, ST=Lancashire, C=UK/emailAddress=ca@example.com, O=Westpoint Certificate Test Root Certification Authority +- Validity +- Not Before: Jul 31 21:01:16 2011 GMT +- Not After : Jul 28 21:01:16 2021 GMT +- Subject: CN=example.com, ST=Lancashire, C=UK/emailAddress=test@example.com, O=Some organisation +- Subject Public Key Info: +- Public Key Algorithm: rsaEncryption +- Public-Key: (1024 bit) +- Modulus: +- 00:97:c9:92:27:81:a7:4c:64:82:a2:30:d6:07:b7: +- 57:e0:9c:ea:cd:eb:53:be:ea:b6:b5:47:66:d0:68: +- 54:25:a7:ed:21:5c:dc:fd:da:41:f6:c7:c0:35:ae: +- 97:72:fd:8b:af:29:3d:38:5a:67:8b:39:8a:ce:86: +- 25:0f:38:a7:b5:38:b3:8e:81:f0:ea:79:99:cb:f5: +- 23:64:55:f3:4b:a4:b6:23:64:29:ea:ba:f3:29:52: +- a7:7f:32:dc:0d:b6:d9:d4:e6:13:de:01:41:86:9a: +- 2d:8f:bb:0c:18:88:09:ac:d4:6a:e9:cb:8a:17:8a: +- 85:09:a6:ae:a6:1c:05:e9:55 +- Exponent: 65537 (0x10001) +- X509v3 extensions: +- X509v3 Basic Constraints: +- CA:FALSE +- Authority Information Access: +- OCSP - URI:http://ocsp.example.com:8888/ +- +- Signature Algorithm: sha1WithRSAEncryption +- 8b:9b:96:fb:8e:1b:77:f5:70:39:fe:76:51:ac:a9:6b:80:a5: +- b7:95:8b:c3:1a:9c:1f:bb:d1:d1:68:43:40:96:62:d6:a6:da: +- d9:fd:9d:9a:9e:8a:84:fa:f5:54:ce:a8:d7:37:c7:0c:95:fc: +- 11:8b:e9:32:53:e5:59:61:0a:53:70:f3:d6:ed:3f:b1:f4:49: +- bf:86:c1:77:0d:b1:ac:65:7e:62:d2:f2:5a:31:50:a7:ed:28: +- bb:63:d5:f3:4f:43:3a:3f:bf:3b:d0:94:aa:a1:74:95:be:a4: +- 0f:8b:e0:6f:d8:33:84:76:71:b2:da:f4:0e:1e:d2:eb:f0:c3: +- 1e:33:79:21:35:93:18:05:38:db:63:85:1a:e4:84:41:0a:c3: +- fb:fd:5c:69:3d:18:0a:38:b8:16:18:d3:23:b9:51:47:2e:54: +- 08:d1:fc:2e:b6:63:62:78:9c:26:59:c2:5e:5a:38:76:47:e7: +- f0:f8:7b:b7:00:46:34:b0:44:28:a9:33:d7:e5:1d:52:c8:fb: +- 32:a5:25:86:21:0c:80:f0:4b:37:60:a0:45:69:9f:6b:b0:34: +- 91:5e:4c:62:45:99:83:1d:80:48:78:bb:ee:d4:83:39:76:c3: +- e6:fb:31:e9:20:f0:64:90:24:4e:c6:07:75:40:1f:7e:97:77: +- 1f:bf:a2:ef + -----BEGIN CERTIFICATE----- +-MIIDYDCCAkigAwIBAgIBATANBgkqhkiG9w0BAQUFADCBqzEmMCQGA1UEAxMdV2Vz +-dHBvaW50IENlcnRpZmljYXRlIFRlc3QgQ0ExEzARBgNVBAgTCkxhbmNhc2hpcmUx +-CzAJBgNVBAYTAlVLMR0wGwYJKoZIhvcNAQkBFg5jYUBleGFtcGxlLmNvbTFAMD4G +-A1UEChM3V2VzdHBvaW50IENlcnRpZmljYXRlIFRlc3QgUm9vdCBDZXJ0aWZpY2F0 +-aW9uIEF1dGhvcml0eTAeFw0xMTA3MzEyMTAxMTZaFw0yMTA3MjgyMTAxMTZaMHUx +-FDASBgNVBAMTC2V4YW1wbGUuY29tMRMwEQYD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PxLBtmP+lWtXyKap ++wMMNPu6EULAQ2IYcTgafCW9BWR1UWDXHBRO5ytBV4KFrhXiPoPmA4x0ACxnclH41 ++b3Pj0pBur9cQuvap/FSz1uEfJdsYISw6srTfD4zNUuXXhSbz + -----END CERTIFICATE----- diff --git a/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp b/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp index 9ffba1ec94..8114d1a064 100644 --- a/tests/auto/network/ssl/qsslcipher/tst_qsslcipher.cpp @@ -81468,6 +82709,190 @@ index 8ff6d35ba2..d91d93d9ab 100644 } bool tst_QSslKey::fileContainsUnsupportedEllipticCurve(const QString &fileName) const +diff --git a/tests/auto/network/ssl/qsslsocket/certs/fluke.cert b/tests/auto/network/ssl/qsslsocket/certs/fluke.cert +index 069fa6b341..4cc4d9a5ea 100644 +--- a/tests/auto/network/ssl/qsslsocket/certs/fluke.cert ++++ b/tests/auto/network/ssl/qsslsocket/certs/fluke.cert +@@ -1,75 +1,34 @@ +-Certificate: +- Data: +- Version: 3 (0x2) +- Serial Number: 0 (0x0) +- Signature Algorithm: sha1WithRSAEncryption +- Issuer: C=NO, ST=Oslo, L=Nydalen, O=Nokia Corporation and/or its subsidiary(-ies), OU=Development, CN=fluke.troll.no/emailAddress=ahanssen@trolltech.com +- Validity +- Not Before: Dec 4 01:10:32 2007 GMT +- Not After : Apr 21 01:10:32 2035 GMT +- Subject: C=NO, ST=Oslo, O=Nokia Corporation and/or its subsidiary(-ies), OU=Development, CN=fluke.troll.no +- Subject Public Key Info: +- Public Key Algorithm: rsaEncryption +- RSA Public Key: (1024 bit) +- Modulus (1024 bit): +- 00:a7:c8:a0:4a:c4:19:05:1b:66:ba:32:e2:d2:f1: +- 1c:6f:17:82:e4:39:2e:01:51:90:db:04:34:32:11: +- 21:c2:0d:6f:59:d8:53:90:54:3f:83:8f:a9:d3:b3: +- d5:ee:1a:9b:80:ae:c3:25:c9:5e:a5:af:4b:60:05: +- aa:a0:d1:91:01:1f:ca:04:83:e3:58:1c:99:32:45: +- 84:70:72:58:03:98:4a:63:8b:41:f5:08:49:d2:91: +- 02:60:6b:e4:64:fe:dd:a0:aa:74:08:e9:34:4c:91: +- 5f:12:3d:37:4d:54:2c:ad:7f:5b:98:60:36:02:8c: +- 3b:f6:45:f3:27:6a:9b:94:9d +- Exponent: 65537 (0x10001) +- X509v3 extensions: +- X509v3 Basic Constraints: +- CA:FALSE +- Netscape Comment: +- OpenSSL Generated Certificate +- X509v3 Subject Key Identifier: +- 21:85:04:3D:23:01:66:E5:F7:9F:1A:84:24:8A:AF:0A:79:F4:E5:AC +- X509v3 Authority Key Identifier: +- DirName:/C=NO/ST=Oslo/L=Nydalen/O=Nokia Corporation and/or its subsidiary(-ies)/OU=Development/CN=fluke.troll.no/emailAddress=ahanssen@trolltech.com +- serial:8E:A8:B4:E8:91:B7:54:2E +- +- Signature Algorithm: sha1WithRSAEncryption +- 6d:57:5f:d1:05:43:f0:62:05:ec:2a:71:a5:dc:19:08:f2:c4: +- a6:bd:bb:25:d9:ca:89:01:0e:e4:cf:1f:c1:8c:c8:24:18:35: +- 53:59:7b:c0:43:b4:32:e6:98:b2:a6:ef:15:05:0b:48:5f:e1: +- a0:0c:97:a9:a1:77:d8:35:18:30:bc:a9:8f:d3:b7:54:c7:f1: +- a9:9e:5d:e6:19:bf:f6:3c:5b:2b:d8:e4:3e:62:18:88:8b:d3: +- 24:e1:40:9b:0c:e6:29:16:62:ab:ea:05:24:70:36:aa:55:93: +- ef:02:81:1b:23:10:a2:04:eb:56:95:75:fc:f8:94:b1:5d:42: +- c5:3f:36:44:85:5d:3a:2e:90:46:8a:a2:b9:6f:87:ae:0c:15: +- 40:19:31:90:fc:3b:25:bb:ae:f1:66:13:0d:85:90:d9:49:34: +- 8f:f2:5d:f9:7a:db:4d:5d:27:f6:76:9d:35:8c:06:a6:4c:a3: +- b1:b2:b6:6f:1d:d7:a3:00:fd:72:eb:9e:ea:44:a1:af:21:34: +- 7d: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A02XTYi+YxCI9kRZLGkM3FbgtOuTLPl0Z9y+kiPc9F ++uCSC03anBEqv+vDSI8+wODymQ/IJ3Jyz1lxIRDfp4qAekmy0jU2c91VOHHEmOmqq ++kqygGFRdwbe99m9yP63r6q0b5K3X2UnJ6bns0hmTwThYwpVPXLU8jdaTddbMukN2 ++/Ef96Tsw8nWOEOPMySHOTIPgwyZRp26b0kA9EmhLwOP401SxXVQCmSRmtwNagmtg ++jJKmZoYBN+//D45ibK8z6Q0oOm9P+Whf/uUXehcRxBxyV3xz7k0wKGQbHj/ddwcy ++IUoIN4lrAlib+lK170kTKN352PDmrpo2gmIzPEsfurKAIMSelDl6H+kih16BtZ8y ++Nz6fh9Soqrg3OSAware8pxV7k51crBMoPLN78KoRV8MFCK4K7Fddq4rRISq6hiXq ++r1nsjoEPuKM9huprmZVZe9t5YcDa2I+wb3IiE3uwpZbAdaLDyQ5n6F/qpsiIkZXn ++gtcF7oqpG5oYrwCcZ53y/ezUgUg7PlSz2XwAGvQtgg== + -----END CERTIFICATE----- +diff --git a/tests/auto/network/ssl/qsslsocket/certs/fluke.key b/tests/auto/network/ssl/qsslsocket/certs/fluke.key +index 9d1664d609..337ce541a6 100644 +--- a/tests/auto/network/ssl/qsslsocket/certs/fluke.key ++++ b/tests/auto/network/ssl/qsslsocket/certs/fluke.key +@@ -1,15 +1,52 @@ +------BEGIN RSA PRIVATE KEY----- +-MIICXAIBAAKBgQCnyKBKxBkFG2a6MuLS8RxvF4LkOS4BUZDbBDQyESHCDW9Z2FOQ +-VD+Dj6nTs9XuGpuArsMlyV6lr0tgBaqg0ZEBH8oEg+NYHJkyRYRwclgDmEpji0H1 +-CEnSkQJga+Rk/t2gqnQI6TRMkV8SPTdNVCytf1uYYDYCjDv2RfMnapuUnQIDAQAB +-AoGANFzLkanTeSGNFM0uttBipFT9F4a00dqHz6JnO7zXAT26I5r8sU1pqQBb6uLz +-/+Qz5Zwk8RUAQcsMRgJetuPQUb0JZjF6Duv24hNazqXBCu7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fgRaPDbj ++3r3tv9g0b4YLxxBy52pFscj/soXRai17SS7UZwA2QK+XzgDYbDcLNC6mIsTQG4Gx ++dsWk3/zs3KuUSQaehmwrWK+fIUK38c1pLK8v7LoxrLkqxlHwZ04RthHw8KTthH7X ++Pnl1J0LF8CSeOyfWLSuPUfkT0GEzptnNHpEbaHfQM6R6eaGhVJPF6AZme4y6YYgg ++m2ihhSt1n0XVEWpHYWjxFy3mK2mz75unFC4LM+NEY2p2zuUQoCw7NjnY3QYrfCnx ++rRMCggEAXeXsMSLFjjyuoL7iKbAxo52HD/P0fBoy58LyRcwfNVr0lvYan4pYEx+o ++KijIh9K16PqXZXKMA9v003B+ulmF8bJ7SddCZ5NGvnFhUTDe4DdTKgp2RuwQ3Bsc ++3skPIDbhVETyOLCtys34USHrq8U/0DlGY3eLRfxw9GnbKxSBGa/KEu/qQLPNUo50 ++7xHZDg7GKeC3kqNJeqKM9rkp0VzIGkEnaD9127LeNDmERDfftxJzFoC/THvUBLfU ++6Sus2ZYwRE8VFvKC30Q45t/c54X3IuhYvAuiCuTmyfE4ruyzyOwKzhUkeeLq1APX ++g0veFbyfzlJ0q8qzD/iffqqIa2ZSmQ== ++-----END PRIVATE KEY----- diff --git a/tests/auto/network/ssl/qsslsocket/certs/qtiochain.crt b/tests/auto/network/ssl/qsslsocket/certs/qtiochain.crt new file mode 100644 index 0000000000..9634bcef68 @@ -82950,6 +84375,41 @@ index 6010772be7..1108acd027 100644 +[updateScrollBars] +macos + +diff --git a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp +index 94cb42cc00..e818514a79 100644 +--- a/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp ++++ b/tests/auto/widgets/widgets/qpushbutton/tst_qpushbutton.cpp +@@ -68,6 +68,7 @@ private slots: + void taskQTBUG_20191_shortcutWithKeypadModifer(); + void emitReleasedAfterChange(); + void hitButton(); ++ void iconOnlyStyleSheet(); + + protected slots: + void resetCounters(); +@@ -695,5 +696,22 @@ void tst_QPushButton::hitButton() + QVERIFY(!button2->hitButton(QPoint(2, 2))); + } + ++/* ++ Test that a style sheet with only icon doesn't crash. ++ QTBUG-91735 ++*/ ++void tst_QPushButton::iconOnlyStyleSheet() ++{ ++ QIcon icon(":/qt-project.org/styles/commonstyle/images/dvd-32.png"); ++ QVERIFY(!icon.isNull()); ++ QPushButton pb; ++ pb.setStyleSheet("QPushButton {" ++ "icon: url(:/qt-project.org/styles/commonstyle/images/dvd-32.png);" ++ "border: red;" ++ "}"); ++ pb.show(); ++ QVERIFY(QTest::qWaitForWindowExposed(&pb)); ++} ++ + QTEST_MAIN(tst_QPushButton) + #include "tst_qpushbutton.moc" diff --git a/tests/libfuzzer/README b/tests/libfuzzer/README index 16e70e9bee..d0ab4fdda8 100644 --- a/tests/libfuzzer/README diff --git a/desktop/toolkit/qt5/qt5-base/pspec.xml b/desktop/toolkit/qt5/qt5-base/pspec.xml index 5b13d11717..8fb5432bf8 100755 --- a/desktop/toolkit/qt5/qt5-base/pspec.xml +++ b/desktop/toolkit/qt5/qt5-base/pspec.xml @@ -281,7 +281,7 @@ - 2021-10-04 + 2021-11-10 5.15.2 Rebuild kde patch. Mustafa Cinasal diff --git a/desktop/toolkit/qt5/qt5-declarative/files/qt_kde.patch b/desktop/toolkit/qt5/qt5-declarative/files/qt_kde.patch index 0e49255eab..35d022edf1 100644 --- a/desktop/toolkit/qt5/qt5-declarative/files/qt_kde.patch +++ b/desktop/toolkit/qt5/qt5-declarative/files/qt_kde.patch @@ -443,6 +443,19 @@ index e2d3b98ff6..6eece147a6 100644 break; } +diff --git a/src/qml/memory/qv4mm.cpp b/src/qml/memory/qv4mm.cpp +index 06caf04e5a..da149a67c4 100644 +--- a/src/qml/memory/qv4mm.cpp ++++ b/src/qml/memory/qv4mm.cpp +@@ -981,7 +981,7 @@ void MemoryManager::sweep(bool lastSweep, ClassDestroyStatsCallback classCountPt + + if (MultiplyWrappedQObjectMap *multiplyWrappedQObjects = engine->m_multiplyWrappedQObjects) { + for (MultiplyWrappedQObjectMap::Iterator it = multiplyWrappedQObjects->begin(); it != multiplyWrappedQObjects->end();) { +- if (!it.value().isNullOrUndefined()) ++ if (it.value().isNullOrUndefined()) + it = multiplyWrappedQObjects->erase(it); + else + ++it; diff --git a/src/qml/qml/qqmlextensionplugin.h b/src/qml/qml/qqmlextensionplugin.h index ef7ff422cd..afb3f99c4a 100644 --- a/src/qml/qml/qqmlextensionplugin.h @@ -585,7 +598,7 @@ index a7e37d1964..01b2f58f16 100644 // diff --git a/src/qmlmodels/qqmldelegatemodel.cpp b/src/qmlmodels/qqmldelegatemodel.cpp -index 725b9e8bc3..12c3d11937 100644 +index 725b9e8bc3..8a74a854f4 100644 --- a/src/qmlmodels/qqmldelegatemodel.cpp +++ b/src/qmlmodels/qqmldelegatemodel.cpp @@ -1,6 +1,6 @@ @@ -596,7 +609,81 @@ index 725b9e8bc3..12c3d11937 100644 ** Contact: https://www.qt.io/licensing/ ** ** This file is part of the QtQml module of the Qt Toolkit. -@@ -2379,6 +2379,15 @@ void QQmlDelegateModelItem::destroyObject() +@@ -389,6 +389,12 @@ void QQmlDelegateModelPrivate::connectToAbstractItemModel() + q, QQmlDelegateModel, SLOT(_q_rowsRemoved(QModelIndex,int,int))); + qmlobject_connect(aim, QAbstractItemModel, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), + q, QQmlDelegateModel, SLOT(_q_rowsAboutToBeRemoved(QModelIndex,int,int))); ++ qmlobject_connect(aim, QAbstractItemModel, SIGNAL(columnsInserted(QModelIndex,int,int)), ++ q, QQmlDelegateModel, SLOT(_q_columnsInserted(QModelIndex,int,int))); ++ qmlobject_connect(aim, QAbstractItemModel, SIGNAL(columnsRemoved(QModelIndex,int,int)), ++ q, QQmlDelegateModel, SLOT(_q_columnsRemoved(QModelIndex,int,int))); ++ qmlobject_connect(aim, QAbstractItemModel, SIGNAL(columnsMoved(QModelIndex,int,int,QModelIndex,int)), ++ q, QQmlDelegateModel, SLOT(_q_columnsMoved(QModelIndex,int,int,QModelIndex,int))); + qmlobject_connect(aim, QAbstractItemModel, SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector)), + q, QQmlDelegateModel, SLOT(_q_dataChanged(QModelIndex,QModelIndex,QVector))); + qmlobject_connect(aim, QAbstractItemModel, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), +@@ -413,6 +419,12 @@ void QQmlDelegateModelPrivate::disconnectFromAbstractItemModel() + q, SLOT(_q_rowsAboutToBeRemoved(QModelIndex,int,int))); + QObject::disconnect(aim, SIGNAL(rowsRemoved(QModelIndex,int,int)), + q, SLOT(_q_rowsRemoved(QModelIndex,int,int))); ++ QObject::disconnect(aim, SIGNAL(columnsInserted(QModelIndex,int,int)), q, ++ SLOT(_q_columnsInserted(QModelIndex,int,int))); ++ QObject::disconnect(aim, SIGNAL(columnsRemoved(QModelIndex,int,int)), q, ++ SLOT(_q_columnsRemoved(QModelIndex,int,int))); ++ QObject::disconnect(aim, SIGNAL(columnsMoved(QModelIndex,int,int,QModelIndex,int)), q, ++ SLOT(_q_columnsMoved(QModelIndex,int,int,QModelIndex,int))); + QObject::disconnect(aim, SIGNAL(dataChanged(QModelIndex,QModelIndex,QVector)), + q, SLOT(_q_dataChanged(QModelIndex,QModelIndex,QVector))); + QObject::disconnect(aim, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), +@@ -1609,7 +1621,7 @@ void QQmlDelegateModelPrivate::itemsRemoved( + removed[i] = 0; + + for (const Compositor::Remove &remove : removes) { +- for (; cacheIndex < remove.cacheIndex; ++cacheIndex) ++ for (; cacheIndex < remove.cacheIndex && cacheIndex < m_cache.size(); ++cacheIndex) + incrementIndexes(m_cache.at(cacheIndex), m_groupCount, removed); + + for (int i = 1; i < m_groupCount; ++i) { +@@ -1953,6 +1965,38 @@ void QQmlDelegateModel::_q_rowsMoved( + } + } + ++void QQmlDelegateModel::_q_columnsInserted(const QModelIndex &parent, int begin, int end) ++{ ++ Q_D(QQmlDelegateModel); ++ Q_UNUSED(end); ++ if (parent == d->m_adaptorModel.rootIndex && begin == 0) { ++ // mark all items as changed ++ _q_itemsChanged(0, d->m_count, QVector()); ++ } ++} ++ ++void QQmlDelegateModel::_q_columnsRemoved(const QModelIndex &parent, int begin, int end) ++{ ++ Q_D(QQmlDelegateModel); ++ Q_UNUSED(end); ++ if (parent == d->m_adaptorModel.rootIndex && begin == 0) { ++ // mark all items as changed ++ _q_itemsChanged(0, d->m_count, QVector()); ++ } ++} ++ ++void QQmlDelegateModel::_q_columnsMoved(const QModelIndex &parent, int start, int end, ++ const QModelIndex &destination, int column) ++{ ++ Q_D(QQmlDelegateModel); ++ Q_UNUSED(end); ++ if ((parent == d->m_adaptorModel.rootIndex && start == 0) ++ || (destination == d->m_adaptorModel.rootIndex && column == 0)) { ++ // mark all items as changed ++ _q_itemsChanged(0, d->m_count, QVector()); ++ } ++} ++ + void QQmlDelegateModel::_q_dataChanged(const QModelIndex &begin, const QModelIndex &end, const QVector &roles) + { + Q_D(QQmlDelegateModel); +@@ -2379,6 +2423,15 @@ void QQmlDelegateModelItem::destroyObject() data->ownContext = nullptr; data->context = nullptr; } @@ -612,6 +699,20 @@ index 725b9e8bc3..12c3d11937 100644 object->deleteLater(); if (attached) { +diff --git a/src/qmlmodels/qqmldelegatemodel_p.h b/src/qmlmodels/qqmldelegatemodel_p.h +index 8aab4badca..d140bfbaaf 100644 +--- a/src/qmlmodels/qqmldelegatemodel_p.h ++++ b/src/qmlmodels/qqmldelegatemodel_p.h +@@ -152,6 +152,9 @@ private Q_SLOTS: + void _q_itemsMoved(int from, int to, int count); + void _q_modelReset(); + void _q_rowsInserted(const QModelIndex &,int,int); ++ void _q_columnsInserted(const QModelIndex &, int, int); ++ void _q_columnsRemoved(const QModelIndex &, int, int); ++ void _q_columnsMoved(const QModelIndex &, int, int, const QModelIndex &, int); + void _q_rowsAboutToBeRemoved(const QModelIndex &parent, int begin, int end); + void _q_rowsRemoved(const QModelIndex &,int,int); + void _q_rowsMoved(const QModelIndex &, int, int, const QModelIndex &, int); diff --git a/src/qmlmodels/qqmllistmodel.cpp b/src/qmlmodels/qqmllistmodel.cpp index e07951cab3..8830e08097 100644 --- a/src/qmlmodels/qqmllistmodel.cpp @@ -793,6 +894,42 @@ index 67c4611d9e..e02df00595 100644 void QQuickItem::setAcceptedMouseButtons(Qt::MouseButtons buttons) { Q_D(QQuickItem); +diff --git a/src/quick/items/qquickitemanimation.cpp b/src/quick/items/qquickitemanimation.cpp +index 23694e2de3..dfb56ccc00 100644 +--- a/src/quick/items/qquickitemanimation.cpp ++++ b/src/quick/items/qquickitemanimation.cpp +@@ -230,8 +230,8 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QQuickStateActions &act + { + Q_D(QQuickParentAnimation); + +- QQuickParentAnimationData *data = new QQuickParentAnimationData; +- QQuickParentAnimationData *viaData = new QQuickParentAnimationData; ++ std::unique_ptr data(new QQuickParentAnimationData); ++ std::unique_ptr viaData(new QQuickParentAnimationData); + + bool hasExplicit = false; + if (d->target && d->newParent) { +@@ -377,8 +377,8 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QQuickStateActions &act + QParallelAnimationGroupJob *ag = new QParallelAnimationGroupJob; + + if (d->via) +- viaAction->setAnimAction(viaData); +- targetAction->setAnimAction(data); ++ viaAction->setAnimAction(viaData.release()); ++ targetAction->setAnimAction(data.release()); + + //take care of any child animations + bool valid = d->defaultProperty.isValid(); +@@ -405,9 +405,6 @@ QAbstractAnimationJob* QQuickParentAnimation::transition(QQuickStateActions &act + topLevelGroup->appendAnimation(d->via ? viaAction : targetAction); + } + return initInstance(topLevelGroup); +- } else { +- delete data; +- delete viaData; + } + return nullptr; + } diff --git a/src/quick/items/qquickloader.cpp b/src/quick/items/qquickloader.cpp index 8cd63a4236..a6f7009946 100644 --- a/src/quick/items/qquickloader.cpp @@ -827,6 +964,44 @@ index fba383e268..0d63618622 100644 QPointF startScene; QPointF targetStartPos; QPointF lastPos; +diff --git a/src/quick/items/qquickshadereffectsource.cpp b/src/quick/items/qquickshadereffectsource.cpp +index 4f61d61309..b298ed74da 100644 +--- a/src/quick/items/qquickshadereffectsource.cpp ++++ b/src/quick/items/qquickshadereffectsource.cpp +@@ -344,7 +344,6 @@ void QQuickShaderEffectSource::setSourceItem(QQuickItem *item) + d->refFromEffectItem(m_hideSource); + d->addItemChangeListener(this, QQuickItemPrivate::Geometry); + connect(m_sourceItem, SIGNAL(destroyed(QObject*)), this, SLOT(sourceItemDestroyed(QObject*))); +- connect(m_sourceItem, SIGNAL(parentChanged(QQuickItem*)), this, SLOT(sourceItemParentChanged(QQuickItem*))); + } else { + qWarning("ShaderEffectSource: sourceItem and ShaderEffectSource must both be children of the same window."); + m_sourceItem = nullptr; +@@ -364,13 +363,6 @@ void QQuickShaderEffectSource::sourceItemDestroyed(QObject *item) + } + + +-void QQuickShaderEffectSource::sourceItemParentChanged(QQuickItem *parent) +-{ +- if (!parent && m_texture) +- m_texture->setItem(0); +-} +- +- + /*! + \qmlproperty rect QtQuick::ShaderEffectSource::sourceRect + +diff --git a/src/quick/items/qquickshadereffectsource_p.h b/src/quick/items/qquickshadereffectsource_p.h +index 4deb6c70a3..c0a1ccab78 100644 +--- a/src/quick/items/qquickshadereffectsource_p.h ++++ b/src/quick/items/qquickshadereffectsource_p.h +@@ -173,7 +173,6 @@ Q_SIGNALS: + private Q_SLOTS: + void sourceItemDestroyed(QObject *item); + void invalidateSceneGraph(); +- void sourceItemParentChanged(QQuickItem *parent); + + protected: + void releaseResources() override; diff --git a/src/quick/items/qquicktableview.cpp b/src/quick/items/qquicktableview.cpp index 7b73fcb393..1349d308d7 100644 --- a/src/quick/items/qquicktableview.cpp @@ -930,10 +1105,29 @@ index 97f6689d8a..b3a5270e9b 100644 \sa QQmlComponent::createWithInitialProperties() \since 5.14 diff --git a/src/quick/items/qquickwindow.cpp b/src/quick/items/qquickwindow.cpp -index d0c9ad5454..9ff91eb9a0 100644 +index d0c9ad5454..fbb807ca96 100644 --- a/src/quick/items/qquickwindow.cpp +++ b/src/quick/items/qquickwindow.cpp -@@ -2864,6 +2864,14 @@ void QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, QQuickPo +@@ -450,15 +450,14 @@ void QQuickWindow::physicalDpiChanged() + void QQuickWindow::handleScreenChanged(QScreen *screen) + { + Q_D(QQuickWindow); ++ disconnect(d->physicalDpiChangedConnection); + if (screen) { + physicalDpiChanged(); + // When physical DPI changes on the same screen, either the resolution or the device pixel + // ratio changed. We must check what it is. Device pixel ratio does not have its own + // ...Changed() signal. +- d->physicalDpiChangedConnection = connect(screen, SIGNAL(physicalDotsPerInchChanged(qreal)), +- this, SLOT(physicalDpiChanged())); +- } else { +- disconnect(d->physicalDpiChangedConnection); ++ d->physicalDpiChangedConnection = connect(screen, &QScreen::physicalDotsPerInchChanged, ++ this, &QQuickWindow::physicalDpiChanged); + } + + d->forcePolish(); +@@ -2864,6 +2863,14 @@ void QQuickWindowPrivate::deliverMatchingPointsToItem(QQuickItem *item, QQuickPo { Q_Q(QQuickWindow); QQuickItemPrivate *itemPrivate = QQuickItemPrivate::get(item); @@ -960,6 +1154,361 @@ index 80e59563c7..97680569e7 100644 QT_BEGIN_NAMESPACE +diff --git a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp +index 3c60f830de..0fd6581dc4 100644 +--- a/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp ++++ b/src/quick/scenegraph/qsgdefaultglyphnode_p.cpp +@@ -428,6 +428,18 @@ QSGTextMaskRhiShader::QSGTextMaskRhiShader(QFontEngine::GlyphFormat glyphFormat) + QStringLiteral(":/qt-project.org/scenegraph/shaders_ng/textmask.frag.qsb")); + } + ++enum UbufOffset { ++ ModelViewMatrixOffset = 0, ++ ProjectionMatrixOffset = ModelViewMatrixOffset + 64, ++ ColorOffset = ProjectionMatrixOffset + 64, ++ TextureScaleOffset = ColorOffset + 16, ++ DprOffset = TextureScaleOffset + 8, ++ ++ // + 1 float padding (vec4 must be aligned to 16) ++ StyleColorOffset = DprOffset + 4 + 4, ++ ShiftOffset = StyleColorOffset + 16 ++}; ++ + bool QSGTextMaskRhiShader::updateUniformData(RenderState &state, + QSGMaterial *newMaterial, QSGMaterial *oldMaterial) + { +@@ -443,11 +455,14 @@ bool QSGTextMaskRhiShader::updateUniformData(RenderState &state, + + bool changed = false; + QByteArray *buf = state.uniformData(); +- Q_ASSERT(buf->size() >= 92); ++ Q_ASSERT(buf->size() >= DprOffset + 4); + + if (state.isMatrixDirty()) { +- const QMatrix4x4 m = state.combinedMatrix(); +- memcpy(buf->data(), m.constData(), 64); ++ const QMatrix4x4 mv = state.modelViewMatrix(); ++ memcpy(buf->data() + ModelViewMatrixOffset, mv.constData(), 64); ++ const QMatrix4x4 p = state.projectionMatrix(); ++ memcpy(buf->data() + ProjectionMatrixOffset, p.constData(), 64); ++ + changed = true; + } + +@@ -456,13 +471,13 @@ bool QSGTextMaskRhiShader::updateUniformData(RenderState &state, + if (updated || !oldMat || oldRtex != newRtex) { + const QVector2D textureScale = QVector2D(1.0f / mat->rhiGlyphCache()->width(), + 1.0f / mat->rhiGlyphCache()->height()); +- memcpy(buf->data() + 64 + 16, &textureScale, 8); ++ memcpy(buf->data() + TextureScaleOffset, &textureScale, 8); + changed = true; + } + + if (!oldMat) { + float dpr = state.devicePixelRatio(); +- memcpy(buf->data() + 64 + 16 + 8, &dpr, 4); ++ memcpy(buf->data() + DprOffset, &dpr, 4); + } + + // move texture uploads/copies onto the renderer's soon-to-be-committed list +@@ -510,11 +525,11 @@ bool QSG8BitTextMaskRhiShader::updateUniformData(RenderState &state, + QSGTextMaskMaterial *oldMat = static_cast(oldMaterial); + + QByteArray *buf = state.uniformData(); +- Q_ASSERT(buf->size() >= 80); ++ Q_ASSERT(buf->size() >= ColorOffset + 16); + + if (oldMat == nullptr || mat->color() != oldMat->color() || state.isOpacityDirty()) { + const QVector4D color = qsg_premultiply(mat->color(), state.opacity()); +- memcpy(buf->data() + 64, &color, 16); ++ memcpy(buf->data() + ColorOffset, &color, 16); + changed = true; + } + +@@ -553,12 +568,12 @@ bool QSG24BitTextMaskRhiShader::updateUniformData(RenderState &state, + QSGTextMaskMaterial *oldMat = static_cast(oldMaterial); + + QByteArray *buf = state.uniformData(); +- Q_ASSERT(buf->size() >= 92); ++ Q_ASSERT(buf->size() >= ColorOffset + 16); + + if (oldMat == nullptr || mat->color() != oldMat->color() || state.isOpacityDirty()) { + // shader takes vec4 but uses alpha only; coloring happens via the blend constant + const QVector4D color = qsg_premultiply(mat->color(), state.opacity()); +- memcpy(buf->data() + 64, &color, 16); ++ memcpy(buf->data() + ColorOffset, &color, 16); + changed = true; + } + +@@ -608,12 +623,12 @@ bool QSG32BitColorTextRhiShader::updateUniformData(RenderState &state, + QSGTextMaskMaterial *oldMat = static_cast(oldMaterial); + + QByteArray *buf = state.uniformData(); +- Q_ASSERT(buf->size() >= 92); ++ Q_ASSERT(buf->size() >= ColorOffset + 16); + + if (oldMat == nullptr || mat->color() != oldMat->color() || state.isOpacityDirty()) { + // shader takes vec4 but uses alpha only + const QVector4D color(0, 0, 0, mat->color().w() * state.opacity()); +- memcpy(buf->data() + 64, &color, 16); ++ memcpy(buf->data() + ColorOffset, &color, 16); + changed = true; + } + +@@ -649,20 +664,17 @@ bool QSGStyledTextRhiShader::updateUniformData(RenderState &state, + QSGStyledTextMaterial *oldMat = static_cast(oldMaterial); + + QByteArray *buf = state.uniformData(); +- Q_ASSERT(buf->size() >= 120); +- +- // matrix..dpr + 1 float padding (vec4 must be aligned to 16) +- const int startOffset = 64 + 16 + 8 + 4 + 4; ++ Q_ASSERT(buf->size() >= ShiftOffset + 8); + + if (oldMat == nullptr || mat->styleColor() != oldMat->styleColor() || state.isOpacityDirty()) { + const QVector4D styleColor = qsg_premultiply(mat->styleColor(), state.opacity()); +- memcpy(buf->data() + startOffset, &styleColor, 16); ++ memcpy(buf->data() + StyleColorOffset, &styleColor, 16); + changed = true; + } + + if (oldMat == nullptr || oldMat->styleShift() != mat->styleShift()) { + const QVector2D v = mat->styleShift(); +- memcpy(buf->data() + startOffset + 16, &v, 8); ++ memcpy(buf->data() + ShiftOffset, &v, 8); + changed = true; + } + +diff --git a/src/quick/scenegraph/shaders_ng/24bittextmask.frag b/src/quick/scenegraph/shaders_ng/24bittextmask.frag +index bc3826a924..ed8da4cd30 100644 +--- a/src/quick/scenegraph/shaders_ng/24bittextmask.frag ++++ b/src/quick/scenegraph/shaders_ng/24bittextmask.frag +@@ -6,8 +6,9 @@ layout(location = 0) out vec4 fragColor; + layout(binding = 1) uniform sampler2D _qt_texture; + + layout(std140, binding = 0) uniform buf { +- mat4 matrix; +- vec4 color; // only alpha is used, but must be vec4 due to layout compat ++ mat4 modelViewMatrix; ++ mat4 projectionMatrix; ++ vec4 color; + vec2 textureScale; + float dpr; + } ubuf; +diff --git a/src/quick/scenegraph/shaders_ng/32bitcolortext.frag b/src/quick/scenegraph/shaders_ng/32bitcolortext.frag +index 63e445f90b..4198a4d339 100644 +--- a/src/quick/scenegraph/shaders_ng/32bitcolortext.frag ++++ b/src/quick/scenegraph/shaders_ng/32bitcolortext.frag +@@ -6,8 +6,9 @@ layout(location = 0) out vec4 fragColor; + layout(binding = 1) uniform sampler2D _qt_texture; + + layout(std140, binding = 0) uniform buf { +- mat4 matrix; +- vec4 color; // only alpha is used, but must be vec4 due to layout compat ++ mat4 modelViewMatrix; ++ mat4 projectionMatrix; ++ vec4 color; + vec2 textureScale; + float dpr; + } ubuf; +diff --git a/src/quick/scenegraph/shaders_ng/8bittextmask.frag b/src/quick/scenegraph/shaders_ng/8bittextmask.frag +index 6304e821ff..a06743876d 100644 +--- a/src/quick/scenegraph/shaders_ng/8bittextmask.frag ++++ b/src/quick/scenegraph/shaders_ng/8bittextmask.frag +@@ -6,7 +6,8 @@ layout(location = 0) out vec4 fragColor; + layout(binding = 1) uniform sampler2D _qt_texture; + + layout(std140, binding = 0) uniform buf { +- mat4 matrix; ++ mat4 modelViewMatrix; ++ mat4 projectionMatrix; + vec4 color; + vec2 textureScale; + float dpr; +diff --git a/src/quick/scenegraph/shaders_ng/8bittextmask_a.frag b/src/quick/scenegraph/shaders_ng/8bittextmask_a.frag +index 0d0fa1cd3a..f725cbc5e7 100644 +--- a/src/quick/scenegraph/shaders_ng/8bittextmask_a.frag ++++ b/src/quick/scenegraph/shaders_ng/8bittextmask_a.frag +@@ -6,7 +6,8 @@ layout(location = 0) out vec4 fragColor; + layout(binding = 1) uniform sampler2D _qt_texture; + + layout(std140, binding = 0) uniform buf { +- mat4 matrix; ++ mat4 modelViewMatrix; ++ mat4 projectionMatrix; + vec4 color; + vec2 textureScale; + float dpr; +diff --git a/src/quick/scenegraph/shaders_ng/outlinedtext.frag b/src/quick/scenegraph/shaders_ng/outlinedtext.frag +index 947d161a50..e2f82d3845 100644 +--- a/src/quick/scenegraph/shaders_ng/outlinedtext.frag ++++ b/src/quick/scenegraph/shaders_ng/outlinedtext.frag +@@ -11,11 +11,12 @@ layout(location = 0) out vec4 fragColor; + layout(binding = 1) uniform sampler2D _qt_texture; + + layout(std140, binding = 0) uniform buf { +- // must match styledtext +- mat4 matrix; ++ mat4 modelViewMatrix; ++ mat4 projectionMatrix; + vec4 color; + vec2 textureScale; + float dpr; ++ // the above must stay compatible with textmask/8bittextmask + vec4 styleColor; + vec2 shift; + } ubuf; +diff --git a/src/quick/scenegraph/shaders_ng/outlinedtext.vert b/src/quick/scenegraph/shaders_ng/outlinedtext.vert +index 023f9dfdc2..4068e42f28 100644 +--- a/src/quick/scenegraph/shaders_ng/outlinedtext.vert ++++ b/src/quick/scenegraph/shaders_ng/outlinedtext.vert +@@ -10,11 +10,12 @@ layout(location = 3) out vec2 sCoordLeft; + layout(location = 4) out vec2 sCoordRight; + + layout(std140, binding = 0) uniform buf { +- // must match styledtext +- mat4 matrix; ++ mat4 modelViewMatrix; ++ mat4 projectionMatrix; + vec4 color; + vec2 textureScale; + float dpr; ++ // the above must stay compatible with textmask/8bittextmask + vec4 styleColor; + vec2 shift; + } ubuf; +@@ -28,6 +29,6 @@ void main() + sCoordDown = (tCoord - vec2(0.0, 1.0)) * ubuf.textureScale; + sCoordLeft = (tCoord - vec2(-1.0, 0.0)) * ubuf.textureScale; + sCoordRight = (tCoord - vec2(1.0, 0.0)) * ubuf.textureScale; +- vec3 dprSnapPos = floor(vCoord.xyz * ubuf.dpr + 0.5) / ubuf.dpr; +- gl_Position = ubuf.matrix * vec4(dprSnapPos, vCoord.w); ++ vec4 xformed = ubuf.modelViewMatrix * vCoord; ++ gl_Position = ubuf.projectionMatrix * vec4(floor(xformed.xyz * ubuf.dpr + 0.5) / ubuf.dpr, xformed.w); + } +diff --git a/src/quick/scenegraph/shaders_ng/outlinedtext_a.frag b/src/quick/scenegraph/shaders_ng/outlinedtext_a.frag +index 5b7bd9ca82..274d891a3c 100644 +--- a/src/quick/scenegraph/shaders_ng/outlinedtext_a.frag ++++ b/src/quick/scenegraph/shaders_ng/outlinedtext_a.frag +@@ -11,11 +11,12 @@ layout(location = 0) out vec4 fragColor; + layout(binding = 1) uniform sampler2D _qt_texture; + + layout(std140, binding = 0) uniform buf { +- // must match styledtext +- mat4 matrix; ++ mat4 modelViewMatrix; ++ mat4 projectionMatrix; + vec4 color; + vec2 textureScale; + float dpr; ++ // the above must stay compatible with textmask/8bittextmask + vec4 styleColor; + vec2 shift; + } ubuf; +diff --git a/src/quick/scenegraph/shaders_ng/styledtext.frag b/src/quick/scenegraph/shaders_ng/styledtext.frag +index 0b16396037..2e380dfeae 100644 +--- a/src/quick/scenegraph/shaders_ng/styledtext.frag ++++ b/src/quick/scenegraph/shaders_ng/styledtext.frag +@@ -8,7 +8,8 @@ layout(location = 0) out vec4 fragColor; + layout(binding = 1) uniform sampler2D _qt_texture; + + layout(std140, binding = 0) uniform buf { +- mat4 matrix; ++ mat4 modelViewMatrix; ++ mat4 projectionMatrix; + vec4 color; + vec2 textureScale; + float dpr; +diff --git a/src/quick/scenegraph/shaders_ng/styledtext.vert b/src/quick/scenegraph/shaders_ng/styledtext.vert +index beadf07c79..271dae8d8a 100644 +--- a/src/quick/scenegraph/shaders_ng/styledtext.vert ++++ b/src/quick/scenegraph/shaders_ng/styledtext.vert +@@ -7,7 +7,8 @@ layout(location = 0) out vec2 sampleCoord; + layout(location = 1) out vec2 shiftedSampleCoord; + + layout(std140, binding = 0) uniform buf { +- mat4 matrix; ++ mat4 modelViewMatrix; ++ mat4 projectionMatrix; + vec4 color; + vec2 textureScale; + float dpr; +@@ -22,6 +23,6 @@ void main() + { + sampleCoord = tCoord * ubuf.textureScale; + shiftedSampleCoord = (tCoord - ubuf.shift) * ubuf.textureScale; +- vec3 dprSnapPos = floor(vCoord.xyz * ubuf.dpr + 0.5) / ubuf.dpr; +- gl_Position = ubuf.matrix * vec4(dprSnapPos, vCoord.w); ++ vec4 xformed = ubuf.modelViewMatrix * vCoord; ++ gl_Position = ubuf.projectionMatrix * vec4(floor(xformed.xyz * ubuf.dpr + 0.5) / ubuf.dpr, xformed.w); + } +diff --git a/src/quick/scenegraph/shaders_ng/styledtext_a.frag b/src/quick/scenegraph/shaders_ng/styledtext_a.frag +index b673137895..62e162c851 100644 +--- a/src/quick/scenegraph/shaders_ng/styledtext_a.frag ++++ b/src/quick/scenegraph/shaders_ng/styledtext_a.frag +@@ -8,7 +8,8 @@ layout(location = 0) out vec4 fragColor; + layout(binding = 1) uniform sampler2D _qt_texture; + + layout(std140, binding = 0) uniform buf { +- mat4 matrix; ++ mat4 modelViewMatrix; ++ mat4 projectionMatrix; + vec4 color; + vec2 textureScale; + float dpr; +diff --git a/src/quick/scenegraph/shaders_ng/textmask.frag b/src/quick/scenegraph/shaders_ng/textmask.frag +index 518d5c965f..ed8da4cd30 100644 +--- a/src/quick/scenegraph/shaders_ng/textmask.frag ++++ b/src/quick/scenegraph/shaders_ng/textmask.frag +@@ -6,7 +6,8 @@ layout(location = 0) out vec4 fragColor; + layout(binding = 1) uniform sampler2D _qt_texture; + + layout(std140, binding = 0) uniform buf { +- mat4 matrix; ++ mat4 modelViewMatrix; ++ mat4 projectionMatrix; + vec4 color; + vec2 textureScale; + float dpr; +diff --git a/src/quick/scenegraph/shaders_ng/textmask.vert b/src/quick/scenegraph/shaders_ng/textmask.vert +index 9d80d5dadb..e0b3c01bce 100644 +--- a/src/quick/scenegraph/shaders_ng/textmask.vert ++++ b/src/quick/scenegraph/shaders_ng/textmask.vert +@@ -6,7 +6,8 @@ layout(location = 1) in vec2 tCoord; + layout(location = 0) out vec2 sampleCoord; + + layout(std140, binding = 0) uniform buf { +- mat4 matrix; ++ mat4 modelViewMatrix; ++ mat4 projectionMatrix; + vec4 color; + vec2 textureScale; + float dpr; +@@ -17,6 +18,6 @@ out gl_PerVertex { vec4 gl_Position; }; + void main() + { + sampleCoord = tCoord * ubuf.textureScale; +- vec3 dprSnapPos = floor(vCoord.xyz * ubuf.dpr + 0.5) / ubuf.dpr; +- gl_Position = ubuf.matrix * vec4(dprSnapPos, vCoord.w); ++ vec4 xformed = ubuf.modelViewMatrix * vCoord; ++ gl_Position = ubuf.projectionMatrix * vec4(floor(xformed.xyz * ubuf.dpr + 0.5) / ubuf.dpr, xformed.w); + } +diff --git a/src/quick/util/qquickstate.cpp b/src/quick/util/qquickstate.cpp +index 71ab1f4d62..6a72754bde 100644 +--- a/src/quick/util/qquickstate.cpp ++++ b/src/quick/util/qquickstate.cpp +@@ -635,6 +635,11 @@ void QQuickState::apply(QQuickTransition *trans, QQuickState *revert) + } + } + if (!found) { ++ // If revert list contains bindings assigned to deleted objects, we need to ++ // prevent reverting properties of those objects. ++ if (d->revertList.at(ii).binding() && !d->revertList.at(ii).property().object()) { ++ continue; ++ } + QVariant cur = d->revertList.at(ii).property().read(); + QQmlPropertyPrivate::removeBinding(d->revertList.at(ii).property()); + diff --git a/src/quick/util/qquickstyledtext.cpp b/src/quick/util/qquickstyledtext.cpp index 660852ba83..a25af90414 100644 --- a/src/quick/util/qquickstyledtext.cpp @@ -1040,6 +1589,149 @@ index 84f5eebd10..e3cbeb9891 100644 } QTEST_MAIN(tst_qv4debugger) +diff --git a/tests/auto/qml/qjsengine/tst_qjsengine.cpp b/tests/auto/qml/qjsengine/tst_qjsengine.cpp +index 3b7d74df63..b75bf820d5 100644 +--- a/tests/auto/qml/qjsengine/tst_qjsengine.cpp ++++ b/tests/auto/qml/qjsengine/tst_qjsengine.cpp +@@ -102,6 +102,7 @@ private slots: + void valueConversion_RegularExpression(); + void castWithMultipleInheritance(); + void collectGarbage(); ++ void collectGarbageNestedWrappersTwoEngines(); + void gcWithNestedDataStructure(); + void stacktrace(); + void numberParsing_data(); +@@ -1809,6 +1810,44 @@ void tst_QJSEngine::collectGarbage() + QVERIFY(ptr.isNull()); + } + ++class TestObjectContainer : public QObject ++{ ++ Q_OBJECT ++ Q_PROPERTY(QObject *dummy MEMBER m_dummy CONSTANT) ++ ++public: ++ TestObjectContainer() : m_dummy(new QObject(this)) {} ++ ++private: ++ QObject *m_dummy; ++}; ++ ++void tst_QJSEngine::collectGarbageNestedWrappersTwoEngines() ++{ ++ QJSEngine engine1; ++ QJSEngine engine2; ++ ++ TestObjectContainer container; ++ QQmlEngine::setObjectOwnership(&container, QQmlEngine::CppOwnership); ++ ++ engine1.globalObject().setProperty("foobar", engine1.newQObject(&container)); ++ engine2.globalObject().setProperty("foobar", engine2.newQObject(&container)); ++ ++ engine1.evaluate("foobar.dummy.baz = 42"); ++ engine2.evaluate("foobar.dummy.baz = 43"); ++ ++ QCOMPARE(engine1.evaluate("foobar.dummy.baz").toInt(), 42); ++ QCOMPARE(engine2.evaluate("foobar.dummy.baz").toInt(), 43); ++ ++ engine1.collectGarbage(); ++ engine2.collectGarbage(); ++ ++ // The GC should not collect dummy object wrappers neither in engine1 nor engine2, we ++ // verify that by checking whether the baz property still has its previous value. ++ QCOMPARE(engine1.evaluate("foobar.dummy.baz").toInt(), 42); ++ QCOMPARE(engine2.evaluate("foobar.dummy.baz").toInt(), 43); ++} ++ + void tst_QJSEngine::gcWithNestedDataStructure() + { + // The GC must be able to traverse deeply nested objects, otherwise this +diff --git a/tests/auto/qml/qqmldelegatemodel/data/redrawUponColumnChange.qml b/tests/auto/qml/qqmldelegatemodel/data/redrawUponColumnChange.qml +new file mode 100644 +index 0000000000..206133bb39 +--- /dev/null ++++ b/tests/auto/qml/qqmldelegatemodel/data/redrawUponColumnChange.qml +@@ -0,0 +1,11 @@ ++import QtQuick 2.8 ++ ++ListView { ++ id: root ++ width: 200 ++ height: 200 ++ ++ delegate: Text { ++ text: display ++ } ++} +diff --git a/tests/auto/qml/qqmldelegatemodel/qqmldelegatemodel.pro b/tests/auto/qml/qqmldelegatemodel/qqmldelegatemodel.pro +index 7fdd3ab5f1..fbd72f6a44 100644 +--- a/tests/auto/qml/qqmldelegatemodel/qqmldelegatemodel.pro ++++ b/tests/auto/qml/qqmldelegatemodel/qqmldelegatemodel.pro +@@ -2,7 +2,7 @@ CONFIG += testcase + TARGET = tst_qqmldelegatemodel + macos:CONFIG -= app_bundle + +-QT += qml testlib core-private qml-private qmlmodels-private ++QT += qml quick testlib core-private qml-private qmlmodels-private + + SOURCES += tst_qqmldelegatemodel.cpp + +diff --git a/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp b/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp +index 87f42c0c8a..1d338ac330 100644 +--- a/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp ++++ b/tests/auto/qml/qqmldelegatemodel/tst_qqmldelegatemodel.cpp +@@ -27,8 +27,12 @@ + ****************************************************************************/ + + #include ++#include ++#include + #include + #include ++#include ++#include + + #include "../../shared/util.h" + +@@ -42,6 +46,7 @@ public: + private slots: + void valueWithoutCallingObjectFirst_data(); + void valueWithoutCallingObjectFirst(); ++ void redrawUponColumnChange(); + }; + + class AbstractItemModel : public QAbstractItemModel +@@ -134,6 +139,30 @@ void tst_QQmlDelegateModel::valueWithoutCallingObjectFirst() + QCOMPARE(model->variantValue(index, role), expectedValue); + } + ++void tst_QQmlDelegateModel::redrawUponColumnChange() ++{ ++ QStandardItemModel m1; ++ m1.appendRow({ ++ new QStandardItem("Banana"), ++ new QStandardItem("Coconut"), ++ }); ++ ++ QQuickView view(testFileUrl("redrawUponColumnChange.qml")); ++ QCOMPARE(view.status(), QQuickView::Ready); ++ view.show(); ++ QQuickItem *root = view.rootObject(); ++ root->setProperty("model", QVariant::fromValue(&m1)); ++ ++ QObject *item = root->property("currentItem").value(); ++ QVERIFY(item); ++ QCOMPARE(item->property("text").toString(), "Banana"); ++ ++ QVERIFY(root); ++ m1.removeColumn(0); ++ ++ QCOMPARE(item->property("text").toString(), "Coconut"); ++} ++ + QTEST_MAIN(tst_QQmlDelegateModel) + + #include "tst_qqmldelegatemodel.moc" diff --git a/tests/auto/qml/qqmlecmascript/data/proxyIteration.qml b/tests/auto/qml/qqmlecmascript/data/proxyIteration.qml new file mode 100644 index 0000000000..affba7d9f1 @@ -1203,6 +1895,24 @@ index d54e3467b7..1953798a15 100644 QTEST_MAIN(tst_qqmllistmodel) +diff --git a/tests/auto/qml/qv4mm/tst_qv4mm.cpp b/tests/auto/qml/qv4mm/tst_qv4mm.cpp +index 5d635aa63b..824fd89e5b 100644 +--- a/tests/auto/qml/qv4mm/tst_qv4mm.cpp ++++ b/tests/auto/qml/qv4mm/tst_qv4mm.cpp +@@ -76,10 +76,10 @@ void tst_qv4mm::multiWrappedQObjects() + QCOMPARE(engine1.memoryManager->m_pendingFreedObjectWrapperValue.size(), 1); + QCOMPARE(engine2.memoryManager->m_pendingFreedObjectWrapperValue.size(), 0); + +- // Moves the additional WeakValue from m_multiplyWrappedQObjects to +- // m_pendingFreedObjectWrapperValue. It's still alive after all. ++ // The additional WeakValue from m_multiplyWrappedQObjects hasn't been moved ++ // to m_pendingFreedObjectWrapperValue yet. It's still alive after all. + engine1.memoryManager->runGC(); +- QCOMPARE(engine1.memoryManager->m_pendingFreedObjectWrapperValue.size(), 2); ++ QCOMPARE(engine1.memoryManager->m_pendingFreedObjectWrapperValue.size(), 1); + + // engine2 doesn't own the object as engine1 was the first to wrap it above. + // Therefore, no effect here. diff --git a/tests/auto/quick/qquickloader/data/loader-async-race-rect.qml b/tests/auto/quick/qquickloader/data/loader-async-race-rect.qml new file mode 100644 index 0000000000..a56dcea5ad @@ -1276,6 +1986,159 @@ index f4b682f3f4..fe2d71b037 100644 QTEST_MAIN(tst_QQuickLoader) #include "tst_qquickloader.moc" +diff --git a/tests/auto/quick/qquickstates/data/revertNullObjectBinding.qml b/tests/auto/quick/qquickstates/data/revertNullObjectBinding.qml +new file mode 100644 +index 0000000000..dee82f52ed +--- /dev/null ++++ b/tests/auto/quick/qquickstates/data/revertNullObjectBinding.qml +@@ -0,0 +1,48 @@ ++import QtQuick 2.12 ++import Qt.test 1.0 ++ ++Item { ++ id: root ++ readonly property int someProp: 1234 ++ ++ property bool state1Active: false ++ property bool state2Active: false ++ StateGroup { ++ states: [ ++ State { ++ id: state1 ++ name: "state1" ++ when: state1Active ++ changes: [ ++ PropertyChanges { ++ objectName: "propertyChanges1" ++ target: ContainingObj.obj ++ prop: root.someProp ++ } ++ ] ++ } ++ ]} ++ StateGroup { ++ states: [ ++ State { ++ id: state2 ++ name: "state2" ++ when: state2Active ++ changes: [ ++ PropertyChanges { ++ objectName: "propertyChanges2" ++ target: ContainingObj.obj ++ prop: 11111 ++ } ++ ] ++ } ++ ] ++ } ++ ++ Component.onCompleted: { ++ state1Active = true; ++ state2Active = true; ++ ++ ContainingObj.reset() ++ } ++} +diff --git a/tests/auto/quick/qquickstates/tst_qquickstates.cpp b/tests/auto/quick/qquickstates/tst_qquickstates.cpp +index d5fea3cb28..849522454f 100644 +--- a/tests/auto/quick/qquickstates/tst_qquickstates.cpp ++++ b/tests/auto/quick/qquickstates/tst_qquickstates.cpp +@@ -79,6 +79,55 @@ private: + QML_DECLARE_TYPE(MyRect) + QML_DECLARE_TYPEINFO(MyRect, QML_HAS_ATTACHED_PROPERTIES) + ++class RemovableObj : public QObject ++{ ++ Q_OBJECT ++ Q_PROPERTY(int prop READ prop WRITE setProp NOTIFY propChanged) ++ ++public: ++ RemovableObj(QObject *parent) : QObject(parent), m_prop(4321) { } ++ int prop() const { return m_prop; } ++ ++public slots: ++ void setProp(int prop) ++ { ++ if (m_prop == prop) ++ return; ++ ++ m_prop = prop; ++ emit propChanged(m_prop); ++ } ++ ++signals: ++ void propChanged(int prop); ++ ++private: ++ int m_prop; ++}; ++ ++class ContainingObj : public QObject ++{ ++ Q_OBJECT ++ Q_PROPERTY(RemovableObj *obj READ obj NOTIFY objChanged) ++ RemovableObj *m_obj; ++ ++public: ++ ContainingObj() : m_obj(new RemovableObj(this)) { } ++ RemovableObj *obj() const { return m_obj; } ++ ++ Q_INVOKABLE void reset() ++ { ++ if (m_obj) { ++ m_obj->deleteLater(); ++ } ++ ++ m_obj = new RemovableObj(this); ++ emit objChanged(); ++ } ++signals: ++ void objChanged(); ++}; ++ + class tst_qquickstates : public QQmlDataTest + { + Q_OBJECT +@@ -140,12 +189,20 @@ private slots: + void duplicateStateName(); + void trivialWhen(); + void parentChangeCorrectReversal(); ++ void revertNullObjectBinding(); + }; + + void tst_qquickstates::initTestCase() + { + QQmlDataTest::initTestCase(); + qmlRegisterType("Qt.test", 1, 0, "MyRectangle"); ++ qmlRegisterSingletonType( ++ "Qt.test", 1, 0, "ContainingObj", [](QQmlEngine *engine, QJSEngine *) { ++ static ContainingObj instance; ++ engine->setObjectOwnership(&instance, QQmlEngine::CppOwnership); ++ return &instance; ++ }); ++ qmlRegisterUncreatableType("Qt.test", 1, 0, "RemovableObj", "Uncreatable"); + } + + QByteArray tst_qquickstates::fullDataPath(const QString &path) const +@@ -1692,6 +1749,17 @@ void tst_qquickstates::parentChangeCorrectReversal() + QCOMPARE(oldX, stayingRectX.read().toDouble()); + } + ++void tst_qquickstates::revertNullObjectBinding() ++{ ++ QQmlEngine engine; ++ ++ QQmlComponent c(&engine, testFileUrl("revertNullObjectBinding.qml")); ++ QScopedPointer root { c.create() }; ++ QVERIFY(root); ++ QTest::qWait(10); ++ QQmlProperty state2Active(root.get(), "state2Active"); ++ state2Active.write(false); ++} + + QTEST_MAIN(tst_qquickstates) + diff --git a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp b/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp index 54f73c6e0c..d489a873e4 100644 --- a/tests/auto/quick/qquicktableview/tst_qquicktableview.cpp @@ -1534,6 +2397,103 @@ index 541bfdd527..45bcf8a9ce 100644 qquickcanvasitem \ qquickdesignersupport \ qquickscreen \ +diff --git a/tests/manual/scenegraph_lancelot/data/text/text_nativerendering_subpixelpositions.qml b/tests/manual/scenegraph_lancelot/data/text/text_nativerendering_subpixelpositions.qml +new file mode 100644 +index 0000000000..c60fc4d8b0 +--- /dev/null ++++ b/tests/manual/scenegraph_lancelot/data/text/text_nativerendering_subpixelpositions.qml +@@ -0,0 +1,91 @@ ++import QtQuick 2.0 ++ ++//vary font style, native rendering at non-integer offsets ++ ++Item { ++ id: topLevel ++ width: 320 ++ height: 580 ++ ++ Repeater { ++ model: [Text.Normal, Text.Outline, Text.Raised, Text.Sunken] ++ Text { ++ y: 20 * index ++ clip: true ++ renderType: Text.NativeRendering ++ width: parent.width ++ wrapMode: Text.Wrap ++ font.pointSize: 10 ++ style: modelData ++ styleColor: "green" ++ text: "The quick fox jumps in style " + modelData ++ } ++ } ++ ++ Repeater { ++ model: [Text.Normal, Text.Outline, Text.Raised, Text.Sunken] ++ Text { ++ y: 100.5 + 20 * index ++ clip: true ++ renderType: Text.NativeRendering ++ width: parent.width ++ wrapMode: Text.Wrap ++ font.pointSize: 10 ++ style: modelData ++ styleColor: "green" ++ text: "The quick fox jumps in style " + modelData ++ } ++ } ++ ++ Repeater { ++ model: [Text.Normal, Text.Outline, Text.Raised, Text.Sunken] ++ Text { ++ y: 200.5 + 20 * index ++ x: 0.5 ++ clip: true ++ renderType: Text.NativeRendering ++ width: parent.width ++ wrapMode: Text.Wrap ++ font.pointSize: 10 ++ style: modelData ++ styleColor: "green" ++ text: "The quick fox jumps in style " + modelData ++ } ++ } ++ ++ Repeater { ++ model: [Text.Normal, Text.Outline, Text.Raised, Text.Sunken] ++ Text { ++ y: 300.5 + 20 * index ++ x: 0.5 ++ clip: true ++ renderType: Text.NativeRendering ++ width: parent.width ++ wrapMode: Text.Wrap ++ font.pointSize: 10 ++ style: modelData ++ styleColor: "green" ++ text: "The quick fox jumps in style " + modelData ++ } ++ } ++ ++ Repeater { ++ model: [Text.Normal, Text.Outline, Text.Raised, Text.Sunken] ++ Rectangle { ++ y: 400.5 + 20 * index ++ x: 0.5 ++ width: topLevel.width ++ height: topLevel.height ++ clip: true ++ Text { ++ renderType: Text.NativeRendering ++ width: parent.width ++ wrapMode: Text.Wrap ++ font.pointSize: 10 ++ style: modelData ++ styleColor: "green" ++ text: "The quick fox jumps in style " + modelData ++ } ++ } ++ } ++} diff --git a/tools/qmltime/qmltime.pro b/tools/qmltime/qmltime.pro index c915f6e8c1..366d90f75b 100644 --- a/tools/qmltime/qmltime.pro diff --git a/desktop/toolkit/qt5/qt5-declarative/pspec.xml b/desktop/toolkit/qt5/qt5-declarative/pspec.xml index fc860c4be3..946a434616 100755 --- a/desktop/toolkit/qt5/qt5-declarative/pspec.xml +++ b/desktop/toolkit/qt5/qt5-declarative/pspec.xml @@ -70,7 +70,7 @@ - 2021-11-06 + 2021-11-10 5.15.2 Rebuild. Mustafa Cinasal diff --git a/desktop/toolkit/qt5/qt5-svg/files/qt_kde.patch b/desktop/toolkit/qt5/qt5-svg/files/qt_kde.patch index 860adaa131..b3f6c3dd37 100644 --- a/desktop/toolkit/qt5/qt5-svg/files/qt_kde.patch +++ b/desktop/toolkit/qt5/qt5-svg/files/qt_kde.patch @@ -113,7 +113,7 @@ index bd39b2a..4136aaf 100644 QT_END_NAMESPACE diff --git a/src/svg/qsvghandler.cpp b/src/svg/qsvghandler.cpp -index c937254..9dac05c 100644 +index c937254..b542089 100644 --- a/src/svg/qsvghandler.cpp +++ b/src/svg/qsvghandler.cpp @@ -65,6 +65,7 @@ @@ -134,15 +134,188 @@ index c937254..9dac05c 100644 } return val; -@@ -3043,6 +3047,8 @@ static QSvgStyleProperty *createRadialGradientNode(QSvgNode *node, +@@ -724,15 +728,25 @@ static QVector parseNumbersList(const QChar *&str) + return points; + } + +-static inline void parseNumbersArray(const QChar *&str, QVarLengthArray &points) ++static inline void parseNumbersArray(const QChar *&str, QVarLengthArray &points, ++ const char *pattern = nullptr) + { ++ const size_t patternLen = qstrlen(pattern); + while (str->isSpace()) + ++str; + while (isDigit(str->unicode()) || + *str == QLatin1Char('-') || *str == QLatin1Char('+') || + *str == QLatin1Char('.')) { + +- points.append(toDouble(str)); ++ if (patternLen && pattern[points.size() % patternLen] == 'f') { ++ // flag expected, may only be 0 or 1 ++ if (*str != QLatin1Char('0') && *str != QLatin1Char('1')) ++ return; ++ points.append(*str == QLatin1Char('0') ? 0.0 : 1.0); ++ ++str; ++ } else { ++ points.append(toDouble(str)); ++ } + + while (str->isSpace()) + ++str; +@@ -1379,8 +1393,10 @@ static void parseFont(QSvgNode *node, + case FontSizeNone: + break; + case FontSizeValue: { +- QSvgHandler::LengthType dummy; // should always be pixel size +- fontStyle->setSize(parseLength(attributes.fontSize, dummy, handler)); ++ QSvgHandler::LengthType type; ++ qreal fs = parseLength(attributes.fontSize, type, handler); ++ fs = convertToPixels(fs, true, type); ++ fontStyle->setSize(qMin(fs, qreal(0xffff))); + } + break; + default: +@@ -1625,8 +1641,11 @@ static bool parsePathDataFast(const QStringRef &dataStr, QPainterPath &path) + ++str; + QChar endc = *end; + *const_cast(end) = 0; // parseNumbersArray requires 0-termination that QStringRef cannot guarantee ++ const char *pattern = nullptr; ++ if (pathElem == QLatin1Char('a') || pathElem == QLatin1Char('A')) ++ pattern = "rrrffrr"; + QVarLengthArray arg; +- parseNumbersArray(str, arg); ++ parseNumbersArray(str, arg, pattern); + *const_cast(end) = endc; + if (pathElem == QLatin1Char('z') || pathElem == QLatin1Char('Z')) + arg.append(0);//dummy +@@ -2354,6 +2373,27 @@ static bool parseAnimateNode(QSvgNode *parent, + return true; + } + ++static int parseClockValue(QString str, bool *ok) ++{ ++ int res = 0; ++ int ms = 1000; ++ str = str.trimmed(); ++ if (str.endsWith(QLatin1String("ms"))) { ++ str.chop(2); ++ ms = 1; ++ } else if (str.endsWith(QLatin1String("s"))) { ++ str.chop(1); ++ } ++ double val = ms * toDouble(str, ok); ++ if (ok) { ++ if (val > std::numeric_limits::min() && val < std::numeric_limits::max()) ++ res = static_cast(val); ++ else ++ *ok = false; ++ } ++ return res; ++} ++ + static bool parseAnimateColorNode(QSvgNode *parent, + const QXmlStreamAttributes &attributes, + QSvgHandler *handler) +@@ -2387,23 +2427,13 @@ static bool parseAnimateColorNode(QSvgNode *parent, + } + } + +- int ms = 1000; +- beginStr = beginStr.trimmed(); +- if (beginStr.endsWith(QLatin1String("ms"))) { +- beginStr.chop(2); +- ms = 1; +- } else if (beginStr.endsWith(QLatin1String("s"))) { +- beginStr.chop(1); +- } +- durStr = durStr.trimmed(); +- if (durStr.endsWith(QLatin1String("ms"))) { +- durStr.chop(2); +- ms = 1; +- } else if (durStr.endsWith(QLatin1String("s"))) { +- durStr.chop(1); +- } +- int begin = static_cast(toDouble(beginStr) * ms); +- int end = static_cast((toDouble(durStr) + begin) * ms); ++ bool ok = true; ++ int begin = parseClockValue(beginStr, &ok); ++ if (!ok) ++ return false; ++ int end = begin + parseClockValue(durStr, &ok); ++ if (!ok || end <= begin) ++ return false; + + QSvgAnimateColor *anim = new QSvgAnimateColor(begin, end, 0); + anim->setArgs((targetStr == QLatin1String("fill")), colors); +@@ -2493,24 +2523,13 @@ static bool parseAnimateTransformNode(QSvgNode *parent, + } + } + +- int ms = 1000; +- beginStr = beginStr.trimmed(); +- if (beginStr.endsWith(QLatin1String("ms"))) { +- beginStr.chop(2); +- ms = 1; +- } else if (beginStr.endsWith(QLatin1String("s"))) { +- beginStr.chop(1); +- } +- int begin = static_cast(toDouble(beginStr) * ms); +- durStr = durStr.trimmed(); +- if (durStr.endsWith(QLatin1String("ms"))) { +- durStr.chop(2); +- ms = 1; +- } else if (durStr.endsWith(QLatin1String("s"))) { +- durStr.chop(1); +- ms = 1000; +- } +- int end = static_cast(toDouble(durStr)*ms) + begin; ++ bool ok = true; ++ int begin = parseClockValue(beginStr, &ok); ++ if (!ok) ++ return false; ++ int end = begin + parseClockValue(durStr, &ok); ++ if (!ok || end <= begin) ++ return false; + + QSvgAnimateTransform::TransformType type = QSvgAnimateTransform::Empty; + if (typeStr == QLatin1String("translate")) { +@@ -2566,6 +2585,8 @@ static QSvgNode *createCircleNode(QSvgNode *parent, + qreal ncx = toDouble(cx); + qreal ncy = toDouble(cy); + qreal nr = toDouble(r); ++ if (nr < 0.0) ++ return nullptr; + + QRectF rect(ncx-nr, ncy-nr, nr*2, nr*2); + QSvgNode *circle = new QSvgCircle(parent, rect); +@@ -3036,13 +3057,16 @@ static QSvgStyleProperty *createRadialGradientNode(QSvgNode *node, + + qreal ncx = 0.5; + qreal ncy = 0.5; +- qreal nr = 0.5; + if (!cx.isEmpty()) + ncx = toDouble(cx); + if (!cy.isEmpty()) ncy = toDouble(cy); ++ ++ qreal nr = 0.0; if (!r.isEmpty()) nr = toDouble(r); -+ if (nr < 0.5) -+ nr = 0.5; ++ if (nr <= 0.0) ++ return nullptr; qreal nfx = ncx; if (!fx.isEmpty()) +@@ -3338,7 +3362,9 @@ static QSvgNode *createTextNode(QSvgNode *parent, + //### editable and rotate not handled + QSvgHandler::LengthType type; + qreal nx = parseLength(x, type, handler); ++ nx = convertToPixels(nx, true, type); + qreal ny = parseLength(y, type, handler); ++ ny = convertToPixels(ny, true, type); + + QSvgNode *text = new QSvgText(parent, QPointF(nx, ny)); + return text; diff --git a/src/svg/qsvgstructure.cpp b/src/svg/qsvgstructure.cpp index b89608b..89c9e4e 100644 --- a/src/svg/qsvgstructure.cpp @@ -238,3 +411,35 @@ index e1f84f3..73bbe8b 100644 QTEST_MAIN(tst_QSvgPlugin) #include "tst_qsvgplugin.moc" +diff --git a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp +index 8f1f03b..36c76ec 100644 +--- a/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp ++++ b/tests/auto/qsvgrenderer/tst_qsvgrenderer.cpp +@@ -74,6 +74,7 @@ private slots: + void fillRule(); + void opacity(); + void paths(); ++ void paths2(); + void displayMode(); + void strokeInherit(); + void testFillInheritance(); +@@ -1047,6 +1048,19 @@ void tst_QSvgRenderer::paths() + } + } + ++void tst_QSvgRenderer::paths2() ++{ ++ const char *svg = ++ "" ++ "" ++ ""; ++ ++ QByteArray data(svg); ++ QSvgRenderer renderer(data); ++ QVERIFY(renderer.isValid()); ++ QCOMPARE(renderer.boundsOnElement(QLatin1String("path1")).toRect(), QRect(3, 8, 10, 5)); ++} ++ + void tst_QSvgRenderer::displayMode() + { + static const char *svgs[] = { diff --git a/desktop/toolkit/qt5/qt5-svg/pspec.xml b/desktop/toolkit/qt5/qt5-svg/pspec.xml index 28c75a1e48..ccea5226a4 100755 --- a/desktop/toolkit/qt5/qt5-svg/pspec.xml +++ b/desktop/toolkit/qt5/qt5-svg/pspec.xml @@ -61,7 +61,7 @@ - 2021-06-16 + 2021-11-10 5.15.2 Rebuild. Mustafa Cinasal diff --git a/desktop/toolkit/qt5/qt5-tools/pspec.xml b/desktop/toolkit/qt5/qt5-tools/pspec.xml index ec0332a2cd..296e8a40da 100755 --- a/desktop/toolkit/qt5/qt5-tools/pspec.xml +++ b/desktop/toolkit/qt5/qt5-tools/pspec.xml @@ -189,7 +189,7 @@ - 2021-10-24 + 2021-11-10 5.15.2 Rebuild llvm. Mustafa Cinasal diff --git a/desktop/toolkit/qt5/qt5-wayland/files/qt_kde.patch b/desktop/toolkit/qt5/qt5-wayland/files/qt_kde.patch index fef9766918..5e4b82400f 100644 --- a/desktop/toolkit/qt5/qt5-wayland/files/qt_kde.patch +++ b/desktop/toolkit/qt5/qt5-wayland/files/qt_kde.patch @@ -94,7 +94,7 @@ index 19944a34..bbd2d568 100644 return; // Ignore foreign surfaces diff --git a/src/client/qwaylanddisplay.cpp b/src/client/qwaylanddisplay.cpp -index fe094f6f..e0dfe8b2 100644 +index fe094f6f..9f595af3 100644 --- a/src/client/qwaylanddisplay.cpp +++ b/src/client/qwaylanddisplay.cpp @@ -206,10 +206,11 @@ void QWaylandDisplay::checkError() const @@ -123,8 +123,61 @@ index fe094f6f..e0dfe8b2 100644 } uint32_t QWaylandDisplay::currentTimeMillisec() +@@ -573,14 +575,10 @@ void QWaylandDisplay::handleKeyboardFocusChanged(QWaylandInputDevice *inputDevic + if (mLastKeyboardFocus == keyboardFocus) + return; + +- if (mWaylandIntegration->mShellIntegration) { +- mWaylandIntegration->mShellIntegration->handleKeyboardFocusChanged(keyboardFocus, mLastKeyboardFocus); +- } else { +- if (keyboardFocus) +- handleWindowActivated(keyboardFocus); +- if (mLastKeyboardFocus) +- handleWindowDeactivated(mLastKeyboardFocus); +- } ++ if (keyboardFocus) ++ handleWindowActivated(keyboardFocus); ++ if (mLastKeyboardFocus) ++ handleWindowDeactivated(mLastKeyboardFocus); + + mLastKeyboardFocus = keyboardFocus; + } +@@ -599,6 +597,19 @@ void QWaylandDisplay::handleWaylandSync() + QWindow *activeWindow = mActiveWindows.empty() ? nullptr : mActiveWindows.last()->window(); + if (activeWindow != QGuiApplication::focusWindow()) + QWindowSystemInterface::handleWindowActivated(activeWindow); ++ ++ if (!activeWindow) { ++ if (lastInputDevice()) { ++#if QT_CONFIG(clipboard) ++ if (auto *dataDevice = lastInputDevice()->dataDevice()) ++ dataDevice->invalidateSelectionOffer(); ++#endif ++#if QT_CONFIG(wayland_client_primary_selection) ++ if (auto *device = lastInputDevice()->primarySelectionDevice()) ++ device->invalidateSelectionOffer(); ++#endif ++ } ++ } + } + + const wl_callback_listener QWaylandDisplay::syncCallbackListener = { +@@ -625,6 +636,13 @@ QWaylandInputDevice *QWaylandDisplay::defaultInputDevice() const + return mInputDevices.isEmpty() ? 0 : mInputDevices.first(); + } + ++bool QWaylandDisplay::isKeyboardAvailable() const ++{ ++ return std::any_of( ++ mInputDevices.constBegin(), mInputDevices.constEnd(), ++ [this](const QWaylandInputDevice *device) { return device->keyboard() != nullptr; }); ++} ++ + #if QT_CONFIG(cursor) + + QWaylandCursor *QWaylandDisplay::waylandCursor() diff --git a/src/client/qwaylanddisplay_p.h b/src/client/qwaylanddisplay_p.h -index 188e9131..3b092bc8 100644 +index 188e9131..09a1736a 100644 --- a/src/client/qwaylanddisplay_p.h +++ b/src/client/qwaylanddisplay_p.h @@ -175,8 +175,6 @@ public: @@ -136,7 +189,15 @@ index 188e9131..3b092bc8 100644 struct RegistryGlobal { uint32_t id; QString interface; -@@ -282,7 +280,6 @@ private: +@@ -217,6 +215,7 @@ public: + void destroyFrameQueue(const FrameQueue &q); + void dispatchQueueWhile(wl_event_queue *queue, std::function condition, int timeout = -1); + ++ bool isKeyboardAvailable() const; + public slots: + void blockingReadEvents(); + void flushRequests(); +@@ -282,7 +281,6 @@ private: QReadWriteLock m_frameQueueLock; bool mClientSideInputContextRequested = !QPlatformInputContextFactory::requested().isNull(); @@ -145,7 +206,7 @@ index 188e9131..3b092bc8 100644 void registry_global(uint32_t id, const QString &interface, uint32_t version) override; void registry_global_remove(uint32_t id) override; diff --git a/src/client/qwaylandinputcontext.cpp b/src/client/qwaylandinputcontext.cpp -index e9afe05e..503fd735 100644 +index e9afe05e..e290baa2 100644 --- a/src/client/qwaylandinputcontext.cpp +++ b/src/client/qwaylandinputcontext.cpp @@ -51,6 +51,10 @@ @@ -159,7 +220,20 @@ index e9afe05e..503fd735 100644 QT_BEGIN_NAMESPACE Q_LOGGING_CATEGORY(qLcQpaInputMethods, "qt.qpa.input.methods") -@@ -406,6 +410,8 @@ bool QWaylandInputContext::isValid() const +@@ -383,8 +387,10 @@ void QWaylandTextInput::zwp_text_input_v2_input_method_changed(uint32_t serial, + Qt::KeyboardModifiers QWaylandTextInput::modifiersToQtModifiers(uint32_t modifiers) + { + Qt::KeyboardModifiers ret = Qt::NoModifier; +- for (int i = 0; modifiers >>= 1; ++i) { +- ret |= m_modifiersMap[i]; ++ for (int i = 0; i < m_modifiersMap.size(); ++i) { ++ if (modifiers & (1 << i)) { ++ ret |= m_modifiersMap[i]; ++ } + } + return ret; + } +@@ -406,6 +412,8 @@ bool QWaylandInputContext::isValid() const void QWaylandInputContext::reset() { qCDebug(qLcQpaInputMethods) << Q_FUNC_INFO; @@ -168,7 +242,7 @@ index e9afe05e..503fd735 100644 QPlatformInputContext::reset(); -@@ -526,9 +532,14 @@ Qt::LayoutDirection QWaylandInputContext::inputDirection() const +@@ -526,9 +534,14 @@ Qt::LayoutDirection QWaylandInputContext::inputDirection() const return textInput()->inputDirection(); } @@ -184,7 +258,7 @@ index e9afe05e..503fd735 100644 if (!textInput()) return; -@@ -561,6 +572,92 @@ QWaylandTextInput *QWaylandInputContext::textInput() const +@@ -561,6 +574,92 @@ QWaylandTextInput *QWaylandInputContext::textInput() const return mDisplay->defaultInputDevice()->textInput(); } @@ -322,7 +396,7 @@ index 10132dfe..50db6344 100644 } diff --git a/src/client/qwaylandinputdevice.cpp b/src/client/qwaylandinputdevice.cpp -index ed4a0eb4..ae045f4f 100644 +index ed4a0eb4..514457e9 100644 --- a/src/client/qwaylandinputdevice.cpp +++ b/src/client/qwaylandinputdevice.cpp @@ -1201,7 +1201,7 @@ void QWaylandInputDevice::Keyboard::handleKey(ulong timestamp, QEvent::Type type @@ -334,6 +408,21 @@ index ed4a0eb4..ae045f4f 100644 QKeyEvent event(type, key, modifiers, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorepeat, count); event.setTimestamp(timestamp); +@@ -1300,14 +1300,6 @@ void QWaylandInputDevice::Keyboard::handleFocusDestroyed() + void QWaylandInputDevice::Keyboard::handleFocusLost() + { + mFocus = nullptr; +-#if QT_CONFIG(clipboard) +- if (auto *dataDevice = mParent->dataDevice()) +- dataDevice->invalidateSelectionOffer(); +-#endif +-#if QT_CONFIG(wayland_client_primary_selection) +- if (auto *device = mParent->primarySelectionDevice()) +- device->invalidateSelectionOffer(); +-#endif + mParent->mQDisplay->handleKeyboardFocusChanged(mParent); + mRepeatTimer.stop(); + } diff --git a/src/client/qwaylandintegration.cpp b/src/client/qwaylandintegration.cpp index 7ad8e05e..e5e7dd42 100644 --- a/src/client/qwaylandintegration.cpp @@ -488,10 +577,18 @@ index df1c94f2..050cfdc0 100644 #if QT_CONFIG(cursor) diff --git a/src/client/qwaylandwindow.cpp b/src/client/qwaylandwindow.cpp -index bc031ed5..c020a58f 100644 +index bc031ed5..ba881cb3 100644 --- a/src/client/qwaylandwindow.cpp +++ b/src/client/qwaylandwindow.cpp -@@ -194,10 +194,11 @@ void QWaylandWindow::initWindow() +@@ -96,7 +96,6 @@ QWaylandWindow::QWaylandWindow(QWindow *window, QWaylandDisplay *display) + QWaylandWindow::~QWaylandWindow() + { + mDisplay->destroyFrameQueue(mFrameQueue); +- mDisplay->handleWindowDestroyed(this); + + delete mWindowDecoration; + +@@ -194,10 +193,11 @@ void QWaylandWindow::initWindow() if (QScreen *s = window()->screen()) setOrientationMask(s->orientationUpdateMask()); setWindowFlags(window()->flags()); @@ -505,7 +602,16 @@ index bc031ed5..c020a58f 100644 setMask(window()->mask()); if (mShellSurface) mShellSurface->requestWindowStates(window()->windowStates()); -@@ -332,14 +333,21 @@ void QWaylandWindow::setWindowIcon(const QIcon &icon) +@@ -265,6 +265,8 @@ void QWaylandWindow::reset() + + mMask = QRegion(); + mQueuedBuffer = nullptr; ++ ++ mDisplay->handleWindowDestroyed(this); + } + + QWaylandWindow *QWaylandWindow::fromWlSurface(::wl_surface *surface) +@@ -332,14 +334,21 @@ void QWaylandWindow::setWindowIcon(const QIcon &icon) void QWaylandWindow::setGeometry_helper(const QRect &rect) { @@ -530,7 +636,7 @@ index bc031ed5..c020a58f 100644 } } -@@ -362,7 +370,7 @@ void QWaylandWindow::setGeometry(const QRect &rect) +@@ -362,7 +371,7 @@ void QWaylandWindow::setGeometry(const QRect &rect) if (isExposed() && !mInResizeFromApplyConfigure && exposeGeometry != mLastExposeGeometry) sendExposeEvent(exposeGeometry); @@ -539,7 +645,7 @@ index bc031ed5..c020a58f 100644 mShellSurface->setWindowGeometry(windowContentGeometry()); if (isOpaque() && mMask.isEmpty()) -@@ -429,7 +437,7 @@ void QWaylandWindow::setVisible(bool visible) +@@ -429,7 +438,7 @@ void QWaylandWindow::setVisible(bool visible) initWindow(); mDisplay->flushRequests(); @@ -548,7 +654,7 @@ index bc031ed5..c020a58f 100644 // Don't flush the events here, or else the newly visible window may start drawing, but since // there was no frame before it will be stuck at the waitForFrameSync() in // QWaylandShmBackingStore::beginPaint(). -@@ -456,14 +464,15 @@ void QWaylandWindow::lower() +@@ -456,14 +465,15 @@ void QWaylandWindow::lower() void QWaylandWindow::setMask(const QRegion &mask) { @@ -567,7 +673,7 @@ index bc031ed5..c020a58f 100644 if (mMask.isEmpty()) { mSurface->set_input_region(nullptr); -@@ -613,9 +622,13 @@ void QWaylandWindow::commit() +@@ -613,9 +623,13 @@ void QWaylandWindow::commit() const wl_callback_listener QWaylandWindow::callbackListener = { [](void *data, wl_callback *callback, uint32_t time) { @@ -582,7 +688,27 @@ index bc031ed5..c020a58f 100644 window->handleFrameCallback(); } }; -@@ -1161,16 +1174,15 @@ void QWaylandWindow::requestUpdate() +@@ -1070,10 +1084,18 @@ bool QWaylandWindow::setMouseGrabEnabled(bool grab) + return true; + } + ++Qt::WindowStates QWaylandWindow::windowStates() const ++{ ++ return mLastReportedWindowStates; ++} ++ + void QWaylandWindow::handleWindowStatesChanged(Qt::WindowStates states) + { + createDecoration(); +- QWindowSystemInterface::handleWindowStateChanged(window(), states, mLastReportedWindowStates); ++ Qt::WindowStates statesWithoutActive = states & ~Qt::WindowActive; ++ Qt::WindowStates lastStatesWithoutActive = mLastReportedWindowStates & ~Qt::WindowActive; ++ QWindowSystemInterface::handleWindowStateChanged(window(), statesWithoutActive, ++ lastStatesWithoutActive); + mLastReportedWindowStates = states; + } + +@@ -1161,16 +1183,15 @@ void QWaylandWindow::requestUpdate() void QWaylandWindow::handleUpdate() { qCDebug(lcWaylandBackingstore) << "handleUpdate" << QThread::currentThread(); @@ -603,7 +729,7 @@ index bc031ed5..c020a58f 100644 QMutexLocker locker(mFrameQueue.mutex); struct ::wl_surface *wrappedSurface = reinterpret_cast(wl_proxy_create_wrapper(mSurface->object())); wl_proxy_set_queue(reinterpret_cast(wrappedSurface), mFrameQueue.queue); -@@ -1231,12 +1243,14 @@ bool QWaylandWindow::isOpaque() const +@@ -1231,12 +1252,14 @@ bool QWaylandWindow::isOpaque() const void QWaylandWindow::setOpaqueArea(const QRegion &opaqueArea) { @@ -621,6 +747,37 @@ index bc031ed5..c020a58f 100644 mSurface->set_opaque_region(region); wl_region_destroy(region); } +diff --git a/src/client/qwaylandwindow_p.h b/src/client/qwaylandwindow_p.h +index 6cc1664b..e0687962 100644 +--- a/src/client/qwaylandwindow_p.h ++++ b/src/client/qwaylandwindow_p.h +@@ -148,6 +148,7 @@ public: + void setWindowState(Qt::WindowStates states) override; + void setWindowFlags(Qt::WindowFlags flags) override; + void handleWindowStatesChanged(Qt::WindowStates states); ++ Qt::WindowStates windowStates() const; + + void raise() override; + void lower() override; +diff --git a/src/client/shellintegration/qwaylandshellintegration_p.h b/src/client/shellintegration/qwaylandshellintegration_p.h +index ccad0048..4cc9b3b8 100644 +--- a/src/client/shellintegration/qwaylandshellintegration_p.h ++++ b/src/client/shellintegration/qwaylandshellintegration_p.h +@@ -73,11 +73,10 @@ public: + return true; + } + virtual QWaylandShellSurface *createShellSurface(QWaylandWindow *window) = 0; ++ // kept for binary compat with layer-shell-qt + virtual void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) { +- if (newFocus) +- m_display->handleWindowActivated(newFocus); +- if (oldFocus) +- m_display->handleWindowDeactivated(oldFocus); ++ Q_UNUSED(newFocus); ++ Q_UNUSED(oldFocus); + } + virtual void *nativeResourceForWindow(const QByteArray &resource, QWindow *window) { + Q_UNUSED(resource); diff --git a/src/compositor/compositor_api/qwaylandquickcompositor.cpp b/src/compositor/compositor_api/qwaylandquickcompositor.cpp index 49f0860e..db1cf00f 100644 --- a/src/compositor/compositor_api/qwaylandquickcompositor.cpp @@ -740,6 +897,36 @@ index 245fec19..8f41118d 100644 } if (m_pending.states != m_applied.states) +diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp +index 4e25949f..cfc60939 100644 +--- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp ++++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration.cpp +@@ -85,13 +85,6 @@ QWaylandShellSurface *QWaylandXdgShellV5Integration::createShellSurface(QWayland + return m_xdgShell->createXdgSurface(window); + } + +-void QWaylandXdgShellV5Integration::handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) { +- if (newFocus && qobject_cast(newFocus->shellSurface())) +- m_display->handleWindowActivated(newFocus); +- if (oldFocus && qobject_cast(oldFocus->shellSurface())) +- m_display->handleWindowDeactivated(oldFocus); +-} +- + } + + QT_END_NAMESPACE +diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration_p.h b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration_p.h +index ce6bdb9e..aed88670 100644 +--- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration_p.h ++++ b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgshellv5integration_p.h +@@ -67,7 +67,6 @@ public: + QWaylandXdgShellV5Integration() {} + bool initialize(QWaylandDisplay *display) override; + QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override; +- void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) override; + + private: + QScopedPointer m_xdgShell; diff --git a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp b/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp index 770fad7e..73aba1ee 100644 --- a/src/plugins/shellintegration/xdg-shell-v5/qwaylandxdgsurfacev5.cpp @@ -766,20 +953,85 @@ index c137b308..8c371661 100644 if ((m_pending.states & Qt::WindowActive) && !(m_applied.states & Qt::WindowActive)) m_xdgSurface->m_window->display()->handleWindowActivated(m_xdgSurface->m_window); +diff --git a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6integration.cpp b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6integration.cpp +index 03164316..e8da8ba1 100644 +--- a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6integration.cpp ++++ b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6integration.cpp +@@ -68,20 +68,6 @@ QWaylandShellSurface *QWaylandXdgShellV6Integration::createShellSurface(QWayland + return m_xdgShell->getXdgSurface(window); + } + +-void QWaylandXdgShellV6Integration::handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) +-{ +- if (newFocus) { +- auto *xdgSurface = qobject_cast(newFocus->shellSurface()); +- if (xdgSurface && !xdgSurface->handlesActiveState()) +- m_display->handleWindowActivated(newFocus); +- } +- if (oldFocus && qobject_cast(oldFocus->shellSurface())) { +- auto *xdgSurface = qobject_cast(oldFocus->shellSurface()); +- if (xdgSurface && !xdgSurface->handlesActiveState()) +- m_display->handleWindowDeactivated(oldFocus); +- } +-} +- + } + + QT_END_NAMESPACE +diff --git a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6integration_p.h b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6integration_p.h +index 261f8cbb..c1bcd5c6 100644 +--- a/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6integration_p.h ++++ b/src/plugins/shellintegration/xdg-shell-v6/qwaylandxdgshellv6integration_p.h +@@ -65,7 +65,6 @@ public: + QWaylandXdgShellV6Integration() {} + bool initialize(QWaylandDisplay *display) override; + QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override; +- void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) override; + + private: + QScopedPointer m_xdgShell; diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp -index b6d23ac1..7d33dabd 100644 +index b6d23ac1..d7d0ddf7 100644 --- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp +++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshell.cpp -@@ -83,7 +83,7 @@ QWaylandXdgSurface::Toplevel::~Toplevel() +@@ -67,11 +67,6 @@ QWaylandXdgSurface::Toplevel::Toplevel(QWaylandXdgSurface *xdgSurface) + + QWaylandXdgSurface::Toplevel::~Toplevel() + { +- if (m_applied.states & Qt::WindowActive) { +- QWaylandWindow *window = m_xdgSurface->window(); +- window->display()->handleWindowDeactivated(window); +- } +- + // The protocol spec requires that the decoration object is deleted before xdg_toplevel. + delete m_decoration; + m_decoration = nullptr; +@@ -83,18 +78,17 @@ QWaylandXdgSurface::Toplevel::~Toplevel() void QWaylandXdgSurface::Toplevel::applyConfigure() { if (!(m_applied.states & (Qt::WindowMaximized|Qt::WindowFullScreen))) - m_normalSize = m_xdgSurface->m_window->window()->frameGeometry().size(); + m_normalSize = m_xdgSurface->m_window->windowFrameGeometry().size(); - if ((m_pending.states & Qt::WindowActive) && !(m_applied.states & Qt::WindowActive)) +- if ((m_pending.states & Qt::WindowActive) && !(m_applied.states & Qt::WindowActive)) ++ if ((m_pending.states & Qt::WindowActive) && !(m_applied.states & Qt::WindowActive) ++ && !m_xdgSurface->m_window->display()->isKeyboardAvailable()) m_xdgSurface->m_window->display()->handleWindowActivated(m_xdgSurface->m_window); -@@ -105,8 +105,6 @@ void QWaylandXdgSurface::Toplevel::applyConfigure() + +- if (!(m_pending.states & Qt::WindowActive) && (m_applied.states & Qt::WindowActive)) ++ if (!(m_pending.states & Qt::WindowActive) && (m_applied.states & Qt::WindowActive) ++ && !m_xdgSurface->m_window->display()->isKeyboardAvailable()) + m_xdgSurface->m_window->display()->handleWindowDeactivated(m_xdgSurface->m_window); + +- // TODO: none of the other plugins send WindowActive either, but is it on purpose? +- Qt::WindowStates statesWithoutActive = m_pending.states & ~Qt::WindowActive; +- +- m_xdgSurface->m_window->handleWindowStatesChanged(statesWithoutActive); ++ m_xdgSurface->m_window->handleWindowStatesChanged(m_pending.states); + + if (m_pending.size.isEmpty()) { + // An empty size in the configure means it's up to the client to choose the size +@@ -105,8 +99,6 @@ void QWaylandXdgSurface::Toplevel::applyConfigure() m_xdgSurface->m_window->resizeFromApplyConfigure(m_pending.size); } @@ -788,7 +1040,7 @@ index b6d23ac1..7d33dabd 100644 m_applied = m_pending; qCDebug(lcQpaWayland) << "Applied pending xdg_toplevel configure event:" << m_applied.size << m_applied.states; } -@@ -178,9 +176,12 @@ void QWaylandXdgSurface::Toplevel::requestWindowStates(Qt::WindowStates states) +@@ -178,9 +170,12 @@ void QWaylandXdgSurface::Toplevel::requestWindowStates(Qt::WindowStates states) } if (changedStates & Qt::WindowFullScreen) { @@ -804,7 +1056,7 @@ index b6d23ac1..7d33dabd 100644 unset_fullscreen(); } -@@ -254,6 +255,7 @@ QWaylandXdgSurface::QWaylandXdgSurface(QWaylandXdgShell *shell, ::xdg_surface *s +@@ -254,6 +249,7 @@ QWaylandXdgSurface::QWaylandXdgSurface(QWaylandXdgShell *shell, ::xdg_surface *s m_toplevel->set_parent(parentXdgSurface->m_toplevel->object()); } } @@ -812,6 +1064,43 @@ index b6d23ac1..7d33dabd 100644 } QWaylandXdgSurface::~QWaylandXdgSurface() +diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration.cpp b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration.cpp +index 8769d971..da0dd6a7 100644 +--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration.cpp ++++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration.cpp +@@ -69,20 +69,6 @@ QWaylandShellSurface *QWaylandXdgShellIntegration::createShellSurface(QWaylandWi + return m_xdgShell->getXdgSurface(window); + } + +-void QWaylandXdgShellIntegration::handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) +-{ +- if (newFocus) { +- auto *xdgSurface = qobject_cast(newFocus->shellSurface()); +- if (xdgSurface && !xdgSurface->handlesActiveState()) +- m_display->handleWindowActivated(newFocus); +- } +- if (oldFocus && qobject_cast(oldFocus->shellSurface())) { +- auto *xdgSurface = qobject_cast(oldFocus->shellSurface()); +- if (xdgSurface && !xdgSurface->handlesActiveState()) +- m_display->handleWindowDeactivated(oldFocus); +- } +-} +- + } + + QT_END_NAMESPACE +diff --git a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration_p.h b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration_p.h +index b6caa6c9..2f929f98 100644 +--- a/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration_p.h ++++ b/src/plugins/shellintegration/xdg-shell/qwaylandxdgshellintegration_p.h +@@ -65,7 +65,6 @@ public: + QWaylandXdgShellIntegration() {} + bool initialize(QWaylandDisplay *display) override; + QWaylandShellSurface *createShellSurface(QWaylandWindow *window) override; +- void handleKeyboardFocusChanged(QWaylandWindow *newFocus, QWaylandWindow *oldFocus) override; + + private: + QScopedPointer m_xdgShell; diff --git a/src/qtwaylandscanner/qtwaylandscanner.cpp b/src/qtwaylandscanner/qtwaylandscanner.cpp index 1d635f06..e2f87bbd 100644 --- a/src/qtwaylandscanner/qtwaylandscanner.cpp @@ -891,10 +1180,18 @@ index b8a65f15..95e4e609 100644 // Used to cause a crash in libwayland (QTBUG-79674) diff --git a/tests/auto/client/xdgshell/tst_xdgshell.cpp b/tests/auto/client/xdgshell/tst_xdgshell.cpp -index 2277bbb8..e2593314 100644 +index 2277bbb8..73d1eb9c 100644 --- a/tests/auto/client/xdgshell/tst_xdgshell.cpp +++ b/tests/auto/client/xdgshell/tst_xdgshell.cpp -@@ -138,6 +138,7 @@ void tst_xdgshell::configureSize() +@@ -31,6 +31,7 @@ + #include + #include + #include ++#include + + using namespace MockCompositor; + +@@ -138,6 +139,7 @@ void tst_xdgshell::configureSize() void tst_xdgshell::configureStates() { @@ -902,7 +1199,23 @@ index 2277bbb8..e2593314 100644 QRasterWindow window; window.resize(64, 48); window.show(); -@@ -186,6 +187,7 @@ void tst_xdgshell::configureStates() +@@ -154,9 +156,12 @@ void tst_xdgshell::configureStates() + // Toplevel windows don't know their position on xdg-shell + // QCOMPARE(window.frameGeometry().topLeft(), QPoint()); // TODO: this doesn't currently work when window decorations are enabled + +-// QEXPECT_FAIL("", "configure has already been acked, we shouldn't have to wait for isActive", Continue); +-// QVERIFY(window.isActive()); +- QTRY_VERIFY(window.isActive()); // Just make sure it eventually get's set correctly ++ // window.windowstate() is driven by keyboard focus, however for decorations we want to follow ++ // XDGShell this is internal to QtWayland so it is queried directly ++ auto waylandWindow = static_cast(window.handle()); ++ Q_ASSERT(waylandWindow); ++ QTRY_VERIFY(waylandWindow->windowStates().testFlag( ++ Qt::WindowActive)); // Just make sure it eventually get's set correctly + + const QSize screenSize(640, 480); + const uint maximizedSerial = exec([=] { +@@ -186,6 +191,7 @@ void tst_xdgshell::configureStates() QCOMPARE(window.windowStates(), Qt::WindowNoState); QCOMPARE(window.frameGeometry().size(), windowedSize); // QCOMPARE(window.frameGeometry().topLeft(), QPoint()); // TODO: this doesn't currently work when window decorations are enabled @@ -910,7 +1223,7 @@ index 2277bbb8..e2593314 100644 } void tst_xdgshell::popup() -@@ -505,7 +507,7 @@ void tst_xdgshell::minMaxSize() +@@ -505,7 +511,7 @@ void tst_xdgshell::minMaxSize() window.show(); QCOMPOSITOR_TRY_VERIFY(xdgToplevel()); diff --git a/desktop/toolkit/qt5/qt5-wayland/pspec.xml b/desktop/toolkit/qt5/qt5-wayland/pspec.xml index 59250ecb7e..2ba500aca7 100755 --- a/desktop/toolkit/qt5/qt5-wayland/pspec.xml +++ b/desktop/toolkit/qt5/qt5-wayland/pspec.xml @@ -86,7 +86,7 @@ - 2021-10-04 + 2021-11-10 5.15.2 Rebuild kde patch Mustafa Cinasal