From 7fda40effa93b96d86806e56a02fe26a8dc38224 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Klitzing?= Date: Fri, 2 Mar 2018 21:38:01 +0100 Subject: [PATCH 01/10] Avoid infinite recursive loop Looks like this should be "super." instead of "super_" Found by spotbugs. Change-Id: I83d096eee332361d62e783581bfa15017536081d Reviewed-by: BogDan Vatra --- .../java/src/org/qtproject/qt5/android/bindings/QtActivity.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java b/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java index 2728988362..3348527b3c 100644 --- a/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java +++ b/src/android/java/src/org/qtproject/qt5/android/bindings/QtActivity.java @@ -132,7 +132,7 @@ public class QtActivity extends Activity } public boolean super_dispatchPopulateAccessibilityEvent(AccessibilityEvent event) { - return super_dispatchPopulateAccessibilityEvent(event); + return super.dispatchPopulateAccessibilityEvent(event); } //--------------------------------------------------------------------------- From 1f920b779eb308ecdfd24423941b229cd0123589 Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Fri, 16 Feb 2018 17:33:25 +0100 Subject: [PATCH 02/10] QHeaderView: fix indentation in setModel() and clear() MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The indentation of large code blocks in setModel() and clear() are not correct. Needed for another change to avoid whitespace changeds in there. Change-Id: I620c8c5e83e98747f5c17469738722cf976fb467 Reviewed-by: David Faure Reviewed-by: Thorbjørn Lund Martsum --- src/widgets/itemviews/qheaderview.cpp | 74 +++++++++++++-------------- 1 file changed, 37 insertions(+), 37 deletions(-) diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index 708b9b44ca..cd5961dc91 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -353,35 +353,35 @@ void QHeaderView::setModel(QAbstractItemModel *model) Q_D(QHeaderView); d->layoutChangePersistentSections.clear(); if (d->model && d->model != QAbstractItemModelPrivate::staticEmptyModel()) { - if (d->orientation == Qt::Horizontal) { - QObject::disconnect(d->model, SIGNAL(columnsInserted(QModelIndex,int,int)), - this, SLOT(sectionsInserted(QModelIndex,int,int))); - QObject::disconnect(d->model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)), - this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int))); - QObject::disconnect(d->model, SIGNAL(columnsRemoved(QModelIndex,int,int)), - this, SLOT(_q_sectionsRemoved(QModelIndex,int,int))); - QObject::disconnect(d->model, SIGNAL(columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), + if (d->orientation == Qt::Horizontal) { + QObject::disconnect(d->model, SIGNAL(columnsInserted(QModelIndex,int,int)), + this, SLOT(sectionsInserted(QModelIndex,int,int))); + QObject::disconnect(d->model, SIGNAL(columnsAboutToBeRemoved(QModelIndex,int,int)), + this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int))); + QObject::disconnect(d->model, SIGNAL(columnsRemoved(QModelIndex,int,int)), + this, SLOT(_q_sectionsRemoved(QModelIndex,int,int))); + QObject::disconnect(d->model, SIGNAL(columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), + this, SLOT(_q_sectionsAboutToBeChanged())); + QObject::disconnect(d->model, SIGNAL(columnsMoved(QModelIndex,int,int,QModelIndex,int)), + this, SLOT(_q_sectionsChanged())); + } else { + QObject::disconnect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)), + this, SLOT(sectionsInserted(QModelIndex,int,int))); + QObject::disconnect(d->model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), + this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int))); + QObject::disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)), + this, SLOT(_q_sectionsRemoved(QModelIndex,int,int))); + QObject::disconnect(d->model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), + this, SLOT(_q_sectionsAboutToBeChanged())); + QObject::disconnect(d->model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), + this, SLOT(_q_sectionsChanged())); + } + QObject::disconnect(d->model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), + this, SLOT(headerDataChanged(Qt::Orientation,int,int))); + QObject::disconnect(d->model, SIGNAL(layoutAboutToBeChanged()), this, SLOT(_q_sectionsAboutToBeChanged())); - QObject::disconnect(d->model, SIGNAL(columnsMoved(QModelIndex,int,int,QModelIndex,int)), + QObject::disconnect(d->model, SIGNAL(layoutChanged()), this, SLOT(_q_sectionsChanged())); - } else { - QObject::disconnect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)), - this, SLOT(sectionsInserted(QModelIndex,int,int))); - QObject::disconnect(d->model, SIGNAL(rowsAboutToBeRemoved(QModelIndex,int,int)), - this, SLOT(sectionsAboutToBeRemoved(QModelIndex,int,int))); - QObject::disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)), - this, SLOT(_q_sectionsRemoved(QModelIndex,int,int))); - QObject::disconnect(d->model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), - this, SLOT(_q_sectionsAboutToBeChanged())); - QObject::disconnect(d->model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), - this, SLOT(_q_sectionsChanged())); - } - QObject::disconnect(d->model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), - this, SLOT(headerDataChanged(Qt::Orientation,int,int))); - QObject::disconnect(d->model, SIGNAL(layoutAboutToBeChanged()), - this, SLOT(_q_sectionsAboutToBeChanged())); - QObject::disconnect(d->model, SIGNAL(layoutChanged()), - this, SLOT(_q_sectionsChanged())); } if (model && model != QAbstractItemModelPrivate::staticEmptyModel()) { @@ -2282,8 +2282,8 @@ void QHeaderView::initializeSections() const int oldCount = d->sectionCount(); const int newCount = d->modelSectionCount(); if (newCount <= 0) { - d->clear(); - emit sectionCountChanged(oldCount, 0); + d->clear(); + emit sectionCountChanged(oldCount, 0); } else if (newCount != oldCount) { const int min = qBound(0, oldCount, newCount - 1); initializeSections(min, newCount - 1); @@ -3655,14 +3655,14 @@ void QHeaderViewPrivate::removeSectionsFromSectionItems(int start, int end) void QHeaderViewPrivate::clear() { if (state != NoClear) { - length = 0; - visualIndices.clear(); - logicalIndices.clear(); - sectionSelected.clear(); - hiddenSectionSize.clear(); - sectionItems.clear(); - lastSectionLogicalIdx = -1; - invalidateCachedSizeHint(); + length = 0; + visualIndices.clear(); + logicalIndices.clear(); + sectionSelected.clear(); + hiddenSectionSize.clear(); + sectionItems.clear(); + lastSectionLogicalIdx = -1; + invalidateCachedSizeHint(); } } From 174a1e96350e8b128e856e97392a9b57c8c08ebb Mon Sep 17 00:00:00 2001 From: Christian Ehrlicher Date: Sat, 13 Jan 2018 21:19:31 +0100 Subject: [PATCH 03/10] QHeaderView: make use of LayoutChangeHint in _q_sectionsChanged() When _q_sectionsChanged() is called from e.g. QSortFilterProxyModel the LayoutChangeHint is set which can be used to avoid useless work in this function. Change-Id: I034db3fcc7a5f9ea7ebc0fa3ffd7429edb154eb7 Reviewed-by: Richard Moe Gustavsen --- src/widgets/itemviews/qheaderview.cpp | 66 +++++++++++++++++++-------- src/widgets/itemviews/qheaderview.h | 9 +++- src/widgets/itemviews/qheaderview_p.h | 8 +++- 3 files changed, 61 insertions(+), 22 deletions(-) diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index cd5961dc91..5cbf642802 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -361,9 +361,9 @@ void QHeaderView::setModel(QAbstractItemModel *model) QObject::disconnect(d->model, SIGNAL(columnsRemoved(QModelIndex,int,int)), this, SLOT(_q_sectionsRemoved(QModelIndex,int,int))); QObject::disconnect(d->model, SIGNAL(columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), - this, SLOT(_q_sectionsAboutToBeChanged())); + this, SLOT(_q_sectionsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); QObject::disconnect(d->model, SIGNAL(columnsMoved(QModelIndex,int,int,QModelIndex,int)), - this, SLOT(_q_sectionsChanged())); + this, SLOT(_q_sectionsMoved(QModelIndex,int,int,QModelIndex,int))); } else { QObject::disconnect(d->model, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(sectionsInserted(QModelIndex,int,int))); @@ -372,16 +372,16 @@ void QHeaderView::setModel(QAbstractItemModel *model) QObject::disconnect(d->model, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(_q_sectionsRemoved(QModelIndex,int,int))); QObject::disconnect(d->model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), - this, SLOT(_q_sectionsAboutToBeChanged())); + this, SLOT(_q_sectionsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); QObject::disconnect(d->model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), - this, SLOT(_q_sectionsChanged())); + this, SLOT(_q_sectionsMoved(QModelIndex,int,int,QModelIndex,int))); } QObject::disconnect(d->model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), this, SLOT(headerDataChanged(Qt::Orientation,int,int))); - QObject::disconnect(d->model, SIGNAL(layoutAboutToBeChanged()), - this, SLOT(_q_sectionsAboutToBeChanged())); - QObject::disconnect(d->model, SIGNAL(layoutChanged()), - this, SLOT(_q_sectionsChanged())); + QObject::disconnect(d->model, SIGNAL(layoutAboutToBeChanged(QList,QAbstractItemModel::LayoutChangeHint)), + this, SLOT(_q_sectionsAboutToBeChanged(QList,QAbstractItemModel::LayoutChangeHint))); + QObject::disconnect(d->model, SIGNAL(layoutChanged(QList,QAbstractItemModel::LayoutChangeHint)), + this, SLOT(_q_sectionsChanged(QList,QAbstractItemModel::LayoutChangeHint))); } if (model && model != QAbstractItemModelPrivate::staticEmptyModel()) { @@ -393,9 +393,9 @@ void QHeaderView::setModel(QAbstractItemModel *model) QObject::connect(model, SIGNAL(columnsRemoved(QModelIndex,int,int)), this, SLOT(_q_sectionsRemoved(QModelIndex,int,int))); QObject::connect(model, SIGNAL(columnsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), - this, SLOT(_q_sectionsAboutToBeChanged())); + this, SLOT(_q_sectionsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); QObject::connect(model, SIGNAL(columnsMoved(QModelIndex,int,int,QModelIndex,int)), - this, SLOT(_q_sectionsChanged())); + this, SLOT(_q_sectionsMoved(QModelIndex,int,int,QModelIndex,int))); } else { QObject::connect(model, SIGNAL(rowsInserted(QModelIndex,int,int)), this, SLOT(sectionsInserted(QModelIndex,int,int))); @@ -404,16 +404,16 @@ void QHeaderView::setModel(QAbstractItemModel *model) QObject::connect(model, SIGNAL(rowsRemoved(QModelIndex,int,int)), this, SLOT(_q_sectionsRemoved(QModelIndex,int,int))); QObject::connect(model, SIGNAL(rowsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int)), - this, SLOT(_q_sectionsAboutToBeChanged())); + this, SLOT(_q_sectionsAboutToBeMoved(QModelIndex,int,int,QModelIndex,int))); QObject::connect(model, SIGNAL(rowsMoved(QModelIndex,int,int,QModelIndex,int)), - this, SLOT(_q_sectionsChanged())); + this, SLOT(_q_sectionsMoved(QModelIndex,int,int,QModelIndex,int))); } QObject::connect(model, SIGNAL(headerDataChanged(Qt::Orientation,int,int)), this, SLOT(headerDataChanged(Qt::Orientation,int,int))); - QObject::connect(model, SIGNAL(layoutAboutToBeChanged()), - this, SLOT(_q_sectionsAboutToBeChanged())); - QObject::connect(model, SIGNAL(layoutChanged()), - this, SLOT(_q_sectionsChanged())); + QObject::connect(model, SIGNAL(layoutAboutToBeChanged(QList,QAbstractItemModel::LayoutChangeHint)), + this, SLOT(_q_sectionsAboutToBeChanged(QList,QAbstractItemModel::LayoutChangeHint))); + QObject::connect(model, SIGNAL(layoutChanged(QList,QAbstractItemModel::LayoutChangeHint)), + this, SLOT(_q_sectionsChanged(QList,QAbstractItemModel::LayoutChangeHint))); } d->state = QHeaderViewPrivate::NoClear; @@ -2150,8 +2150,33 @@ void QHeaderViewPrivate::_q_sectionsRemoved(const QModelIndex &parent, viewport->update(); } -void QHeaderViewPrivate::_q_sectionsAboutToBeChanged() +void QHeaderViewPrivate::_q_sectionsAboutToBeMoved(const QModelIndex &sourceParent, int logicalStart, int logicalEnd, const QModelIndex &destinationParent, int logicalDestination) { + if (sourceParent != root || destinationParent != root) + return; // we only handle changes in the root level + Q_UNUSED(logicalStart); + Q_UNUSED(logicalEnd); + Q_UNUSED(logicalDestination); + _q_sectionsAboutToBeChanged(); +} + +void QHeaderViewPrivate::_q_sectionsMoved(const QModelIndex &sourceParent, int logicalStart, int logicalEnd, const QModelIndex &destinationParent, int logicalDestination) +{ + if (sourceParent != root || destinationParent != root) + return; // we only handle changes in the root level + Q_UNUSED(logicalStart); + Q_UNUSED(logicalEnd); + Q_UNUSED(logicalDestination); + _q_sectionsChanged(); +} + +void QHeaderViewPrivate::_q_sectionsAboutToBeChanged(const QList &, + QAbstractItemModel::LayoutChangeHint hint) +{ + if ((hint == QAbstractItemModel::VerticalSortHint && orientation == Qt::Horizontal) || + (hint == QAbstractItemModel::HorizontalSortHint && orientation == Qt::Vertical)) + return; + //if there is no row/column we can't have mapping for columns //because no QModelIndex in the model would be valid // ### this is far from being bullet-proof and we would need a real system to @@ -2190,8 +2215,13 @@ void QHeaderViewPrivate::_q_sectionsAboutToBeChanged() } } -void QHeaderViewPrivate::_q_sectionsChanged() +void QHeaderViewPrivate::_q_sectionsChanged(const QList &, + QAbstractItemModel::LayoutChangeHint hint) { + if ((hint == QAbstractItemModel::VerticalSortHint && orientation == Qt::Horizontal) || + (hint == QAbstractItemModel::HorizontalSortHint && orientation == Qt::Vertical)) + return; + Q_Q(QHeaderView); viewport->update(); diff --git a/src/widgets/itemviews/qheaderview.h b/src/widgets/itemviews/qheaderview.h index cfe2d24453..c09081cd80 100644 --- a/src/widgets/itemviews/qheaderview.h +++ b/src/widgets/itemviews/qheaderview.h @@ -251,9 +251,14 @@ protected: friend class QTreeView; private: + // ### Qt6: make them protected slots in QHeaderViewPrivate Q_PRIVATE_SLOT(d_func(), void _q_sectionsRemoved(const QModelIndex &parent, int logicalFirst, int logicalLast)) - Q_PRIVATE_SLOT(d_func(), void _q_sectionsAboutToBeChanged()) - Q_PRIVATE_SLOT(d_func(), void _q_sectionsChanged()) + Q_PRIVATE_SLOT(d_func(), void _q_sectionsAboutToBeMoved(const QModelIndex &sourceParent, int logicalStart, int logicalEnd, const QModelIndex &destinationParent, int logicalDestination)) + Q_PRIVATE_SLOT(d_func(), void _q_sectionsMoved(const QModelIndex &sourceParent, int logicalStart, int logicalEnd, const QModelIndex &destinationParent, int logicalDestination)) + Q_PRIVATE_SLOT(d_func(), void _q_sectionsAboutToBeChanged(const QList &parents = QList(), + QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint)) + Q_PRIVATE_SLOT(d_func(), void _q_sectionsChanged(const QList &parents = QList(), + QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint)) Q_DECLARE_PRIVATE(QHeaderView) Q_DISABLE_COPY(QHeaderView) }; diff --git a/src/widgets/itemviews/qheaderview_p.h b/src/widgets/itemviews/qheaderview_p.h index 24dc3bf075..d9fc1baec5 100644 --- a/src/widgets/itemviews/qheaderview_p.h +++ b/src/widgets/itemviews/qheaderview_p.h @@ -120,8 +120,12 @@ public: void updateHiddenSections(int logicalFirst, int logicalLast); void resizeSections(QHeaderView::ResizeMode globalMode, bool useGlobalMode = false); void _q_sectionsRemoved(const QModelIndex &,int,int); - void _q_sectionsAboutToBeChanged(); - void _q_sectionsChanged(); + void _q_sectionsAboutToBeMoved(const QModelIndex &sourceParent, int logicalStart, int logicalEnd, const QModelIndex &destinationParent, int logicalDestination); + void _q_sectionsMoved(const QModelIndex &sourceParent, int logicalStart, int logicalEnd, const QModelIndex &destinationParent, int logicalDestination); + void _q_sectionsAboutToBeChanged(const QList &parents = QList(), + QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint); + void _q_sectionsChanged(const QList &parents = QList(), + QAbstractItemModel::LayoutChangeHint hint = QAbstractItemModel::NoLayoutChangeHint); bool isSectionSelected(int section) const; bool isFirstVisibleSection(int section) const; From 0da3ebd9940a214cc7ea292d13cd86967cd89a66 Mon Sep 17 00:00:00 2001 From: Andy Shaw Date: Fri, 2 Mar 2018 15:13:45 +0100 Subject: [PATCH 04/10] moc: Don't error our when parsing "using namespace __identifier(...)" This follows on from a2322519929bd36a90422dccc0310b8230729197 which covered a similar instance of this. As with that change, we should not abort the compilation, just ignore it. Task-number: QTBUG-63772 Change-Id: Ide958080a90f43ed19edd8a320e7d45de1c96821 Reviewed-by: Olivier Goffart (Woboq GmbH) --- src/tools/moc/moc.cpp | 3 +++ tests/auto/tools/moc/namespace.h | 1 + 2 files changed, 4 insertions(+) diff --git a/src/tools/moc/moc.cpp b/src/tools/moc/moc.cpp index b9f71ddb15..61a5542c83 100644 --- a/src/tools/moc/moc.cpp +++ b/src/tools/moc/moc.cpp @@ -674,6 +674,9 @@ void Moc::parse() if (test(NAMESPACE)) { while (test(SCOPE) || test(IDENTIFIER)) ; + // Ignore invalid code such as: 'using namespace __identifier("x")' (QTBUG-63772) + if (test(LPAREN)) + until(RPAREN); next(SEMIC); } break; diff --git a/tests/auto/tools/moc/namespace.h b/tests/auto/tools/moc/namespace.h index 43d00e82f3..7f1e46cd62 100644 --- a/tests/auto/tools/moc/namespace.h +++ b/tests/auto/tools/moc/namespace.h @@ -76,6 +76,7 @@ namespace FooNamespace { #ifdef Q_MOC_RUN namespace __identifier("") {} // QTBUG-56634 +using namespace __identifier(""); // QTBUG-63772 #endif #endif // NAMESPACE_H From b02887735707fa16c7a8156f35ad23235be4b928 Mon Sep 17 00:00:00 2001 From: Kari Oikarinen Date: Fri, 2 Mar 2018 14:35:35 +0200 Subject: [PATCH 05/10] Blacklist tst_QGraphicsView::itemsInRect_cosmeticAdjust on Ubuntu Has been flaky in CI. Task-number: QTBUG-66815 Task-number: QTBUG-66216 Change-Id: I2c3eb42507eae618486aa402474b4b3f85ff310e Reviewed-by: Frederik Gladhorn --- tests/auto/widgets/graphicsview/qgraphicsview/BLACKLIST | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/auto/widgets/graphicsview/qgraphicsview/BLACKLIST b/tests/auto/widgets/graphicsview/qgraphicsview/BLACKLIST index bc83dad714..e3d968b4f2 100644 --- a/tests/auto/widgets/graphicsview/qgraphicsview/BLACKLIST +++ b/tests/auto/widgets/graphicsview/qgraphicsview/BLACKLIST @@ -16,3 +16,6 @@ xcb xcb [update2] opensuse-42.3 +[itemsInRect_cosmeticAdjust] +# QTBUG-66815 +ubuntu-16.04 From a0db55040d21d17b1bba2ab406cb51c0f3a671aa Mon Sep 17 00:00:00 2001 From: Liang Qi Date: Sat, 3 Mar 2018 14:25:34 +0100 Subject: [PATCH 06/10] Blacklist tst_QWindow::modalWindowEnterEventOnHide_QTBUG35109 on windows ci Task-number: QTBUG-66756 Change-Id: I5a00625b73085a9ac2471b03bcc21db4b9a98962 Reviewed-by: Kari Oikarinen Reviewed-by: Friedemann Kleint --- tests/auto/gui/kernel/qwindow/BLACKLIST | 1 + 1 file changed, 1 insertion(+) diff --git a/tests/auto/gui/kernel/qwindow/BLACKLIST b/tests/auto/gui/kernel/qwindow/BLACKLIST index 5e44747190..5c20e5fd43 100644 --- a/tests/auto/gui/kernel/qwindow/BLACKLIST +++ b/tests/auto/gui/kernel/qwindow/BLACKLIST @@ -11,6 +11,7 @@ ubuntu-16.04 [modalWindowEnterEventOnHide_QTBUG35109] ubuntu-16.04 osx ci +windows ci [modalDialogClosingOneOfTwoModal] osx [modalWindowModallity] From 2203bb580dbd40cb51a61a0179548550f1041539 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20Klitzing?= Date: Fri, 2 Mar 2018 22:34:24 +0100 Subject: [PATCH 07/10] Remove unused variable Found by spotbugs. Change-Id: I0aa81e45ced0a995adb5e4a45be925e5ef219a77 Reviewed-by: Eskil Abrahamsen Blomfeldt --- .../java/src/org/qtproject/qt5/android/bindings/QtLoader.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java b/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java index fb6f61e31e..424bf45c53 100644 --- a/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java +++ b/src/android/java/src/org/qtproject/qt5/android/bindings/QtLoader.java @@ -438,7 +438,6 @@ public abstract class QtLoader { { String key = BUNDLED_IN_LIB_RESOURCE_ID_KEY; - java.util.Set keys = m_contextInfo.metaData.keySet(); if (m_contextInfo.metaData.containsKey(key)) { String[] list = m_context.getResources().getStringArray(m_contextInfo.metaData.getInt(key)); From 57b1be158e9e9745219838313fed730aaf4937b6 Mon Sep 17 00:00:00 2001 From: Simon Hausmann Date: Wed, 23 Aug 2017 16:13:49 +0200 Subject: [PATCH 08/10] Fix docs of QTextDocument::find with regards to default case sensitivity The default value for a default constructed FindFlags QFlag is zero and FindCaseSensitively is 0x2. Therefore the default behavior for find() is case insensitive. Change-Id: Id3419c3562fc6170fdb281098a22dd8205603847 Task-number: QTBUG-62660 Reviewed-by: Eskil Abrahamsen Blomfeldt --- src/gui/text/qtextdocument.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/gui/text/qtextdocument.cpp b/src/gui/text/qtextdocument.cpp index d95932f4db..e27b388762 100644 --- a/src/gui/text/qtextdocument.cpp +++ b/src/gui/text/qtextdocument.cpp @@ -1349,7 +1349,7 @@ QTextCursor QTextDocument::find(const QString &subString, int from, FindFlags op If the given \a cursor has a selection, the search begins after the selection; otherwise it begins at the cursor's position. - By default the search is case-sensitive, and can match text anywhere in the + By default the search is case insensitive, and can match text anywhere in the document. */ QTextCursor QTextDocument::find(const QString &subString, const QTextCursor &cursor, FindFlags options) const @@ -1472,7 +1472,7 @@ QTextCursor QTextDocument::find(const QRegExp & expr, int from, FindFlags option If the given \a cursor has a selection, the search begins after the selection; otherwise it begins at the cursor's position. - By default the search is case-sensitive, and can match text anywhere in the + By default the search is case insensitive, and can match text anywhere in the document. */ QTextCursor QTextDocument::find(const QRegExp &expr, const QTextCursor &cursor, FindFlags options) const @@ -1599,7 +1599,7 @@ QTextCursor QTextDocument::find(const QRegularExpression &expr, int from, FindFl If the given \a cursor has a selection, the search begins after the selection; otherwise it begins at the cursor's position. - By default the search is case-sensitive, and can match text anywhere in the + By default the search is case insensitive, and can match text anywhere in the document. */ QTextCursor QTextDocument::find(const QRegularExpression &expr, const QTextCursor &cursor, FindFlags options) const From f25416cd0840536c836ac383a5c48c6c18f89ea2 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Fri, 2 Mar 2018 15:18:08 +0100 Subject: [PATCH 09/10] Don't skip tst_QWindow::windowModality_QTBUG27039 on Wayland The test actually passes, so there's no need to skip it. Task-number: QTBUG-66824 Change-Id: Id091776ff7ca7637fdcf0e0ced833982b5788d92 Reviewed-by: Shawn Rutledge --- tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 3 --- 1 file changed, 3 deletions(-) diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index 34754670de..b45871183e 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -1726,9 +1726,6 @@ void tst_QWindow::tabletEvents() void tst_QWindow::windowModality_QTBUG27039() { - if (!QGuiApplication::platformName().compare(QLatin1String("wayland"), Qt::CaseInsensitive)) - QSKIP("Wayland: This fails. Figure out why."); - QWindow parent; parent.setGeometry(QRect(m_availableTopLeft + QPoint(10, 10), m_testWindowSize)); parent.show(); From 681933c5b8656543c4974a1db5fde093f2934189 Mon Sep 17 00:00:00 2001 From: Johan Klokkhammer Helsing Date: Fri, 2 Mar 2018 15:24:09 +0100 Subject: [PATCH 10/10] Make tst_QWindow::generatedMouseMove pass on Wayland By using qWaitForWindowExposed instead of qWaitForWindowActivated. Task-number: QTBUG-66824 Change-Id: Idf604157070731d9c92ccf64d8349c8571960b7c Reviewed-by: Shawn Rutledge --- tests/auto/gui/kernel/qwindow/tst_qwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp index b45871183e..d2c3f4a56b 100644 --- a/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp +++ b/tests/auto/gui/kernel/qwindow/tst_qwindow.cpp @@ -2319,7 +2319,7 @@ void tst_QWindow::generatedMouseMove() w.setGeometry(QRect(m_availableTopLeft + QPoint(100, 100), m_testWindowSize)); w.setFlags(w.flags() | Qt::FramelessWindowHint); // ### FIXME: QTBUG-63542 w.show(); - QVERIFY(QTest::qWaitForWindowActive(&w)); + QVERIFY(QTest::qWaitForWindowExposed(&w)); QPoint point(10, 10); QPoint step(2, 2);