summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKarsten Heimrich <karsten.heimrich@qt.io>2020-01-07 14:52:53 +0100
committerKarsten Heimrich <karsten.heimrich@qt.io>2020-01-08 09:47:59 +0100
commit84bf4d90b7154940486d3c3969a81c259496e830 (patch)
tree0cfadfc3bbbae0ed7d95128b800d8a209048eff6 /src
parent8040f11f1d82cbaa44071fc8c6cf7244022146cf (diff)
Fix comile issues with VS 2017
'QTypedArrayData<T>::iterator QVector<T>::insert(int,QItemSelectionRange &&)': cannot convert argument 1 from 'QTypedArrayData<T>::iterator' to 'int' 'bool QVector<QItemSelectionRange>::isValidIterator(QTypedArrayData<T>::const_iterator) const': cannot convert argument 1 from 'QTypedArrayData<T>::iterator' to 'QTypedArrayData<T>::const_iterator' Change-Id: Id43ca5a9cd7b5709d47515ffdab3896feb298087 Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Diffstat (limited to 'src')
-rw-r--r--src/corelib/tools/qvector.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index 8d01b7ec12..3e98de41f4 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -508,10 +508,10 @@ inline void QVector<T>::remove(int i, int n)
template <typename T>
inline void QVector<T>::prepend(const T &t)
-{ insert(begin(), 1, t); }
+{ insert(0, 1, t); }
template <typename T>
void QVector<T>::prepend(rvalue_ref t)
-{ insert(begin(), std::move(t)); }
+{ insert(0, std::move(t)); }
template<typename T>
inline T QVector<T>::value(int i, const T &defaultValue) const
@@ -618,8 +618,8 @@ QVector<T>::insert(int i, rvalue_ref t)
template <typename T>
typename QVector<T>::iterator QVector<T>::erase(iterator abegin, iterator aend)
{
- Q_ASSERT_X(isValidIterator(abegin), "QVector::erase", "The specified iterator argument 'abegin' is invalid");
- Q_ASSERT_X(isValidIterator(aend), "QVector::erase", "The specified iterator argument 'aend' is invalid");
+ Q_ASSERT_X(isValidIterator(const_iterator(abegin)), "QVector::erase", "The specified iterator argument 'abegin' is invalid");
+ Q_ASSERT_X(isValidIterator(const_iterator(aend)), "QVector::erase", "The specified iterator argument 'aend' is invalid");
Q_ASSERT(aend >= abegin);
// d.begin() so we don't detach just yet