summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/corelib/io/qurl.cpp20
-rw-r--r--src/corelib/tools/qalgorithms.qdoc54
-rw-r--r--src/corelib/tools/qstring.cpp2
-rw-r--r--src/gui/kernel/qguiapplication.cpp88
-rw-r--r--src/gui/text/qtextdocumentlayout.cpp7
-rw-r--r--src/plugins/platforms/android/androidjnimain.cpp1
-rw-r--r--src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp2
-rw-r--r--src/plugins/platforms/android/qandroidplatformintegration.h1
-rw-r--r--src/plugins/platforms/android/qandroidplatformtheme.h2
-rw-r--r--src/widgets/doc/src/model-view-programming.qdoc2
-rw-r--r--tests/auto/corelib/io/qurl/tst_qurl.cpp52
-rw-r--r--tests/auto/gui/text/qfont/tst_qfont.cpp2
-rw-r--r--tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp10
-rw-r--r--tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp5
14 files changed, 182 insertions, 66 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()
*/
diff --git a/src/gui/kernel/qguiapplication.cpp b/src/gui/kernel/qguiapplication.cpp
index 3953437372..c587e51299 100644
--- a/src/gui/kernel/qguiapplication.cpp
+++ b/src/gui/kernel/qguiapplication.cpp
@@ -464,20 +464,65 @@ static QWindowGeometrySpecification windowGeometrySpecification;
\note \a argc and \a argv might be changed as Qt removes command line
arguments that it recognizes.
+ \section1 Supported Command Line Options
+
All Qt programs automatically support the following command line options:
\list
- \li -reverse, sets the application's layout direction to
- Qt::RightToLeft
- \li -qmljsdebugger=, activates the QML/JS debugger with a specified port.
- The value must be of format port:1234[,block], where block is optional
+
+ \li \c{-platform} \e {platformName[:options]}, specifies the
+ \l{Qt Platform Abstraction} (QPA) plugin.
+
+ Overridden by the \c QT_QPA_PLATFORM environment variable.
+ \li \c{-platformpluginpath} \e path, specifies the path to platform
+ plugins.
+
+ Overridden by the \c QT_QPA_PLATFORM_PLUGIN_PATH environment
+ variable.
+
+ \li \c{-platformtheme} \e platformTheme, specifies the platform theme.
+
+ Overridden by the \c QT_QPA_PLATFORMTHEME environment variable.
+ \li \c{-qmljsdebugger=}, activates the QML/JS debugger with a specified port.
+ The value must be of format \c{port:1234}\e{[,block]}, where
+ \e block is optional
and will make the application wait until a debugger connects to it.
- \li -session \e session, restores the application from an earlier
+ \li \c {-qwindowgeometry} \e geometry, specifies window geometry for
+ the main window using the X11-syntax. For example:
+ \c {-qwindowgeometry 100x100+50+50}
+ \li \c{-reverse}, sets the application's layout direction to
+ Qt::RightToLeft
+ \li \c{-session} \e session, restores the application from an earlier
\l{Session Management}{session}.
\li -qwindowgeometry, sets the geometry of the first window
\li -qwindowtitle, sets the title of the first window
\endlist
- \sa arguments()
+ The following standard command line options are available for X11:
+
+ \list
+ \li \c {-display} \e {hostname:screen_number}, switches displays on X11.
+ \li \c {-geometry} \e geometry, same as \c {-qwindowgeometry}.
+ \endlist
+
+ \section1 Platform-Specific Arguments
+
+ You can specify platform-specific arguments for the \c{-platform} option.
+ Place them after the platform plugin name following a colon as a
+ comma-separated list. For example,
+ \c{-platform windows:dialogs=xp,fontengine=freetype}.
+
+ The following parameters are available for \c {-platform windows}:
+
+ \list
+ \li \c {dialogs=[xp|none]}, \c xp uses XP-style native dialogs and
+ \c none disables them.
+ \li \c {fontengine=freetype}, uses the FreeType font engine.
+ \endlist
+
+ For more information about the platform-specific arguments available for
+ embedded Linux platforms, see \l{Qt for Embedded Linux}.
+
+ \sa arguments() QGuiApplication::platformName
*/
#ifdef Q_QDOC
QGuiApplication::QGuiApplication(int &argc, char **argv)
@@ -885,8 +930,35 @@ QWindow *QGuiApplication::topLevelAt(const QPoint &pos)
\property QGuiApplication::platformName
\brief The name of the underlying platform plugin.
- Examples: "xcb" (for X11), "Cocoa" (for Mac OS X), "windows", "qnx",
- "directfb", "kms", "MinimalEgl", "LinuxFb", "EglFS", "OpenWFD"...
+ The QPA platform plugins are located in \c {qtbase\src\plugins\platforms}.
+ At the time of writing, the following platform plugin names are supported:
+
+ \list
+ \li \c android
+ \li \c cocoa is a platform plugin for Mac OS X.
+ \li \c directfb
+ \li \c eglfs is a platform plugin for running Qt5 applications on top of
+ EGL and OpenGL ES 2.0 without an actual windowing system (like X11
+ or Wayland). For more information, see \l{EGLFS}.
+ \li \c ios
+ \li \c kms is an experimental platform plugin using kernel modesetting
+ and \l{http://dri.freedesktop.org/wiki/DRM}{DRM} (Direct Rendering
+ Manager).
+ \li \c linuxfb writes directly to the framebuffer. For more information,
+ see \l{LinuxFB}.
+ \li \c minimal is provided as an examples for developers who want to
+ write their own platform plugins. However, you can use the plugin to
+ run GUI applications in environments without a GUI, such as servers.
+ \li \c minimalegl is an example plugin.
+ \li \c offscreen
+ \li \c openwfd
+ \li \c qnx
+ \li \c windows
+ \li \c xcb is the X11 plugin used on regular desktop Linux platforms.
+ \endlist
+
+ For more information about the platform plugins for embedded Linux devices,
+ see \l{Qt for Embedded Linux}.
*/
QString QGuiApplication::platformName()
diff --git a/src/gui/text/qtextdocumentlayout.cpp b/src/gui/text/qtextdocumentlayout.cpp
index 313700429c..b2c82b8654 100644
--- a/src/gui/text/qtextdocumentlayout.cpp
+++ b/src/gui/text/qtextdocumentlayout.cpp
@@ -2883,11 +2883,11 @@ void QTextDocumentLayout::documentChanged(int from, int oldLength, int length)
{
Q_D(QTextDocumentLayout);
- QTextBlock blockIt = document()->findBlock(from);
+ QTextBlock startIt = document()->findBlock(from);
QTextBlock endIt = document()->findBlock(qMax(0, from + length - 1));
if (endIt.isValid())
endIt = endIt.next();
- for (; blockIt.isValid() && blockIt != endIt; blockIt = blockIt.next())
+ for (QTextBlock blockIt = startIt; blockIt.isValid() && blockIt != endIt; blockIt = blockIt.next())
blockIt.clearLayout();
if (d->docPrivate->pageSize.isNull())
@@ -2929,6 +2929,9 @@ void QTextDocumentLayout::documentChanged(int from, int oldLength, int length)
d->insideDocumentChange = false;
+ for (QTextBlock blockIt = startIt; blockIt.isValid() && blockIt != endIt; blockIt = blockIt.next())
+ emit updateBlock(blockIt);
+
if (d->showLayoutProgress) {
const QSizeF newSize = dynamicDocumentSize();
if (newSize != d->lastReportedSize) {
diff --git a/src/plugins/platforms/android/androidjnimain.cpp b/src/plugins/platforms/android/androidjnimain.cpp
index c904ddb3ac..28a5da4b5d 100644
--- a/src/plugins/platforms/android/androidjnimain.cpp
+++ b/src/plugins/platforms/android/androidjnimain.cpp
@@ -63,7 +63,6 @@
#include "androidjnimenu.h"
#include "qandroidplatformdialoghelpers.h"
#include "qandroidplatformintegration.h"
-#include <QtWidgets/QApplication>
#include <qabstracteventdispatcher.h>
diff --git a/src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp b/src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp
index fa123827e7..e76eedbfd9 100644
--- a/src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp
+++ b/src/plugins/platforms/android/qandroidplatformdialoghelpers.cpp
@@ -39,8 +39,6 @@
**
****************************************************************************/
-#include <QtWidgets/QApplication>
-#include <QtWidgets/QStyle>
#include "qandroidplatformdialoghelpers.h"
#include "androidjnimain.h"
#include <private/qguiapplication_p.h>
diff --git a/src/plugins/platforms/android/qandroidplatformintegration.h b/src/plugins/platforms/android/qandroidplatformintegration.h
index 0dc2415337..2d685bc567 100644
--- a/src/plugins/platforms/android/qandroidplatformintegration.h
+++ b/src/plugins/platforms/android/qandroidplatformintegration.h
@@ -45,7 +45,6 @@
#include <qpa/qplatformintegration.h>
#include <qpa/qplatformmenu.h>
#include <qpa/qplatformnativeinterface.h>
-#include <QtWidgets/QAction>
#include <EGL/egl.h>
#include <jni.h>
diff --git a/src/plugins/platforms/android/qandroidplatformtheme.h b/src/plugins/platforms/android/qandroidplatformtheme.h
index 9df445ef17..fecd7ca8e9 100644
--- a/src/plugins/platforms/android/qandroidplatformtheme.h
+++ b/src/plugins/platforms/android/qandroidplatformtheme.h
@@ -43,7 +43,7 @@
#define QANDROIDPLATFORMTHEME_H
#include <qpa/qplatformtheme.h>
-#include <QPalette>
+#include <QtGui/qpalette.h>
class QAndroidPlatformNativeInterface;
class QAndroidPlatformTheme: public QPlatformTheme
diff --git a/src/widgets/doc/src/model-view-programming.qdoc b/src/widgets/doc/src/model-view-programming.qdoc
index 3d3b6da819..3a8fd54bcf 100644
--- a/src/widgets/doc/src/model-view-programming.qdoc
+++ b/src/widgets/doc/src/model-view-programming.qdoc
@@ -217,7 +217,7 @@
\section1 Using models and views
The following sections explain how to use the model/view pattern
- in Qt. Each section includes an an example and is followed by a
+ in Qt. Each section includes an example and is followed by a
section showing how to create new components.
\section2 Two models included in Qt
diff --git a/tests/auto/corelib/io/qurl/tst_qurl.cpp b/tests/auto/corelib/io/qurl/tst_qurl.cpp
index 12b9159bf2..92dbb96817 100644
--- a/tests/auto/corelib/io/qurl/tst_qurl.cpp
+++ b/tests/auto/corelib/io/qurl/tst_qurl.cpp
@@ -169,6 +169,7 @@ private slots:
void fileName();
void isEmptyForEncodedUrl();
void toEncodedNotUsingUninitializedPath();
+ void emptyAuthorityRemovesExistingAuthority_data();
void emptyAuthorityRemovesExistingAuthority();
void acceptEmptyAuthoritySegments();
void lowercasesScheme();
@@ -3033,31 +3034,56 @@ void tst_QUrl::resolvedWithAbsoluteSchemes_data() const
<< QUrl::fromEncoded("http://andreas:hemmelig@www.vg.no/?my=query&your=query#yougotfragged");
}
+void tst_QUrl::emptyAuthorityRemovesExistingAuthority_data()
+{
+ QTest::addColumn<QString>("input");
+ QTest::addColumn<QString>("expected");
+ QTest::newRow("regular") << "foo://example.com/something" << "foo:/something";
+ QTest::newRow("empty") << "foo:///something" << "foo:/something";
+}
+
void tst_QUrl::emptyAuthorityRemovesExistingAuthority()
{
- QUrl url("http://example.com/something");
+ QFETCH(QString, input);
+ QFETCH(QString, expected);
+ QUrl url(input);
+ QUrl orig = url;
+
url.setAuthority(QString());
QCOMPARE(url.authority(), QString());
+ QVERIFY(url != orig);
+ QCOMPARE(url.toString(), expected);
+ QCOMPARE(url, QUrl(expected));
}
void tst_QUrl::acceptEmptyAuthoritySegments()
{
QCOMPARE(QUrl("remote://").toString(), QString::fromLatin1("remote://"));
- // Verify that foo:///bar is not mangled to foo:/bar
+ // Verify that foo:///bar is not mangled to foo:/bar nor vice-versa
QString foo_triple_bar("foo:///bar"), foo_uni_bar("foo:/bar");
- QCOMPARE(foo_triple_bar, QUrl(foo_triple_bar).toString());
- QCOMPARE(foo_triple_bar, QString::fromUtf8(QUrl(foo_triple_bar).toEncoded()));
+ QVERIFY(QUrl(foo_triple_bar) != QUrl(foo_uni_bar));
+
+ QCOMPARE(QUrl(foo_triple_bar).toString(), foo_triple_bar);
+ QCOMPARE(QUrl(foo_triple_bar).toEncoded(), foo_triple_bar.toLatin1());
+
+ QCOMPARE(QUrl(foo_uni_bar).toString(), foo_uni_bar);
+ QCOMPARE(QUrl(foo_uni_bar).toEncoded(), foo_uni_bar.toLatin1());
+
+ QCOMPARE(QUrl(foo_triple_bar, QUrl::StrictMode).toString(), foo_triple_bar);
+ QCOMPARE(QUrl(foo_triple_bar, QUrl::StrictMode).toEncoded(), foo_triple_bar.toLatin1());
+
+ QCOMPARE(QUrl(foo_uni_bar, QUrl::StrictMode).toString(), foo_uni_bar);
+ QCOMPARE(QUrl(foo_uni_bar, QUrl::StrictMode).toEncoded(), foo_uni_bar.toLatin1());
- QCOMPARE(foo_uni_bar, QUrl(foo_uni_bar).toString());
- QCOMPARE(foo_uni_bar, QString::fromUtf8(QUrl(foo_uni_bar).toEncoded()));
+ // However, file:/bar is the same as file:///bar
+ QString file_triple_bar("file:///bar"), file_uni_bar("file:/bar");
- QCOMPARE(foo_triple_bar, QUrl(foo_triple_bar, QUrl::StrictMode).toString());
- QCOMPARE(foo_triple_bar, QString::fromUtf8(QUrl(foo_triple_bar, QUrl::StrictMode).toEncoded()));
+ QVERIFY(QUrl(file_triple_bar) == QUrl(file_uni_bar));
- QCOMPARE(foo_uni_bar, QUrl(foo_uni_bar, QUrl::StrictMode).toString());
- QCOMPARE(foo_uni_bar, QString::fromUtf8(QUrl(foo_uni_bar, QUrl::StrictMode).toEncoded()));
+ QCOMPARE(QUrl(file_uni_bar).toString(), file_triple_bar);
+ QCOMPARE(QUrl(file_uni_bar, QUrl::StrictMode).toString(), file_triple_bar);
}
void tst_QUrl::effectiveTLDs_data()
@@ -3434,6 +3460,12 @@ void tst_QUrl::setComponents_data()
QTest::newRow("host-empty") << QUrl("foo://example.com/path")
<< int(Host) << "" << Tolerant << true
<< PrettyDecoded << QString() << "foo:///path";
+ QTest::newRow("authority-null") << QUrl("foo://example.com/path")
+ << int(Authority) << QString() << Tolerant << true
+ << PrettyDecoded << QString() << "foo:/path";
+ QTest::newRow("authority-empty") << QUrl("foo://example.com/path")
+ << int(Authority) << "" << Tolerant << true
+ << PrettyDecoded << QString() << "foo:///path";
QTest::newRow("query-null") << QUrl("http://example.com/?q=foo")
<< int(Query) << QString() << Tolerant << true
<< PrettyDecoded << QString() << "http://example.com/";
diff --git a/tests/auto/gui/text/qfont/tst_qfont.cpp b/tests/auto/gui/text/qfont/tst_qfont.cpp
index a7248869ed..dde4e54a8e 100644
--- a/tests/auto/gui/text/qfont/tst_qfont.cpp
+++ b/tests/auto/gui/text/qfont/tst_qfont.cpp
@@ -646,7 +646,7 @@ QString getPlatformGenericFont(const char* genericName)
static inline QByteArray msgNotAcceptableFont(const QString &defaultFamily, const QStringList &acceptableFamilies)
{
- QString res = QString::fromLatin1("Font family '%1' is not one of the following accaptable results: ").arg(defaultFamily);
+ QString res = QString::fromLatin1("Font family '%1' is not one of the following acceptable results: ").arg(defaultFamily);
Q_FOREACH (const QString &family, acceptableFamilies)
res += QString::fromLatin1("\n %1").arg(family);
return res.toLocal8Bit();
diff --git a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
index 53b367c872..da86a2d14d 100644
--- a/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
+++ b/tests/auto/network/access/qabstractnetworkcache/tst_qabstractnetworkcache.cpp
@@ -50,6 +50,8 @@
#include <QtNetwork/qnetworksession.h>
#endif
+#include <algorithm>
+
#define TESTFILE QString("http://%1/qtest/cgi-bin/").arg(QtNetworkSettings::serverName())
class tst_QAbstractNetworkCache : public QObject
@@ -334,8 +336,8 @@ void tst_QAbstractNetworkCache::runTest()
if (fetchFromCache) {
QList<QByteArray> rawHeaderList = reply->rawHeaderList();
QList<QByteArray> rawHeaderList2 = reply2->rawHeaderList();
- qSort(rawHeaderList);
- qSort(rawHeaderList2);
+ std::sort(rawHeaderList.begin(), rawHeaderList.end());
+ std::sort(rawHeaderList2.begin(), rawHeaderList2.end());
}
QCOMPARE(diskCache->gotData, fetchFromCache);
}
@@ -388,8 +390,8 @@ void tst_QAbstractNetworkCache::checkSynchronous()
if (fetchFromCache) {
QList<QByteArray> rawHeaderList = reply->rawHeaderList();
QList<QByteArray> rawHeaderList2 = reply2->rawHeaderList();
- qSort(rawHeaderList);
- qSort(rawHeaderList2);
+ std::sort(rawHeaderList.begin(), rawHeaderList.end());
+ std::sort(rawHeaderList2.begin(), rawHeaderList2.end());
}
QCOMPARE(diskCache->gotData, fetchFromCache);
}
diff --git a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
index 54b560cc1b..44edcc66c0 100644
--- a/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
+++ b/tests/auto/network/access/qnetworkdiskcache/tst_qnetworkdiskcache.cpp
@@ -43,6 +43,9 @@
#include <QtTest/QtTest>
#include <QtNetwork/QtNetwork>
#include <qnetworkdiskcache.h>
+
+#include <algorithm>
+
#define EXAMPLE_URL "http://user:pass@www.example.com/#foo"
//cached objects are organized into these many subdirs
#define NUM_SUBDIRECTORIES 16
@@ -464,7 +467,7 @@ void tst_QNetworkDiskCache::expire()
cacheList.append(metaData.url().toString());
}
}
- qSort(cacheList);
+ std::sort(cacheList.begin(), cacheList.end());
for (int i = 0; i < cacheList.count(); ++i) {
QString fileName = cacheList[i];
QCOMPARE(fileName, QString("http://www.foo.com/%1").arg(i + 6));