diff options
author | Liang Qi <liang.qi@qt.io> | 2017-05-31 18:54:04 +0000 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2017-05-31 18:54:04 +0000 |
commit | e3bc01b0e339aa3730c619fb02201aa09468d557 (patch) | |
tree | ace583c75770f52f65b9d78c62303693038f672c /src | |
parent | f33cf18d882ada727da0f378525e55d9421e3b16 (diff) | |
parent | 7ee80242de2744790e5c35662c14594981f8586d (diff) |
Merge "Merge remote-tracking branch 'origin/5.9.0' into 5.9" into refs/staging/5.9
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/configure.json | 1 | ||||
-rw-r--r-- | src/widgets/itemviews/qheaderview.cpp | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/gui/configure.json b/src/gui/configure.json index 93098a4b58..a5101817b7 100644 --- a/src/gui/configure.json +++ b/src/gui/configure.json @@ -443,7 +443,6 @@ "combined-angle-lib": { "label": "Combined ANGLE Library", "autoDetect": false, - "enable": "features.angle", "condition": "features.angle", "output": [ "publicFeature" ] }, diff --git a/src/widgets/itemviews/qheaderview.cpp b/src/widgets/itemviews/qheaderview.cpp index e0e993ce77..76f80c680e 100644 --- a/src/widgets/itemviews/qheaderview.cpp +++ b/src/widgets/itemviews/qheaderview.cpp @@ -3876,9 +3876,11 @@ bool QHeaderViewPrivate::read(QDataStream &in) const int currentCount = (orient == Qt::Horizontal ? model->columnCount(root) : model->rowCount(root)); if (newSectionItems.count() < currentCount) { // we have sections not in the saved state, give them default settings - for (int i = newSectionItems.count(); i < currentCount; ++i) { - visualIndicesIn.append(i); - logicalIndicesIn.append(i); + if (!visualIndicesIn.isEmpty() && !logicalIndicesIn.isEmpty()) { + for (int i = newSectionItems.count(); i < currentCount; ++i) { + visualIndicesIn.append(i); + logicalIndicesIn.append(i); + } } const int insertCount = currentCount - newSectionItems.count(); const int insertLength = defaultSectionSizeIn * insertCount; |