summaryrefslogtreecommitdiffstats
path: root/src/corelib/tools
diff options
context:
space:
mode:
authorLiang Qi <liang.qi@theqtcompany.com>2015-12-02 23:33:06 +0100
committerLiang Qi <liang.qi@theqtcompany.com>2015-12-02 23:33:06 +0100
commit72f5867f144cec8fc7848cbcc772683fe845652d (patch)
tree7513af27b59332bf111f406d304977adc8c8612e /src/corelib/tools
parent13777097118c496391d4b9656b95097ac25e4a40 (diff)
parentbf0af8b5a24de7e595929a64948a3548936aaaee (diff)
Merge remote-tracking branch 'origin/5.6' into dev
Conflicts: src/corelib/kernel/qcoreapplication.cpp src/corelib/kernel/qeventdispatcher_blackberry.cpp src/network/bearer/qnetworkconfiguration.cpp src/plugins/bearer/blackberry/qbbengine.cpp src/plugins/platforms/android/androidjnimain.cpp src/plugins/platforms/android/qandroidplatformtheme.cpp src/plugins/platforms/qnx/qqnxbpseventfilter.cpp src/plugins/platforms/qnx/qqnxfiledialoghelper_bb10.cpp src/plugins/platforms/qnx/qqnxinputcontext_imf.cpp src/plugins/platforms/qnx/qqnxintegration.cpp src/plugins/platforms/qnx/qqnxnavigatorbps.cpp src/plugins/platforms/qnx/qqnxvirtualkeyboardbps.cpp src/plugins/platforms/qnx/qqnxwindow.cpp src/widgets/kernel/qwidgetwindow.cpp src/widgets/styles/qwindowsvistastyle.cpp src/widgets/styles/qwindowsxpstyle.cpp src/widgets/widgets/qtoolbararealayout.cpp tests/auto/corelib/global/qflags/qflags.pro tests/auto/corelib/itemmodels/qitemmodel/modelstotest.cpp tests/auto/corelib/tools/qversionnumber/qversionnumber.pro tests/auto/widgets/dialogs/qfilesystemmodel/tst_qfilesystemmodel.cpp Change-Id: I37be88c6c185bb85404823353e027a0a6acdbce4
Diffstat (limited to 'src/corelib/tools')
-rw-r--r--src/corelib/tools/qcollator.cpp2
-rw-r--r--src/corelib/tools/qlist.cpp4
-rw-r--r--src/corelib/tools/qvector.cpp3
-rw-r--r--src/corelib/tools/qvector.h3
4 files changed, 7 insertions, 5 deletions
diff --git a/src/corelib/tools/qcollator.cpp b/src/corelib/tools/qcollator.cpp
index 59f8f66869..bbe2e28ea8 100644
--- a/src/corelib/tools/qcollator.cpp
+++ b/src/corelib/tools/qcollator.cpp
@@ -248,6 +248,8 @@ bool QCollator::numericMode() const
The default is locale dependent.
+ \note This method is not currently supported on Apple platforms or if Qt is configured to not use ICU on Linux.
+
\sa ignorePunctuation()
*/
void QCollator::setIgnorePunctuation(bool on)
diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp
index 8ed0da7ca0..5710f3925b 100644
--- a/src/corelib/tools/qlist.cpp
+++ b/src/corelib/tools/qlist.cpp
@@ -820,8 +820,8 @@ void **QListData::erase(void **xi)
/*! \fn void QList::insert(int i, const T &value)
- Inserts \a value at index position \a i in the list. If \a i
- is 0, the value is prepended to the list. If \a i is size(), the
+ Inserts \a value at index position \a i in the list. If \a i <= 0,
+ the value is prepended to the list. If \a i >= size(), the
value is appended to the list.
Example:
diff --git a/src/corelib/tools/qvector.cpp b/src/corelib/tools/qvector.cpp
index 0fcba3c0c4..f1cf23cc6a 100644
--- a/src/corelib/tools/qvector.cpp
+++ b/src/corelib/tools/qvector.cpp
@@ -384,6 +384,9 @@
initialized with a \l{default-constructed value}. If \a size is less
than the current size, elements are removed from the end.
+ Since Qt 5.6, resize() doesn't shrink the capacity anymore.
+ To shed excess capacity, use squeeze().
+
\sa size()
*/
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 890dbd317d..3ce33fb477 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -406,9 +406,6 @@ void QVector<T>::resize(int asize)
if (asize > oldAlloc) { // there is not enough space
newAlloc = asize;
opt = QArrayData::Grow;
- } else if (!d->capacityReserved && asize < d->size && asize < (oldAlloc >> 1)) { // we want to shrink
- newAlloc = asize;
- opt = QArrayData::Grow;
} else {
newAlloc = oldAlloc;
}