diff options
author | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-02-18 14:19:36 +0100 |
---|---|---|
committer | Frederik Gladhorn <frederik.gladhorn@digia.com> | 2014-02-18 14:19:36 +0100 |
commit | 6aa09bbce59828d028f6d1e81d2bfc6ba537aae1 (patch) | |
tree | 9ba857247c0862fa6636766fad9cdab146c9c19b /src/corelib | |
parent | f4044e853cdb66a7f7f7e61df78434243b85b03d (diff) | |
parent | 21fbca97a8ee284ff6ffaff64c180700cc5537ab (diff) |
Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
src/plugins/platforms/android/qandroidplatformtheme.h
Change-Id: I541bd3069df3ab54c7942d5f4a9e155e3b6566a0
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/io/qurl.cpp | 20 | ||||
-rw-r--r-- | src/corelib/tools/qalgorithms.qdoc | 54 | ||||
-rw-r--r-- | src/corelib/tools/qstring.cpp | 2 |
3 files changed, 42 insertions, 34 deletions
diff --git a/src/corelib/io/qurl.cpp b/src/corelib/io/qurl.cpp index f17215964f..7018b333f2 100644 --- a/src/corelib/io/qurl.cpp +++ b/src/corelib/io/qurl.cpp @@ -3542,9 +3542,13 @@ bool QUrl::operator ==(const QUrl &url) const if (!url.d) return d->isEmpty(); - // Compare which sections are present, but ignore Host - // which is set by parsing but not by construction, when empty. - const int mask = QUrlPrivate::FullUrl & ~QUrlPrivate::Host; + // First, compare which sections are present, since it speeds up the + // processing considerably. We just have to ignore the host-is-present flag + // for local files (the "file" protocol), due to the requirements of the + // XDG file URI specification. + int mask = QUrlPrivate::FullUrl; + if (isLocalFile()) + mask &= ~QUrlPrivate::Host; return (d->sectionIsPresent & mask) == (url.d->sectionIsPresent & mask) && d->scheme == url.d->scheme && d->userName == url.d->userName && @@ -3575,9 +3579,13 @@ bool QUrl::matches(const QUrl &url, FormattingOptions options) const if (!url.d) return d->isEmpty(); - // Compare which sections are present, but ignore Host - // which is set by parsing but not by construction, when empty. - int mask = QUrlPrivate::FullUrl & ~QUrlPrivate::Host; + // First, compare which sections are present, since it speeds up the + // processing considerably. We just have to ignore the host-is-present flag + // for local files (the "file" protocol), due to the requirements of the + // XDG file URI specification. + int mask = QUrlPrivate::FullUrl; + if (isLocalFile()) + mask &= ~QUrlPrivate::Host; if (options & QUrl::RemoveScheme) mask &= ~QUrlPrivate::Scheme; diff --git a/src/corelib/tools/qalgorithms.qdoc b/src/corelib/tools/qalgorithms.qdoc index 8feb180248..2551233aec 100644 --- a/src/corelib/tools/qalgorithms.qdoc +++ b/src/corelib/tools/qalgorithms.qdoc @@ -230,7 +230,7 @@ /*! \fn OutputIterator qCopy(InputIterator begin1, InputIterator end1, OutputIterator begin2) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::copy instead. @@ -249,7 +249,7 @@ /*! \fn BiIterator2 qCopyBackward(BiIterator1 begin1, BiIterator1 end1, BiIterator2 end2) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::copy_backward instead. @@ -268,7 +268,7 @@ /*! \fn bool qEqual(InputIterator1 begin1, InputIterator1 end1, InputIterator2 begin2) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::equal instead. @@ -287,7 +287,7 @@ /*! \fn void qFill(ForwardIterator begin, ForwardIterator end, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::fill instead. @@ -301,7 +301,7 @@ /*! \fn void qFill(Container &container, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::fill instead. @@ -311,7 +311,7 @@ /*! \fn InputIterator qFind(InputIterator begin, InputIterator end, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::find instead. @@ -334,7 +334,7 @@ /*! \fn void qFind(const Container &container, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::find instead. @@ -344,7 +344,7 @@ /*! \fn void qCount(InputIterator begin, InputIterator end, const T &value, Size &n) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::count instead. @@ -364,7 +364,7 @@ /*! \fn void qCount(const Container &container, const T &value, Size &n) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::count instead. @@ -376,7 +376,7 @@ /*! \fn void qSwap(T &var1, T &var2) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::swap instead. @@ -388,7 +388,7 @@ /*! \fn void qSort(RandomAccessIterator begin, RandomAccessIterator end) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::sort instead. @@ -413,7 +413,7 @@ /*! \fn void qSort(RandomAccessIterator begin, RandomAccessIterator end, LessThan lessThan) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::sort instead. @@ -449,7 +449,7 @@ /*! \fn void qSort(Container &container) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::sort instead. @@ -460,7 +460,7 @@ /*! \fn void qStableSort(RandomAccessIterator begin, RandomAccessIterator end) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::stable_sort instead. @@ -487,7 +487,7 @@ /*! \fn void qStableSort(RandomAccessIterator begin, RandomAccessIterator end, LessThan lessThan) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::stable_sort instead. @@ -519,7 +519,7 @@ /*! \fn void qStableSort(Container &container) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::stable_sort instead. @@ -529,7 +529,7 @@ /*! \fn RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::lower_bound instead. @@ -558,7 +558,7 @@ /*! \fn RandomAccessIterator qLowerBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::lower_bound instead. @@ -573,7 +573,7 @@ /*! \fn void qLowerBound(const Container &container, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::lower_bound instead. @@ -586,7 +586,7 @@ /*! \fn RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::upper_bound instead. @@ -615,7 +615,7 @@ /*! \fn RandomAccessIterator qUpperBound(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::upper_bound instead. @@ -630,7 +630,7 @@ /*! \fn void qUpperBound(const Container &container, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::upper_bound instead. @@ -641,7 +641,7 @@ /*! \fn RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated Use std::binary_search or std::lower_bound instead. @@ -667,7 +667,7 @@ /*! \fn RandomAccessIterator qBinaryFind(RandomAccessIterator begin, RandomAccessIterator end, const T &value, LessThan lessThan) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::binary_search or std::lower_bound instead. @@ -682,7 +682,7 @@ /*! \fn void qBinaryFind(const Container &container, const T &value) \relates <QtAlgorithms> - \obsolete + \deprecated \overload Use std::binary_search or std::lower_bound instead. @@ -725,7 +725,7 @@ /*! \fn LessThan qLess() \relates <QtAlgorithms> - \obsolete + \deprecated Use std::less instead. @@ -741,7 +741,7 @@ /*! \fn LessThan qGreater() \relates <QtAlgorithms> - \obsolete + \deprecated Use std::greater instead. diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp index 673363c66f..50f616a010 100644 --- a/src/corelib/tools/qstring.cpp +++ b/src/corelib/tools/qstring.cpp @@ -3696,7 +3696,7 @@ bool QString::contains(const QRegularExpression &re) const If the match is successful and \a match is not a null pointer, it also writes the results of the match into the QRegularExpressionMatch object - pointed by \a match. + pointed to by \a match. \sa QRegularExpression::match() */ |