summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xconfigure8
-rw-r--r--dist/changes-5.0.028
-rw-r--r--mkspecs/features/qpa/genericunixfontdatabase.prf5
-rw-r--r--mkspecs/features/qt_installs.prf6
-rw-r--r--qmake/Makefile.win322
-rw-r--r--qmake/generators/metamakefile.cpp3
-rw-r--r--src/corelib/kernel/qpointer.cpp8
-rw-r--r--src/corelib/mimetypes/qmimetype.cpp19
-rw-r--r--src/corelib/mimetypes/qmimetype.h2
-rw-r--r--src/corelib/plugin/qfactoryloader.cpp3
-rw-r--r--src/corelib/tools/qbytearray.cpp12
-rw-r--r--src/corelib/tools/qbytearray.h6
-rw-r--r--src/corelib/tools/qhash.cpp20
-rw-r--r--src/corelib/tools/qhash.h2
-rw-r--r--src/corelib/tools/qlinkedlist.cpp18
-rw-r--r--src/corelib/tools/qlinkedlist.h2
-rw-r--r--src/corelib/tools/qlist.cpp18
-rw-r--r--src/corelib/tools/qlist.h2
-rw-r--r--src/corelib/tools/qmap.cpp20
-rw-r--r--src/corelib/tools/qmap.h2
-rw-r--r--src/corelib/tools/qregularexpression.cpp39
-rw-r--r--src/corelib/tools/qset.h2
-rw-r--r--src/corelib/tools/qset.qdoc18
-rw-r--r--src/corelib/tools/qstring.cpp18
-rw-r--r--src/corelib/tools/qstring.h6
-rw-r--r--src/corelib/tools/qvarlengtharray.h2
-rw-r--r--src/corelib/tools/qvarlengtharray.qdoc18
-rw-r--r--src/corelib/tools/qvector.cpp18
-rw-r--r--src/corelib/tools/qvector.h2
-rw-r--r--src/dbus/qdbusunixfiledescriptor.h3
-rw-r--r--src/gui/accessible/qaccessible.h6
-rw-r--r--src/gui/kernel/qwindowsysteminterface_qpa.cpp34
-rw-r--r--src/gui/kernel/qwindowsysteminterface_qpa.h12
-rw-r--r--src/gui/text/qfontengine_ft.cpp4
-rw-r--r--src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm2
-rw-r--r--src/plugins/platforms/cocoa/qcocoaclipboard.mm4
-rw-r--r--src/plugins/platforms/cocoa/qnsview.mm57
-rw-r--r--src/testlib/qtestaccessible.h8
-rw-r--r--src/testlib/qtestcase.cpp33
-rw-r--r--src/testlib/qtestsystem.h26
-rw-r--r--src/tools/qdoc/ditaxmlgenerator.cpp10
-rw-r--r--src/widgets/itemviews/qfileiconprovider.cpp19
-rw-r--r--src/widgets/kernel/qshortcut.cpp5
-rw-r--r--tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp22
-rw-r--r--tests/auto/corelib/tools/qmap/tst_qmap.cpp2
-rw-r--r--tests/auto/corelib/tools/qset/tst_qset.cpp24
-rw-r--r--tests/auto/gui/painting/qpainter/qpainter.pro2
-rw-r--r--tests/auto/other/collections/tst_collections.cpp20
-rw-r--r--tests/auto/other/qaccessibility/tst_qaccessibility.cpp61
-rw-r--r--tests/benchmarks/corelib/codecs/qtextcodec/main.cpp8
-rw-r--r--tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro6
-rw-r--r--tests/benchmarks/corelib/io/qdir/10000/10000.pro2
-rw-r--r--tests/benchmarks/corelib/json/json.pro2
-rw-r--r--tests/benchmarks/corelib/json/test.json66
-rw-r--r--tests/benchmarks/corelib/json/tst_bench_qtbinaryjson.cpp12
-rw-r--r--tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro2
-rw-r--r--tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro2
-rw-r--r--tests/benchmarks/corelib/tools/qlist/qlist.pro2
-rw-r--r--tests/benchmarks/corelib/tools/qstring/main.cpp4
-rw-r--r--tests/benchmarks/corelib/tools/qstring/qstring.pro6
-rw-r--r--tests/benchmarks/corelib/tools/qvector/qvector.pro2
-rw-r--r--tests/benchmarks/gui/itemviews/qheaderview/qheaderview.pro2
-rw-r--r--tests/benchmarks/gui/painting/qtbench/qtbench.pro2
-rw-r--r--tests/benchmarks/gui/text/qtext/main.cpp4
-rw-r--r--tests/benchmarks/gui/text/qtext/qtext.pro2
-rw-r--r--tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp4
-rw-r--r--tests/benchmarks/plugins/imageformats/jpeg/jpeg.pro8
-rw-r--r--tools/configure/configureapp.cpp26
68 files changed, 632 insertions, 193 deletions
diff --git a/configure b/configure
index 93dda6fe6c..8164badeba 100755
--- a/configure
+++ b/configure
@@ -4389,7 +4389,7 @@ fi
# auto-detect iconv(3) support
if [ "$CFG_ICONV" != "no" ]; then
- if [ "$XPLATFORM_MINGW" = "yes" ] || [ "$PLATFORM_QPA" = "yes" -a "$CFG_ICONV" = "auto" ]; then
+ if [ "$XPLATFORM_MINGW" = "yes" ]; then
CFG_ICONV=no
elif "$unixtests/compile.test" "$XQMAKESPEC" "$QMAKE_CONFIG" "$OPT_VERBOSE" "$relpath" "$outpath" "config.tests/unix/iconv" "POSIX iconv" $L_FLAGS $I_FLAGS $l_FLAGS $MAC_CONFIG_TEST_COMMANDLINE; then
CFG_ICONV=yes
@@ -5722,6 +5722,8 @@ fi
if [ "$PLATFORM_MAC" = "yes" ]; then
if [ "$CFG_RPATH" = "yes" ]; then
QMAKE_CONFIG="$QMAKE_CONFIG absolute_library_soname"
+ # set the default rpath to the library installation directory
+ RPATH_FLAGS="\"$QT_INSTALL_LIBS\" $RPATH_FLAGS"
fi
elif [ -z "`getXQMakeConf 'QMAKE_(LFLAGS_)?RPATH'`" ]; then
if [ -n "$RPATH_FLAGS" ]; then
@@ -6294,8 +6296,8 @@ if [ -n "$CFG_SYSROOT" ]; then
echo "}" >> "$QTCONFIG.tmp"
echo >> "$QTCONFIG.tmp"
fi
-if [ "$CFG_RPATH" = "yes" ]; then
- echo "QMAKE_RPATHDIR += \"$QT_INSTALL_LIBS\"" >> "$QTCONFIG.tmp"
+if [ -n "$RPATH_FLAGS" ]; then
+ echo "QMAKE_RPATHDIR += $RPATH_FLAGS" >> "$QTCONFIG.tmp"
fi
if [ -n "$QT_GCC_MAJOR_VERSION" ]; then
echo "QT_GCC_MAJOR_VERSION = $QT_GCC_MAJOR_VERSION" >> "$QTCONFIG.tmp"
diff --git a/dist/changes-5.0.0 b/dist/changes-5.0.0
index 0fd7cffb2f..0897d4937e 100644
--- a/dist/changes-5.0.0
+++ b/dist/changes-5.0.0
@@ -347,6 +347,16 @@ QtGui
information like capability flags, point-specific flags, velocity,
and raw positions.
+* A new set of enabler classes have been added, most importantly QWindow, QScreen,
+ QSurfaceFormat, and QOpenGLContext.
+
+* Most of the useful QtOpenGL classes have been polished and moved into
+ QtGui. See QOpenGLFramebufferObject, QOpenGLShaderProgram,
+ QOpenGLFunctions, etc.
+
+* QOpenGLPaintDevice has been added to be able to use QPainter to render into
+ the currently bound context.
+
QtWidgets
---------
* QInputContext removed as well as related getters and setters on QWidget and QApplication.
@@ -395,6 +405,11 @@ QtNetwork
QtOpenGL
--------
+* Most of the classes in this module (with the notable exception of QGLWidget)
+ now have equivalents in QtGui, along with the naming change QGL -> QOpenGL.
+ The classes in QtOpenGL that have equivalents in QtGui can now be considered
+ deprecated.
+
QtScript
--------
@@ -555,10 +570,9 @@ Qt for Windows CE
- QPointer
- * QPointer itself is now deprecated, and the implementation of QPointer
- has been changed to use QWeakPointer. The old guard mechanism has been
- removed. This causes two slight changes in behavior when using
- QPointer:
+ * The implementation of QPointer has been changed to use QWeakPointer. The
+ old guard mechanism has been removed. This causes a slight change
+ in behavior when using QPointer:
* When using QPointer on a QWidget (or a subclass of QWidget), previously
the QPointer would be cleared by the QWidget destructor. Now, the QPointer
@@ -566,12 +580,6 @@ Qt for Windows CE
cleared). Any QPointers tracking a widget will NOT be cleared before the
QWidget destructor destroys the children for the widget being tracked.
- * When constructing a QSharedPointer to take ownership of an object after a
- QPointer is already tracking the object. Previously, the shared pointer
- construction would not be affected by the QPointer, but now that QPointer
- is implemented using QWeakPoiner, constructing the QSharedPointer will
- cause an abort().
-
- QVariant
diff --git a/mkspecs/features/qpa/genericunixfontdatabase.prf b/mkspecs/features/qpa/genericunixfontdatabase.prf
index 20b31a7e67..36a358271c 100644
--- a/mkspecs/features/qpa/genericunixfontdatabase.prf
+++ b/mkspecs/features/qpa/genericunixfontdatabase.prf
@@ -2,4 +2,9 @@ CONFIG += qpa/basicunixfontdatabase
contains(QT_CONFIG, fontconfig) {
DEFINES += Q_FONTCONFIGDATABASE
LIBS += -lfontconfig
+} else {
+ fonts.path = $$[QT_INSTALL_LIBS]/fonts
+ fonts.files = $$QT_SOURCE_TREE/lib/fonts/*
+ INSTALLS += fonts
}
+
diff --git a/mkspecs/features/qt_installs.prf b/mkspecs/features/qt_installs.prf
index 8b17aa90fb..97e52f670d 100644
--- a/mkspecs/features/qt_installs.prf
+++ b/mkspecs/features/qt_installs.prf
@@ -35,9 +35,3 @@ qt_install_headers {
INSTALLS += private_headers
}
-embedded: equals(TARGET, QtGui) {
- # install fonts for embedded
- INSTALLS += fonts
- fonts.path = $$[QT_INSTALL_LIBS]/fonts
- fonts.files = $$QT_SOURCE_TREE/lib/fonts/*
-}
diff --git a/qmake/Makefile.win32 b/qmake/Makefile.win32
index 8e37b3e646..2379473af0 100644
--- a/qmake/Makefile.win32
+++ b/qmake/Makefile.win32
@@ -161,7 +161,7 @@ $(OBJS): qmake_pch.obj
$(QTOBJS): qmake_pch.obj
qmake_pch.obj:
- $(CXX) $(CXXFLAGS_BARE) -c -Yc -Fpqmake_pch.pch -TP qmake_pch.h
+ $(CXX) $(CXXFLAGS_BARE) -c -Yc -Fpqmake_pch.pch -TP $(QMKSRC)\qmake_pch.h
{$(SOURCE_PATH)\qmake\generators\mac}.cpp{}.obj::
$(CXX) $(CXXFLAGS) $<
diff --git a/qmake/generators/metamakefile.cpp b/qmake/generators/metamakefile.cpp
index b855585500..c69d5a5812 100644
--- a/qmake/generators/metamakefile.cpp
+++ b/qmake/generators/metamakefile.cpp
@@ -520,6 +520,9 @@ MetaMakefileGenerator::modesForGenerator(const QString &gen,
#ifdef Q_OS_MAC
*host_mode = Option::HOST_MACX_MODE;
*target_mode = Option::TARG_MACX_MODE;
+#elif defined(Q_OS_WIN)
+ *host_mode = Option::HOST_WIN_MODE;
+ *target_mode = Option::TARG_UNIX_MODE;
#else
*host_mode = Option::HOST_UNIX_MODE;
*target_mode = Option::TARG_UNIX_MODE;
diff --git a/src/corelib/kernel/qpointer.cpp b/src/corelib/kernel/qpointer.cpp
index f81451d906..e0e14e5b79 100644
--- a/src/corelib/kernel/qpointer.cpp
+++ b/src/corelib/kernel/qpointer.cpp
@@ -56,7 +56,7 @@
destroyed while you still hold a reference to it. You can safely
test the pointer for validity.
- Note that Qt 5 introduces two slight changes in behavior when using QPointer.
+ Note that Qt 5 introduces a slight change in behavior when using QPointer.
\list
@@ -66,12 +66,6 @@
cleared). Any QPointers tracking a widget will \b NOT be cleared before the
QWidget destructor destroys the children for the widget being tracked.
- \li When constructing a QSharedPointer to take ownership of an object after a
- QPointer is already tracking the object. Previously, the shared pointer
- construction would not be affected by the QPointer, but now that QPointer
- is implemented using QWeakPoiner, constructing the QSharedPointer will
- cause an \c abort().
-
\endlist
Qt also provides QSharedPointer, an implementation of a reference-counted
diff --git a/src/corelib/mimetypes/qmimetype.cpp b/src/corelib/mimetypes/qmimetype.cpp
index ebf687bb4b..18ce5e5000 100644
--- a/src/corelib/mimetypes/qmimetype.cpp
+++ b/src/corelib/mimetypes/qmimetype.cpp
@@ -181,25 +181,6 @@ QMimeType &QMimeType::operator=(const QMimeType &other)
return *this;
}
-#ifdef Q_COMPILER_RVALUE_REFS
-/*!
- \fn QMimeType::QMimeType(QMimeType &&other);
- Constructs this QMimeType object by moving the data of the rvalue reference \a other.
- */
-QMimeType::QMimeType(QMimeType &&other) :
- d(std::move(other.d))
-{
- DBG() << "name():" << name();
- //DBG() << "aliases():" << aliases();
- //DBG() << "comment():" << comment();
- DBG() << "genericIconName():" << genericIconName();
- DBG() << "iconName():" << iconName();
- DBG() << "globPatterns():" << globPatterns();
- DBG() << "suffixes():" << suffixes();
- DBG() << "preferredSuffix():" << preferredSuffix();
-}
-#endif
-
/*!
\fn QMimeType::QMimeType(const QMimeTypePrivate &dd);
Assigns the data of the QMimeTypePrivate \a dd to this QMimeType object, and returns a reference to this object.
diff --git a/src/corelib/mimetypes/qmimetype.h b/src/corelib/mimetypes/qmimetype.h
index 68d17caaba..172973e77a 100644
--- a/src/corelib/mimetypes/qmimetype.h
+++ b/src/corelib/mimetypes/qmimetype.h
@@ -59,8 +59,6 @@ public:
QMimeType(const QMimeType &other);
QMimeType &operator=(const QMimeType &other);
#ifdef Q_COMPILER_RVALUE_REFS
- QMimeType(QMimeType &&other);
-
QMimeType &operator=(QMimeType &&other)
{
qSwap(d, other.d);
diff --git a/src/corelib/plugin/qfactoryloader.cpp b/src/corelib/plugin/qfactoryloader.cpp
index cdc72cf35d..480bc0da74 100644
--- a/src/corelib/plugin/qfactoryloader.cpp
+++ b/src/corelib/plugin/qfactoryloader.cpp
@@ -175,8 +175,7 @@ void QFactoryLoader::update()
QString iid = library->metaData.value(QLatin1String("IID")).toString();
if (iid == QLatin1String(d->iid.constData(), d->iid.size())) {
QJsonObject object = library->metaData.value(QLatin1String("MetaData")).toObject();
- if (!object.isEmpty())
- metaDataOk = true;
+ metaDataOk = true;
QJsonArray k = object.value(QLatin1String("Keys")).toArray();
for (int i = 0; i < k.size(); ++i) {
diff --git a/src/corelib/tools/qbytearray.cpp b/src/corelib/tools/qbytearray.cpp
index ea6f5c4626..7f4d35d82c 100644
--- a/src/corelib/tools/qbytearray.cpp
+++ b/src/corelib/tools/qbytearray.cpp
@@ -800,6 +800,12 @@ const QStaticByteArrayData<1> QByteArray::shared_empty = { { Q_REFCOUNT_INITIALI
\internal
*/
+/*! \fn QByteArray::const_iterator QByteArray::cbegin() const
+ \since 5.0
+
+ \internal
+*/
+
/*! \fn QByteArray::const_iterator QByteArray::constBegin() const
\internal
@@ -815,6 +821,12 @@ const QStaticByteArrayData<1> QByteArray::shared_empty = { { Q_REFCOUNT_INITIALI
\internal
*/
+/*! \fn QByteArray::const_iterator QByteArray::cend() const
+ \since 5.0
+
+ \internal
+*/
+
/*! \fn QByteArray::const_iterator QByteArray::constEnd() const
\internal
diff --git a/src/corelib/tools/qbytearray.h b/src/corelib/tools/qbytearray.h
index bd3a4a8444..1e70e26be3 100644
--- a/src/corelib/tools/qbytearray.h
+++ b/src/corelib/tools/qbytearray.h
@@ -354,9 +354,11 @@ public:
typedef const_iterator ConstIterator;
iterator begin();
const_iterator begin() const;
+ const_iterator cbegin() const;
const_iterator constBegin() const;
iterator end();
const_iterator end() const;
+ const_iterator cend() const;
const_iterator constEnd() const;
// stl compatibility
@@ -495,12 +497,16 @@ inline QByteArray::iterator QByteArray::begin()
{ detach(); return d->data(); }
inline QByteArray::const_iterator QByteArray::begin() const
{ return d->data(); }
+inline QByteArray::const_iterator QByteArray::cbegin() const
+{ return d->data(); }
inline QByteArray::const_iterator QByteArray::constBegin() const
{ return d->data(); }
inline QByteArray::iterator QByteArray::end()
{ detach(); return d->data() + d->size; }
inline QByteArray::const_iterator QByteArray::end() const
{ return d->data() + d->size; }
+inline QByteArray::const_iterator QByteArray::cend() const
+{ return d->data() + d->size; }
inline QByteArray::const_iterator QByteArray::constEnd() const
{ return d->data() + d->size; }
inline QByteArray &QByteArray::operator+=(char c)
diff --git a/src/corelib/tools/qhash.cpp b/src/corelib/tools/qhash.cpp
index 897de77f2e..e418158a20 100644
--- a/src/corelib/tools/qhash.cpp
+++ b/src/corelib/tools/qhash.cpp
@@ -1045,6 +1045,15 @@ void QHashData::checkSanity()
\overload
*/
+/*! \fn QHash::const_iterator QHash::cbegin() const
+ \since 5.0
+
+ Returns a const \l{STL-style iterator} pointing to the first item
+ in the hash.
+
+ \sa begin(), cend()
+*/
+
/*! \fn QHash::const_iterator QHash::constBegin() const
Returns a const \l{STL-style iterator} pointing to the first item
@@ -1074,6 +1083,15 @@ void QHashData::checkSanity()
\sa constBegin(), end()
*/
+/*! \fn QHash::const_iterator QHash::cend() const
+ \since 5.0
+
+ Returns a const \l{STL-style iterator} pointing to the imaginary
+ item after the last item in the hash.
+
+ \sa cbegin(), end()
+*/
+
/*! \fn QHash::iterator QHash::erase(iterator pos)
Removes the (key, value) pair associated with the iterator \a pos
@@ -1114,7 +1132,7 @@ void QHashData::checkSanity()
\overload
*/
-/*! \fn QHash::iterator QHash::constFind(const Key &key) const
+/*! \fn QHash::const_iterator QHash::constFind(const Key &key) const
\since 4.1
Returns an iterator pointing to the item with the \a key in the
diff --git a/src/corelib/tools/qhash.h b/src/corelib/tools/qhash.h
index 91d015c394..73162b6cf1 100644
--- a/src/corelib/tools/qhash.h
+++ b/src/corelib/tools/qhash.h
@@ -440,9 +440,11 @@ public:
// STL style
inline iterator begin() { detach(); return iterator(d->firstNode()); }
inline const_iterator begin() const { return const_iterator(d->firstNode()); }
+ inline const_iterator cbegin() const { return const_iterator(d->firstNode()); }
inline const_iterator constBegin() const { return const_iterator(d->firstNode()); }
inline iterator end() { detach(); return iterator(e); }
inline const_iterator end() const { return const_iterator(e); }
+ inline const_iterator cend() const { return const_iterator(e); }
inline const_iterator constEnd() const { return const_iterator(e); }
iterator erase(iterator it);
diff --git a/src/corelib/tools/qlinkedlist.cpp b/src/corelib/tools/qlinkedlist.cpp
index 6e66f804c0..1502f70d56 100644
--- a/src/corelib/tools/qlinkedlist.cpp
+++ b/src/corelib/tools/qlinkedlist.cpp
@@ -330,6 +330,15 @@ const QLinkedListData QLinkedListData::shared_null = {
\overload
*/
+/*! \fn QLinkedList::const_iterator QLinkedList::cbegin() const
+ \since 5.0
+
+ Returns a const \l{STL-style iterator} pointing to the first item
+ in the list.
+
+ \sa begin(), cend()
+*/
+
/*! \fn QLinkedList::const_iterator QLinkedList::constBegin() const
Returns a const \l{STL-style iterator} pointing to the first item
@@ -351,6 +360,15 @@ const QLinkedListData QLinkedListData::shared_null = {
\overload
*/
+/*! \fn QLinkedList::const_iterator QLinkedList::cend() const
+ \since 5.0
+
+ Returns a const \l{STL-style iterator} pointing to the imaginary
+ item after the last item in the list.
+
+ \sa cbegin(), end()
+*/
+
/*! \fn QLinkedList::const_iterator QLinkedList::constEnd() const
Returns a const \l{STL-style iterator} pointing to the imaginary
diff --git a/src/corelib/tools/qlinkedlist.h b/src/corelib/tools/qlinkedlist.h
index 28f190c7fa..27d0ffe875 100644
--- a/src/corelib/tools/qlinkedlist.h
+++ b/src/corelib/tools/qlinkedlist.h
@@ -180,9 +180,11 @@ public:
// stl style
inline iterator begin() { detach(); return e->n; }
inline const_iterator begin() const { return e->n; }
+ inline const_iterator cbegin() const { return e->n; }
inline const_iterator constBegin() const { return e->n; }
inline iterator end() { detach(); return e; }
inline const_iterator end() const { return e; }
+ inline const_iterator cend() const { return e; }
inline const_iterator constEnd() const { return e; }
iterator insert(iterator before, const T &t);
iterator erase(iterator pos);
diff --git a/src/corelib/tools/qlist.cpp b/src/corelib/tools/qlist.cpp
index 9ee4c0a797..c87b3e7d24 100644
--- a/src/corelib/tools/qlist.cpp
+++ b/src/corelib/tools/qlist.cpp
@@ -919,6 +919,15 @@ void **QListData::erase(void **xi)
\overload
*/
+/*! \fn QList::const_iterator QList::cbegin() const
+ \since 5.0
+
+ Returns a const \l{STL-style iterator} pointing to the first item
+ in the list.
+
+ \sa begin(), cend()
+*/
+
/*! \fn QList::const_iterator QList::constBegin() const
Returns a const \l{STL-style iterator} pointing to the first item
@@ -940,6 +949,15 @@ void **QListData::erase(void **xi)
\overload
*/
+/*! \fn QList::const_iterator QList::cend() const
+ \since 5.0
+
+ Returns a const \l{STL-style iterator} pointing to the imaginary
+ item after the last item in the list.
+
+ \sa cbegin(), end()
+*/
+
/*! \fn QList::const_iterator QList::constEnd() const
Returns a const \l{STL-style iterator} pointing to the imaginary
diff --git a/src/corelib/tools/qlist.h b/src/corelib/tools/qlist.h
index bc3350f42b..a15b0c9124 100644
--- a/src/corelib/tools/qlist.h
+++ b/src/corelib/tools/qlist.h
@@ -269,9 +269,11 @@ public:
// stl style
inline iterator begin() { detach(); return reinterpret_cast<Node *>(p.begin()); }
inline const_iterator begin() const { return reinterpret_cast<Node *>(p.begin()); }
+ inline const_iterator cbegin() const { return reinterpret_cast<Node *>(p.begin()); }
inline const_iterator constBegin() const { return reinterpret_cast<Node *>(p.begin()); }
inline iterator end() { detach(); return reinterpret_cast<Node *>(p.end()); }
inline const_iterator end() const { return reinterpret_cast<Node *>(p.end()); }
+ inline const_iterator cend() const { return reinterpret_cast<Node *>(p.end()); }
inline const_iterator constEnd() const { return reinterpret_cast<Node *>(p.end()); }
iterator insert(iterator before, const T &t);
iterator erase(iterator pos);
diff --git a/src/corelib/tools/qmap.cpp b/src/corelib/tools/qmap.cpp
index c922d7aab0..b585bdbbc8 100644
--- a/src/corelib/tools/qmap.cpp
+++ b/src/corelib/tools/qmap.cpp
@@ -682,6 +682,15 @@ void QMapData::dump()
\overload
*/
+/*! \fn QMap::const_iterator QMap::cbegin() const
+ \since 5.0
+
+ Returns a const \l{STL-style iterator} pointing to the first item
+ in the map.
+
+ \sa begin(), cend()
+*/
+
/*! \fn QMap::const_iterator QMap::constBegin() const
Returns a const \l{STL-style iterator} pointing to the first item
@@ -703,6 +712,15 @@ void QMapData::dump()
\overload
*/
+/*! \fn QMap::const_iterator QMap::cend() const
+ \since 5.0
+
+ Returns a const \l{STL-style iterator} pointing to the imaginary
+ item after the last item in the map.
+
+ \sa cbegin(), end()
+*/
+
/*! \fn QMap::const_iterator QMap::constEnd() const
Returns a const \l{STL-style iterator} pointing to the imaginary
@@ -744,7 +762,7 @@ void QMapData::dump()
\overload
*/
-/*! \fn QMap::iterator QMap::constFind(const Key &key) const
+/*! \fn QMap::const_iterator QMap::constFind(const Key &key) const
\since 4.1
Returns an const iterator pointing to the item with key \a key in the
diff --git a/src/corelib/tools/qmap.h b/src/corelib/tools/qmap.h
index dc358a8106..dbbbcce162 100644
--- a/src/corelib/tools/qmap.h
+++ b/src/corelib/tools/qmap.h
@@ -362,12 +362,14 @@ public:
// STL style
inline iterator begin() { detach(); return iterator(e->forward[0]); }
inline const_iterator begin() const { return const_iterator(e->forward[0]); }
+ inline const_iterator cbegin() const { return const_iterator(e->forward[0]); }
inline const_iterator constBegin() const { return const_iterator(e->forward[0]); }
inline iterator end() {
detach();
return iterator(e);
}
inline const_iterator end() const { return const_iterator(e); }
+ inline const_iterator cend() const { return const_iterator(e); }
inline const_iterator constEnd() const { return const_iterator(e); }
iterator erase(iterator it);
diff --git a/src/corelib/tools/qregularexpression.cpp b/src/corelib/tools/qregularexpression.cpp
index 1db78519a3..eaa20b304a 100644
--- a/src/corelib/tools/qregularexpression.cpp
+++ b/src/corelib/tools/qregularexpression.cpp
@@ -135,7 +135,7 @@ QT_BEGIN_NAMESPACE
\snippet doc/src/snippets/code/src_corelib_tools_qregularexpression.cpp 2
- The pattern() function returns the pattern that it's currently set for a
+ The pattern() function returns the pattern that is currently set for a
QRegularExpression object:
\snippet doc/src/snippets/code/src_corelib_tools_qregularexpression.cpp 3
@@ -342,9 +342,9 @@ QT_BEGIN_NAMESPACE
string; however, the subpattern \c{def} matches the subject string
completely, and therefore a complete match is reported.
- In case multiple partial matches are found when matching (but no complete
- match), then the QRegularExpressionMatch will report the first one that it
- is found. For instance:
+ If multiple partial matches are found when matching (but no complete
+ match), then the QRegularExpressionMatch object will report the first one
+ that is found. For instance:
\snippet doc/src/snippets/code/src_corelib_tools_qregularexpression.cpp 18
@@ -440,7 +440,7 @@ QT_BEGIN_NAMESPACE
\section2 Exact matching
- QRegExp::exactMatch in Qt 4 served for two purposes: it exactly matched
+ QRegExp::exactMatch() in Qt 4 served two purposes: it exactly matched
a regular expression against a subject string, and it implemented partial
matching. In fact, if an exact match was not found, one could still find
out how much of the subject string was matched by the regular expression
@@ -478,9 +478,20 @@ QT_BEGIN_NAMESPACE
matching correctly (that is, like Perl does). In particular, patterns that
can match 0 characters (like \c{"a*"}) are problematic.
- QRegularExpression::globalMatch implements Perl global match correctly, and
+ QRegularExpression::globalMatch() implements Perl global match correctly, and
the returned iterator can be used to examine each result.
+ \section2 Unicode properties support
+
+ When using QRegExp, character classes such as \c{\w}, \c{\d}, etc. match
+ characters with the corresponding Unicode property: for instance, \c{\d}
+ matches any character with the Unicode Nd (decimal digit) property.
+
+ Those character classes only match ASCII characters by default when using
+ QRegularExpression: for instance, \c{\d} matches exactly a character in the
+ \c{0-9} ASCII range. It is possible to change this behaviour by using the
+ UseUnicodePropertiesOption pattern option.
+
\section2 Wildcard matching
There is no equivalent of wildcard matching in QRegularExpression.
@@ -494,11 +505,11 @@ QT_BEGIN_NAMESPACE
\section2 Minimal matching
- QRegExp::setMinimal implemented minimal matching by simply reversing the
+ QRegExp::setMinimal() implemented minimal matching by simply reversing the
greediness of the quantifiers (QRegExp did not support lazy quantifiers,
like \c{*?}, \c{+?}, etc.). QRegularExpression instead does support greedy,
lazy and possessive quantifiers. The InvertedGreedinessOption
- pattern option can be useful to emulate the effects of QRegExp::setMinimal:
+ pattern option can be useful to emulate the effects of QRegExp::setMinimal():
if enabled, it inverts the greediness of quantifiers (greedy ones become
lazy and vice versa).
@@ -675,7 +686,7 @@ QT_BEGIN_NAMESPACE
equivalent for this option in Perl regular expressions.
\value UseUnicodePropertiesOption
- The meaning of the \c{\w}, \c{\d}, etc., character types, as well as
+ The meaning of the \c{\w}, \c{\d}, etc., character classes, as well as
the meaning of their counterparts (\c{\W}, \c{\D}, etc.), is changed
from matching ASCII charaters only to matching any character with the
corresponding Unicode property. For instance, \c{\d} is changed to
@@ -1004,12 +1015,18 @@ class QPcreJitStackPointer
Q_DISABLE_COPY(QPcreJitStackPointer);
public:
+ /*!
+ \internal
+ */
QPcreJitStackPointer()
{
// The default JIT stack size in PCRE is 32K,
// we allocate from 32K up to 512K.
stack = pcre16_jit_stack_alloc(32*1024, 512*1024);
}
+ /*!
+ \internal
+ */
~QPcreJitStackPointer()
{
if (stack)
@@ -1572,8 +1589,8 @@ bool QRegularExpression::operator==(const QRegularExpression &re) const
a backslash all characters in \a str, except for the characters in the
\c{[A-Z]}, \c{[a-z]} and \c{[0-9]} ranges, as well as the underscore
(\c{_}) character. The only difference with Perl is that a literal NUL
- inside \a str is escaped with the sequence \c{"\\\\0"} (backslash +
- \c{'0'}), instead of \c{"\\\\\\0"} (backslash + \c{NUL}).
+ inside \a str is escaped with the sequence \c{"\\0"} (backslash +
+ \c{'0'}), instead of \c{"\\\0"} (backslash + \c{NUL}).
*/
QString QRegularExpression::escape(const QString &str)
{
diff --git a/src/corelib/tools/qset.h b/src/corelib/tools/qset.h
index 7750cd1147..e85c770d42 100644
--- a/src/corelib/tools/qset.h
+++ b/src/corelib/tools/qset.h
@@ -164,9 +164,11 @@ public:
// STL style
inline iterator begin() { return q_hash.begin(); }
inline const_iterator begin() const { return q_hash.begin(); }
+ inline const_iterator cbegin() const { return q_hash.begin(); }
inline const_iterator constBegin() const { return q_hash.constBegin(); }
inline iterator end() { return q_hash.end(); }
inline const_iterator end() const { return q_hash.end(); }
+ inline const_iterator cend() const { return q_hash.end(); }
inline const_iterator constEnd() const { return q_hash.constEnd(); }
iterator erase(iterator i)
{ return q_hash.erase(reinterpret_cast<typename Hash::iterator &>(i)); }
diff --git a/src/corelib/tools/qset.qdoc b/src/corelib/tools/qset.qdoc
index b33064e1b8..139b017966 100644
--- a/src/corelib/tools/qset.qdoc
+++ b/src/corelib/tools/qset.qdoc
@@ -343,6 +343,15 @@
item in the set.
*/
+/*! \fn QSet::const_iterator QSet::cbegin() const
+ \since 5.0
+
+ Returns a const \l{STL-style iterator} positioned at the first
+ item in the set.
+
+ \sa begin(), cend()
+*/
+
/*! \fn QSet::const_iterator QSet::constBegin() const
Returns a const \l{STL-style iterator} positioned at the first
@@ -367,6 +376,15 @@
imaginary item after the last item in the set.
*/
+/*! \fn QSet::const_iterator QSet::cend() const
+ \since 5.0
+
+ Returns a const \l{STL-style iterator} pointing to the imaginary
+ item after the last item in the set.
+
+ \sa cbegin(), end()
+*/
+
/*! \fn QSet::const_iterator QSet::constEnd() const
Returns a const \l{STL-style iterator} pointing to the imaginary
diff --git a/src/corelib/tools/qstring.cpp b/src/corelib/tools/qstring.cpp
index 878403fe75..cf09e2b5dc 100644
--- a/src/corelib/tools/qstring.cpp
+++ b/src/corelib/tools/qstring.cpp
@@ -862,6 +862,15 @@ int QString::grow(int size)
\overload begin()
*/
+/*! \fn QString::const_iterator QString::cbegin() const
+ \since 5.0
+
+ Returns a const \l{STL-style iterator} pointing to the first character
+ in the string.
+
+ \sa begin(), cend()
+*/
+
/*! \fn QString::const_iterator QString::constBegin() const
Returns a const \l{STL-style iterator} pointing to the first character
@@ -883,6 +892,15 @@ int QString::grow(int size)
\overload end()
*/
+/*! \fn QString::const_iterator QString::cend() const
+ \since 5.0
+
+ Returns a const \l{STL-style iterator} pointing to the imaginary
+ item after the last item in the list.
+
+ \sa cbegin(), end()
+*/
+
/*! \fn QString::const_iterator QString::constEnd() const
Returns a const \l{STL-style iterator} pointing to the imaginary
diff --git a/src/corelib/tools/qstring.h b/src/corelib/tools/qstring.h
index 781afc5bba..fa5ef3bbf0 100644
--- a/src/corelib/tools/qstring.h
+++ b/src/corelib/tools/qstring.h
@@ -573,9 +573,11 @@ public:
typedef const_iterator ConstIterator;
iterator begin();
const_iterator begin() const;
+ const_iterator cbegin() const;
const_iterator constBegin() const;
iterator end();
const_iterator end() const;
+ const_iterator cend() const;
const_iterator constEnd() const;
// STL compatibility
@@ -921,12 +923,16 @@ inline QString::iterator QString::begin()
{ detach(); return reinterpret_cast<QChar*>(d->data()); }
inline QString::const_iterator QString::begin() const
{ return reinterpret_cast<const QChar*>(d->data()); }
+inline QString::const_iterator QString::cbegin() const
+{ return reinterpret_cast<const QChar*>(d->data()); }
inline QString::const_iterator QString::constBegin() const
{ return reinterpret_cast<const QChar*>(d->data()); }
inline QString::iterator QString::end()
{ detach(); return reinterpret_cast<QChar*>(d->data() + d->size); }
inline QString::const_iterator QString::end() const
{ return reinterpret_cast<const QChar*>(d->data() + d->size); }
+inline QString::const_iterator QString::cend() const
+{ return reinterpret_cast<const QChar*>(d->data() + d->size); }
inline QString::const_iterator QString::constEnd() const
{ return reinterpret_cast<const QChar*>(d->data() + d->size); }
inline bool QString::contains(const QString &s, Qt::CaseSensitivity cs) const
diff --git a/src/corelib/tools/qvarlengtharray.h b/src/corelib/tools/qvarlengtharray.h
index a6613a3774..4e042f765e 100644
--- a/src/corelib/tools/qvarlengtharray.h
+++ b/src/corelib/tools/qvarlengtharray.h
@@ -160,9 +160,11 @@ public:
inline iterator begin() { return ptr; }
inline const_iterator begin() const { return ptr; }
+ inline const_iterator cbegin() const { return ptr; }
inline const_iterator constBegin() const { return ptr; }
inline iterator end() { return ptr + s; }
inline const_iterator end() const { return ptr + s; }
+ inline const_iterator cend() const { return ptr + s; }
inline const_iterator constEnd() const { return ptr + s; }
iterator insert(iterator before, int n, const T &x);
inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); }
diff --git a/src/corelib/tools/qvarlengtharray.qdoc b/src/corelib/tools/qvarlengtharray.qdoc
index e1dc2bee9a..e92f91aa47 100644
--- a/src/corelib/tools/qvarlengtharray.qdoc
+++ b/src/corelib/tools/qvarlengtharray.qdoc
@@ -451,6 +451,15 @@
\overload
*/
+/*! \fn QVarLengthArray::const_iterator QVarLengthArray::cbegin() const
+ \since 5.0
+
+ Returns a const \l{STL-style iterator} pointing to the first item
+ in the array.
+
+ \sa begin(), cend()
+*/
+
/*! \fn QVarLengthArray::const_iterator QVarLengthArray::constBegin() const
\since 4.8
@@ -475,6 +484,15 @@
\overload
*/
+/*! \fn QVarLengthArray::const_iterator QVarLengthArray::cend() const
+ \since 5.0
+
+ Returns a const \l{STL-style iterator} pointing to the imaginary
+ item after the last item in the array.
+
+ \sa cbegin(), end()
+*/
+
/*! \fn QVarLengthArray::const_iterator QVarLengthArray::constEnd() const
\since 4.8
diff --git a/src/corelib/tools/qvector.cpp b/src/corelib/tools/qvector.cpp
index 1a746dc061..0026338047 100644
--- a/src/corelib/tools/qvector.cpp
+++ b/src/corelib/tools/qvector.cpp
@@ -688,6 +688,15 @@ int QVectorData::grow(int sizeOfHeader, int size, int sizeOfT)
\overload
*/
+/*! \fn QVector::const_iterator QVector::cbegin() const
+ \since 5.0
+
+ Returns a const \l{STL-style iterator} pointing to the first item
+ in the vector.
+
+ \sa begin(), cend()
+*/
+
/*! \fn QVector::const_iterator QVector::constBegin() const
Returns a const \l{STL-style iterator} pointing to the first item
@@ -709,6 +718,15 @@ int QVectorData::grow(int sizeOfHeader, int size, int sizeOfT)
\overload
*/
+/*! \fn QVector::const_iterator QVector::cend() const
+ \since 5.0
+
+ Returns a const \l{STL-style iterator} pointing to the imaginary
+ item after the last item in the vector.
+
+ \sa cbegin(), end()
+*/
+
/*! \fn QVector::const_iterator QVector::constEnd() const
Returns a const \l{STL-style iterator} pointing to the imaginary
diff --git a/src/corelib/tools/qvector.h b/src/corelib/tools/qvector.h
index c119ef43ae..226d0bb258 100644
--- a/src/corelib/tools/qvector.h
+++ b/src/corelib/tools/qvector.h
@@ -248,9 +248,11 @@ public:
#endif
inline iterator begin() { detach(); return d->begin(); }
inline const_iterator begin() const { return d->begin(); }
+ inline const_iterator cbegin() const { return d->begin(); }
inline const_iterator constBegin() const { return d->begin(); }
inline iterator end() { detach(); return d->end(); }
inline const_iterator end() const { return d->end(); }
+ inline const_iterator cend() const { return d->end(); }
inline const_iterator constEnd() const { return d->end(); }
iterator insert(iterator before, int n, const T &x);
inline iterator insert(iterator before, const T &x) { return insert(before, 1, x); }
diff --git a/src/dbus/qdbusunixfiledescriptor.h b/src/dbus/qdbusunixfiledescriptor.h
index ad5d00ba0b..bfb2262a31 100644
--- a/src/dbus/qdbusunixfiledescriptor.h
+++ b/src/dbus/qdbusunixfiledescriptor.h
@@ -58,7 +58,6 @@ QT_BEGIN_NAMESPACE
class QDBusUnixFileDescriptorPrivate;
-template<> QExplicitlySharedDataPointer<QDBusUnixFileDescriptorPrivate>::~QExplicitlySharedDataPointer();
class Q_DBUS_EXPORT QDBusUnixFileDescriptor
{
@@ -80,8 +79,6 @@ public:
static bool isSupported();
#if defined(Q_COMPILER_RVALUE_REFS)
- QDBusUnixFileDescriptor(QDBusUnixFileDescriptor &&other) : d(static_cast<Data &&>(other.d))
- { }
inline QDBusUnixFileDescriptor &operator=(QDBusUnixFileDescriptor &&other)
{ d.swap(other.d); return *this; }
#endif
diff --git a/src/gui/accessible/qaccessible.h b/src/gui/accessible/qaccessible.h
index ffdd3fe7ce..4d79fe78ee 100644
--- a/src/gui/accessible/qaccessible.h
+++ b/src/gui/accessible/qaccessible.h
@@ -430,6 +430,7 @@ private:
class Q_GUI_EXPORT QAccessibleEvent
{
+ Q_DISABLE_COPY(QAccessibleEvent)
public:
inline QAccessibleEvent(QAccessible::Event typ, QObject *obj, int chld = -1)
: m_type(typ), m_object(obj), m_child(chld)
@@ -446,7 +447,8 @@ public:
QAccessibleInterface *accessibleInterface() const;
-private:
+protected:
+
QAccessible::Event m_type;
QObject *m_object;
int m_child;
@@ -463,7 +465,7 @@ public:
return m_changedStates;
}
-private:
+protected:
QAccessible::State m_changedStates;
};
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.cpp b/src/gui/kernel/qwindowsysteminterface_qpa.cpp
index be9ac8e545..9ab91d65d5 100644
--- a/src/gui/kernel/qwindowsysteminterface_qpa.cpp
+++ b/src/gui/kernel/qwindowsysteminterface_qpa.cpp
@@ -41,6 +41,7 @@
#include "qwindowsysteminterface_qpa.h"
#include "qwindowsysteminterface_qpa_p.h"
#include "private/qguiapplication_p.h"
+#include "private/qevent_p.h"
#include "private/qtouchdevice_p.h"
#include <QAbstractEventDispatcher>
#include <QPlatformDrag>
@@ -147,6 +148,39 @@ void QWindowSystemInterface::handleMouseEvent(QWindow *tlw, ulong timestamp, con
QWindowSystemInterfacePrivate::queueWindowSystemEvent(e);
}
+bool QWindowSystemInterface::tryHandleSynchronousShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods,
+ const QString & text, bool autorep, ushort count)
+{
+ unsigned long timestamp = QWindowSystemInterfacePrivate::eventTime.elapsed();
+ return tryHandleSynchronousShortcutEvent(w, timestamp, k, mods, text, autorep, count);
+}
+
+bool QWindowSystemInterface::tryHandleSynchronousShortcutEvent(QWindow *w, ulong timestamp, int k, Qt::KeyboardModifiers mods,
+ const QString & text, bool autorep, ushort count)
+{
+ QKeyEvent qevent(QEvent::ShortcutOverride, k, mods, text, autorep, count);
+ qevent.setTimestamp(timestamp);
+ return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(w, &qevent);
+}
+
+bool QWindowSystemInterface::tryHandleSynchronousExtendedShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods,
+ quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers,
+ const QString &text, bool autorep, ushort count)
+{
+ unsigned long timestamp = QWindowSystemInterfacePrivate::eventTime.elapsed();
+ return tryHandleSynchronousExtendedShortcutEvent(w, timestamp, k, mods, nativeScanCode, nativeVirtualKey, nativeModifiers, text, autorep, count);
+}
+
+bool QWindowSystemInterface::tryHandleSynchronousExtendedShortcutEvent(QWindow *w, ulong timestamp, int k, Qt::KeyboardModifiers mods,
+ quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers,
+ const QString &text, bool autorep, ushort count)
+{
+ QKeyEventEx qevent(QEvent::ShortcutOverride, k, mods, text, autorep, count, nativeScanCode, nativeVirtualKey, nativeModifiers);
+ qevent.setTimestamp(timestamp);
+ return QGuiApplicationPrivate::instance()->shortcutMap.tryShortcutEvent(w, &qevent);
+}
+
+
void QWindowSystemInterface::handleKeyEvent(QWindow *w, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text, bool autorep, ushort count) {
unsigned long time = QWindowSystemInterfacePrivate::eventTime.elapsed();
handleKeyEvent(w, time, t, k, mods, text, autorep, count);
diff --git a/src/gui/kernel/qwindowsysteminterface_qpa.h b/src/gui/kernel/qwindowsysteminterface_qpa.h
index 040f62e763..560f47d972 100644
--- a/src/gui/kernel/qwindowsysteminterface_qpa.h
+++ b/src/gui/kernel/qwindowsysteminterface_qpa.h
@@ -69,6 +69,18 @@ public:
static void handleMouseEvent(QWindow *w, const QPointF & local, const QPointF & global, Qt::MouseButtons b, Qt::KeyboardModifiers mods = Qt::NoModifier);
static void handleMouseEvent(QWindow *w, ulong timestamp, const QPointF & local, const QPointF & global, Qt::MouseButtons b, Qt::KeyboardModifiers mods = Qt::NoModifier);
+ static bool tryHandleSynchronousShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods,
+ const QString & text = QString(), bool autorep = false, ushort count = 1);
+ static bool tryHandleSynchronousShortcutEvent(QWindow *w, ulong timestamp, int k, Qt::KeyboardModifiers mods,
+ const QString & text = QString(), bool autorep = false, ushort count = 1);
+
+ static bool tryHandleSynchronousExtendedShortcutEvent(QWindow *w, int k, Qt::KeyboardModifiers mods,
+ quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers,
+ const QString & text = QString(), bool autorep = false, ushort count = 1);
+ static bool tryHandleSynchronousExtendedShortcutEvent(QWindow *w, ulong timestamp, int k, Qt::KeyboardModifiers mods,
+ quint32 nativeScanCode, quint32 nativeVirtualKey, quint32 nativeModifiers,
+ const QString & text = QString(), bool autorep = false, ushort count = 1);
+
static void handleKeyEvent(QWindow *w, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text = QString(), bool autorep = false, ushort count = 1);
static void handleKeyEvent(QWindow *w, ulong timestamp, QEvent::Type t, int k, Qt::KeyboardModifiers mods, const QString & text = QString(), bool autorep = false, ushort count = 1);
diff --git a/src/gui/text/qfontengine_ft.cpp b/src/gui/text/qfontengine_ft.cpp
index 8880eb7cb3..5dc757b6ce 100644
--- a/src/gui/text/qfontengine_ft.cpp
+++ b/src/gui/text/qfontengine_ft.cpp
@@ -1564,7 +1564,9 @@ void QFontEngineFT::recalcAdvances(QGlyphLayout *glyphs, QTextEngine::ShaperFlag
(flags & HB_ShaperFlag_UseDesignMetrics)) && FT_IS_SCALABLE(freetype->face);
for (int i = 0; i < glyphs->numGlyphs; i++) {
Glyph *g = cacheEnabled ? defaultGlyphSet.getGlyph(glyphs->glyphs[i]) : 0;
- if (g) {
+ // Since we are passing Format_None to loadGlyph, use same default format logic as loadGlyph
+ GlyphFormat acceptableFormat = (defaultFormat != Format_None) ? defaultFormat : Format_Mono;
+ if (g && g->format == acceptableFormat) {
glyphs->advances_x[i] = design ? QFixed::fromFixed(g->linearAdvance) : QFixed(g->advance);
} else {
if (!face)
diff --git a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
index fc600ebddd..e405c81726 100644
--- a/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
+++ b/src/plugins/platforms/cocoa/qcocoaapplicationdelegate.mm
@@ -354,7 +354,7 @@ static void cleanupCocoaApplicationDelegate()
- (void)qtDispatcherToQAction:(id)sender
{
Q_UNUSED(sender);
- //[[NSApp QT_MANGLE_NAMESPACE(qt_qcocoamenuLoader)] qtDispatcherToQAction:sender];
+ [qtMenuLoader qtDispatcherToQAction:sender];
}
@end
diff --git a/src/plugins/platforms/cocoa/qcocoaclipboard.mm b/src/plugins/platforms/cocoa/qcocoaclipboard.mm
index 799fb85183..87c085457f 100644
--- a/src/plugins/platforms/cocoa/qcocoaclipboard.mm
+++ b/src/plugins/platforms/cocoa/qcocoaclipboard.mm
@@ -64,6 +64,10 @@ QMimeData *QCocoaClipboard::mimeData(QClipboard::Mode mode)
void QCocoaClipboard::setMimeData(QMimeData *data, QClipboard::Mode mode)
{
if (QMacPasteboard *pasteBoard = pasteboardForMode(mode)) {
+ if (data == 0) {
+ pasteBoard->clear();
+ }
+
pasteBoard->sync();
pasteBoard->setMimeData(data);
emitChanged(mode);
diff --git a/src/plugins/platforms/cocoa/qnsview.mm b/src/plugins/platforms/cocoa/qnsview.mm
index a28c5959ce..3a697a3602 100644
--- a/src/plugins/platforms/cocoa/qnsview.mm
+++ b/src/plugins/platforms/cocoa/qnsview.mm
@@ -570,42 +570,47 @@ static QTouchDevice *touchDevice = 0;
return qtMods;
}
-- (void)handleKeyEvent:(NSEvent *)theEvent eventType:(int)eventType
+- (void)handleKeyEvent:(NSEvent *)nsevent eventType:(int)eventType
{
- NSTimeInterval timestamp = [theEvent timestamp];
- ulong qt_timestamp = timestamp * 1000;
- QString characters = QString::fromUtf8([[theEvent characters] UTF8String]);
- Qt::KeyboardModifiers modifiers = [self convertKeyModifiers : [theEvent modifierFlags]];
- QChar ch([[theEvent charactersIgnoringModifiers] characterAtIndex:0]);
- int keyCode = [self convertKeyCode : ch];
+ ulong timestamp = [nsevent timestamp] * 1000;
+ Qt::KeyboardModifiers modifiers = [self convertKeyModifiers:[nsevent modifierFlags]];
+ NSString *charactersIgnoringModifiers = [nsevent charactersIgnoringModifiers];
+ QChar ch([charactersIgnoringModifiers characterAtIndex:0]);
+ int keyCode = [self convertKeyCode:ch];
- QWindowSystemInterface::handleKeyEvent(m_window, qt_timestamp, QEvent::Type(eventType), keyCode, modifiers, characters);
-}
+ QString text;
+ if (eventType == QEvent::KeyPress) {
+ // ignore text for the U+F700-U+F8FF range. This is used by Cocoa when
+ // delivering function keys (e.g. arrow keys, backspace, F1-F35, etc.)
+ if ([charactersIgnoringModifiers length] == 1 && (ch.unicode() < 0xf700 || ch.unicode() > 0xf8ff))
+ text = QString::fromUtf8([[nsevent characters] UTF8String]);
-- (void)keyDown:(NSEvent *)theEvent
-{
- QObject *fo = QGuiApplication::focusObject();
- m_keyEventsAccepted = false;
- if (fo) {
- QInputMethodQueryEvent queryEvent(Qt::ImHints);
- if (QCoreApplication::sendEvent(fo, &queryEvent)) {
- Qt::InputMethodHints hints = static_cast<Qt::InputMethodHints>(queryEvent.value(Qt::ImHints).toUInt());
- if (!(hints & Qt::ImhDigitsOnly || hints & Qt::ImhFormattedNumbersOnly || hints & Qt::ImhHiddenText)) {
- [self interpretKeyEvents:[NSArray arrayWithObject: theEvent]];
+ if (!m_keyEventsAccepted && m_composingText.isEmpty())
+ m_keyEventsAccepted = QWindowSystemInterface::tryHandleSynchronousShortcutEvent(m_window, timestamp, keyCode, modifiers, text);
+
+ QObject *fo = QGuiApplication::focusObject();
+ if (!m_keyEventsAccepted && fo) {
+ QInputMethodQueryEvent queryEvent(Qt::ImHints);
+ if (QCoreApplication::sendEvent(fo, &queryEvent)) {
+ Qt::InputMethodHints hints = static_cast<Qt::InputMethodHints>(queryEvent.value(Qt::ImHints).toUInt());
+ if (!(hints & Qt::ImhDigitsOnly || hints & Qt::ImhFormattedNumbersOnly || hints & Qt::ImhHiddenText))
+ [self interpretKeyEvents:[NSArray arrayWithObject:nsevent]];
}
}
}
+ if (!m_keyEventsAccepted && m_composingText.isEmpty())
+ QWindowSystemInterface::handleKeyEvent(m_window, timestamp, QEvent::Type(eventType), keyCode, modifiers, text);
+}
- if (!m_keyEventsAccepted && m_composingText.isEmpty()) {
- [self handleKeyEvent : theEvent eventType :int(QEvent::KeyPress)];
- }
+- (void)keyDown:(NSEvent *)nsevent
+{
+ m_keyEventsAccepted = false;
+ [self handleKeyEvent:nsevent eventType:int(QEvent::KeyPress)];
}
-- (void)keyUp:(NSEvent *)theEvent
+- (void)keyUp:(NSEvent *)nsevent
{
- if (!m_keyEventsAccepted && m_composingText.isEmpty()) {
- [self handleKeyEvent : theEvent eventType :int(QEvent::KeyRelease)];
- }
+ [self handleKeyEvent:nsevent eventType:int(QEvent::KeyRelease)];
}
- (void) doCommandBySelector:(SEL)aSelector
diff --git a/src/testlib/qtestaccessible.h b/src/testlib/qtestaccessible.h
index 807cc2f846..6d8d6125c1 100644
--- a/src/testlib/qtestaccessible.h
+++ b/src/testlib/qtestaccessible.h
@@ -98,18 +98,18 @@ public:
}
static void clearEvents() { eventList().clear(); }
static EventList events() { return eventList(); }
- static bool verifyEvent(const QAccessibleEvent& ev)
+ static bool verifyEvent(QAccessibleEvent *ev)
{
if (eventList().isEmpty())
return false;
QAccessibleEvent *first = eventList().takeFirst();
- bool res = *first == ev;
+ bool res = *first == *ev;
delete first;
return res;
}
- static bool containsEvent(const QAccessibleEvent &event) {
+ static bool containsEvent(QAccessibleEvent *event) {
Q_FOREACH (QAccessibleEvent *ev, eventList()) {
- if (*ev == event)
+ if (*ev == *event)
return true;
}
return false;
diff --git a/src/testlib/qtestcase.cpp b/src/testlib/qtestcase.cpp
index fb9a8e630c..3075726cae 100644
--- a/src/testlib/qtestcase.cpp
+++ b/src/testlib/qtestcase.cpp
@@ -862,7 +862,7 @@ QT_BEGIN_NAMESPACE
/*! \fn bool QTest::qWaitForWindowShown(QWidget *window)
\since 4.6
- Waits until the \a window is shown in the screen. This is mainly useful for
+ Waits until the \a window is shown on the screen. This is mainly useful for
asynchronous systems like X11, where a window will be mapped to screen some
time after being asked to show itself on the screen. Returns true.
@@ -870,6 +870,37 @@ QT_BEGIN_NAMESPACE
\snippet doc/src/snippets/code/src_qtestlib_qtestcase.cpp 24
*/
+/*! \fn bool QTest::qWaitForWindowShown(QWindow *window, int timeout)
+ \since 5.0
+
+ Waits for \a timeout milliseconds or until the \a window is shown on the screen.
+ This is mainly useful for asynchronous systems like X11, where a window will be mapped to screen some
+ time after being asked to show itself on the screen.
+
+ Returns true if \c window is show in \a timout milliseconds, otherwise returns false.
+
+ \sa QTest::qWaitForWindowActive(), QTest::qWaitForWindowExposed()
+*/
+
+/*! \fn bool QTest::qWaitForWindowActive(QWindow *window, int timeout)
+ \since 5.0
+
+ Waits for \a timeout milliseconds or until the \a window is active.
+
+ Returns true if \c window is active in \a timout milliseconds, otherwise returns false.
+
+ \sa QTest::qWaitForWindowActive(), QTest::qWaitForWindowShown(), QWindow::isActive()
+*/
+
+/*! \fn bool QTest::qWaitForWindowExposed(QWindow *window, int timeout)
+ \since 5.0
+
+ Waits for \a timeout milliseconds or until the \a window is exposed.
+ Returns true if \c window is exposed in \a timout milliseconds, otherwise returns false.
+
+ \sa QTest::qWaitForWindowShown(), QTest::qWaitForWindowExposed(), QWindow::isExposed()
+*/
+
/*!
\class QTest::QTouchEventSequence
\inmodule QtTest
diff --git a/src/testlib/qtestsystem.h b/src/testlib/qtestsystem.h
index ade5f4c8ac..095f791cac 100644
--- a/src/testlib/qtestsystem.h
+++ b/src/testlib/qtestsystem.h
@@ -76,19 +76,39 @@ namespace QTest
return true;
}
- inline static bool qWaitForWindowShown(QWindow *window)
+ inline static bool qWaitForWindowActive(QWindow *window, int timeout = 1000)
+ {
+ QElapsedTimer timer;
+ timer.start();
+ while (!window->isActive()) {
+ int remaining = timeout - int(timer.elapsed());
+ if (remaining <= 0)
+ break;
+ QCoreApplication::processEvents(QEventLoop::AllEvents, remaining);
+ QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
+ QTest::qSleep(10);
+ }
+ return window->isActive();
+ }
+
+ inline static bool qWaitForWindowExposed(QWindow *window, int timeout = 1000)
{
QElapsedTimer timer;
timer.start();
while (!window->isExposed()) {
- int remaining = int(timer.elapsed()) - 1000;
+ int remaining = timeout - int(timer.elapsed());
if (remaining <= 0)
break;
QCoreApplication::processEvents(QEventLoop::AllEvents, remaining);
QCoreApplication::sendPostedEvents(0, QEvent::DeferredDelete);
QTest::qSleep(10);
}
- return true;
+ return window->isExposed();
+ }
+
+ inline static bool qWaitForWindowShown(QWindow *window, int timeout = 1000)
+ {
+ return qWaitForWindowActive(window, timeout);
}
}
diff --git a/src/tools/qdoc/ditaxmlgenerator.cpp b/src/tools/qdoc/ditaxmlgenerator.cpp
index 6b0c2dce88..f19f902c6b 100644
--- a/src/tools/qdoc/ditaxmlgenerator.cpp
+++ b/src/tools/qdoc/ditaxmlgenerator.cpp
@@ -5900,9 +5900,15 @@ void DitaXmlGenerator::writeDitaMap(const Tree *tree)
writeEndTag(); // </topicmeta>
writeStartTag(DT_topicref);
- xmlWriter().writeAttribute("navtitle",project);
- if (rootPageNode)
+ if (rootPageNode) {
+ if (!rootPageNode->title().isEmpty())
+ xmlWriter().writeAttribute("navtitle",rootPageNode->title());
+ else
+ xmlWriter().writeAttribute("navtitle",project);
xmlWriter().writeAttribute("href",fileName(rootPageNode));
+ }
+ else
+ xmlWriter().writeAttribute("navtitle",project);
writeTopicrefs(pageTypeMaps[Node::OverviewPage], "overviews");
writeTopicrefs(pageTypeMaps[Node::HowToPage], "howtos");
diff --git a/src/widgets/itemviews/qfileiconprovider.cpp b/src/widgets/itemviews/qfileiconprovider.cpp
index b6669c0784..5356b67f99 100644
--- a/src/widgets/itemviews/qfileiconprovider.cpp
+++ b/src/widgets/itemviews/qfileiconprovider.cpp
@@ -376,15 +376,16 @@ QIcon QFileIconProviderPrivate::getMacIcon(const QFileInfo &fi) const
qt_mac_constructQIconFromIconRef(iconRef, 0, &retIcon);
ReleaseIconRef(iconRef);
- pixmap = retIcon.pixmap(16);
- QPixmapCache::insert(keyBase + QLatin1String("16"), pixmap);
- pixmap = retIcon.pixmap(32);
- QPixmapCache::insert(keyBase + QLatin1String("32"), pixmap);
- pixmap = retIcon.pixmap(64);
- QPixmapCache::insert(keyBase + QLatin1String("64"), pixmap);
- pixmap = retIcon.pixmap(128);
- QPixmapCache::insert(keyBase + QLatin1String("128"), pixmap);
-
+ if (fi.isFile() && !fi.isExecutable() && !fi.isSymLink()) {
+ pixmap = retIcon.pixmap(16);
+ QPixmapCache::insert(keyBase + QLatin1String("16"), pixmap);
+ pixmap = retIcon.pixmap(32);
+ QPixmapCache::insert(keyBase + QLatin1String("32"), pixmap);
+ pixmap = retIcon.pixmap(64);
+ QPixmapCache::insert(keyBase + QLatin1String("64"), pixmap);
+ pixmap = retIcon.pixmap(128);
+ QPixmapCache::insert(keyBase + QLatin1String("128"), pixmap);
+ }
return retIcon;
}
#endif
diff --git a/src/widgets/kernel/qshortcut.cpp b/src/widgets/kernel/qshortcut.cpp
index 07c7a02d4d..92f6fbafba 100644
--- a/src/widgets/kernel/qshortcut.cpp
+++ b/src/widgets/kernel/qshortcut.cpp
@@ -46,6 +46,7 @@
#include <qevent.h>
#include <qwhatsthis.h>
#include <qmenu.h>
+#include <qmenubar.h>
#include <qapplication.h>
#include <private/qapplication_p.h>
#include <private/qshortcutmap_p.h>
@@ -114,7 +115,7 @@ bool qWidgetShortcutContextMatcher(QObject *object, Qt::ShortcutContext context)
static bool correctWidgetContext(Qt::ShortcutContext context, QWidget *w, QWidget *active_window)
{
bool visible = w->isVisible();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
if (!qApp->testAttribute(Qt::AA_DontUseNativeMenuBar) && qobject_cast<QMenuBar *>(w))
visible = true;
#endif
@@ -177,7 +178,7 @@ static bool correctWidgetContext(Qt::ShortcutContext context, QWidget *w, QWidge
static bool correctGraphicsWidgetContext(Qt::ShortcutContext context, QGraphicsWidget *w, QWidget *active_window)
{
bool visible = w->isVisible();
-#ifdef Q_WS_MAC
+#ifdef Q_OS_MAC
if (!qApp->testAttribute(Qt::AA_DontUseNativeMenuBar) && qobject_cast<QMenuBar *>(w))
visible = true;
#endif
diff --git a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
index 942d41d669..b22a3d526a 100644
--- a/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
+++ b/tests/auto/corelib/kernel/qmetatype/tst_qmetatype.cpp
@@ -660,20 +660,28 @@ FOR_EACH_CORE_METATYPE(RETURN_CREATE_COPY_FUNCTION)
void tst_QMetaType::sizeOf_data()
{
QTest::addColumn<QMetaType::Type>("type");
- QTest::addColumn<int>("size");
+ QTest::addColumn<size_t>("size");
- QTest::newRow("QMetaType::UnknownType") << QMetaType::UnknownType << 0;
+ QTest::newRow("QMetaType::UnknownType") << QMetaType::UnknownType << size_t(0);
#define ADD_METATYPE_TEST_ROW(MetaTypeName, MetaTypeId, RealType) \
- QTest::newRow(#RealType) << QMetaType::MetaTypeName << int(QTypeInfo<RealType>::sizeOf);
+ QTest::newRow(#RealType) << QMetaType::MetaTypeName << size_t(QTypeInfo<RealType>::sizeOf);
FOR_EACH_CORE_METATYPE(ADD_METATYPE_TEST_ROW)
#undef ADD_METATYPE_TEST_ROW
+
+ QTest::newRow("Whity<double>") << static_cast<QMetaType::Type>(::qMetaTypeId<Whity<double> >()) << sizeof(Whity<double>);
+QTest::newRow("Whity<int>") << static_cast<QMetaType::Type>(::qMetaTypeId<Whity<int> >()) << sizeof(Whity<int>);
+ QTest::newRow("Testspace::Foo") << static_cast<QMetaType::Type>(::qMetaTypeId<TestSpace::Foo>()) << sizeof(TestSpace::Foo);
+
+ QTest::newRow("-1") << QMetaType::Type(-1) << size_t(0);
+ QTest::newRow("-124125534") << QMetaType::Type(-124125534) << size_t(0);
+ QTest::newRow("124125534") << QMetaType::Type(124125534) << size_t(0);
}
void tst_QMetaType::sizeOf()
{
QFETCH(QMetaType::Type, type);
- QFETCH(int, size);
- QCOMPARE(QMetaType::sizeOf(type), size);
+ QFETCH(size_t, size);
+ QCOMPARE(size_t(QMetaType::sizeOf(type)), size);
}
void tst_QMetaType::sizeOfStaticLess_data()
@@ -684,8 +692,8 @@ void tst_QMetaType::sizeOfStaticLess_data()
void tst_QMetaType::sizeOfStaticLess()
{
QFETCH(QMetaType::Type, type);
- QFETCH(int, size);
- QCOMPARE(QMetaType(type).sizeOf(), size);
+ QFETCH(size_t, size);
+ QCOMPARE(size_t(QMetaType(type).sizeOf()), size);
}
struct CustomMovable {};
diff --git a/tests/auto/corelib/tools/qmap/tst_qmap.cpp b/tests/auto/corelib/tools/qmap/tst_qmap.cpp
index 79b0a931cb..7d0ef7d7e4 100644
--- a/tests/auto/corelib/tools/qmap/tst_qmap.cpp
+++ b/tests/auto/corelib/tools/qmap/tst_qmap.cpp
@@ -285,6 +285,8 @@ void tst_QMap::beginEnd()
QVERIFY( map.constBegin() == map.constEnd() );
map.insert( "0", "a" );
map.insert( "1", "b" );
+ QVERIFY( map.constBegin() == map.cbegin() );
+ QVERIFY( map.constEnd() == map.cend() );
// make a copy. const function shouldn't detach
StringMap map2 = map;
diff --git a/tests/auto/corelib/tools/qset/tst_qset.cpp b/tests/auto/corelib/tools/qset/tst_qset.cpp
index d7d8c99071..ee83339d50 100644
--- a/tests/auto/corelib/tools/qset/tst_qset.cpp
+++ b/tests/auto/corelib/tools/qset/tst_qset.cpp
@@ -393,9 +393,9 @@ void tst_QSet::begin()
{
QSet<int>::const_iterator i = set1.constBegin();
- QSet<int>::const_iterator j = set1.constBegin();
+ QSet<int>::const_iterator j = set1.cbegin();
QSet<int>::const_iterator k = set2.constBegin();
- QSet<int>::const_iterator ell = set2.constBegin();
+ QSet<int>::const_iterator ell = set2.cbegin();
QVERIFY(i == j);
QVERIFY(k == ell);
@@ -407,9 +407,9 @@ void tst_QSet::begin()
{
QSet<int>::const_iterator i = set1.constBegin();
- QSet<int>::const_iterator j = set1.constBegin();
+ QSet<int>::const_iterator j = set1.cbegin();
QSet<int>::const_iterator k = set2.constBegin();
- QSet<int>::const_iterator ell = set2.constBegin();
+ QSet<int>::const_iterator ell = set2.cbegin();
QVERIFY(i == j);
QVERIFY(k == ell);
@@ -421,9 +421,9 @@ void tst_QSet::begin()
{
QSet<int>::const_iterator i = set1.constBegin();
- QSet<int>::const_iterator j = set1.constBegin();
+ QSet<int>::const_iterator j = set1.cbegin();
QSet<int>::const_iterator k = set2.constBegin();
- QSet<int>::const_iterator ell = set2.constBegin();
+ QSet<int>::const_iterator ell = set2.cbegin();
QVERIFY(i == j);
QVERIFY(k == ell);
@@ -439,9 +439,9 @@ void tst_QSet::end()
{
QSet<int>::const_iterator i = set1.constEnd();
- QSet<int>::const_iterator j = set1.constEnd();
+ QSet<int>::const_iterator j = set1.cend();
QSet<int>::const_iterator k = set2.constEnd();
- QSet<int>::const_iterator ell = set2.constEnd();
+ QSet<int>::const_iterator ell = set2.cend();
QVERIFY(i == j);
QVERIFY(k == ell);
@@ -456,9 +456,9 @@ void tst_QSet::end()
{
QSet<int>::const_iterator i = set1.constEnd();
- QSet<int>::const_iterator j = set1.constEnd();
+ QSet<int>::const_iterator j = set1.cend();
QSet<int>::const_iterator k = set2.constEnd();
- QSet<int>::const_iterator ell = set2.constEnd();
+ QSet<int>::const_iterator ell = set2.cend();
QVERIFY(i == j);
QVERIFY(k == ell);
@@ -473,9 +473,9 @@ void tst_QSet::end()
{
QSet<int>::const_iterator i = set1.constEnd();
- QSet<int>::const_iterator j = set1.constEnd();
+ QSet<int>::const_iterator j = set1.cend();
QSet<int>::const_iterator k = set2.constEnd();
- QSet<int>::const_iterator ell = set2.constEnd();
+ QSet<int>::const_iterator ell = set2.cend();
QVERIFY(i == j);
QVERIFY(k == ell);
diff --git a/tests/auto/gui/painting/qpainter/qpainter.pro b/tests/auto/gui/painting/qpainter/qpainter.pro
index 2cbd5b7e1c..15af82a9bd 100644
--- a/tests/auto/gui/painting/qpainter/qpainter.pro
+++ b/tests/auto/gui/painting/qpainter/qpainter.pro
@@ -4,8 +4,6 @@ TARGET = tst_qpainter
QT += widgets widgets-private printsupport testlib
SOURCES += tst_qpainter.cpp
-mac*:CONFIG+=insignificant_test
-win32:CONFIG += insignificant_test # QTBUG-24188
TESTDATA += drawEllipse/* drawLine_rop_bitmap/* drawPixmap_rop/* drawPixmap_rop_bitmap/* \
task217400.png
diff --git a/tests/auto/other/collections/tst_collections.cpp b/tests/auto/other/collections/tst_collections.cpp
index dc6d7f4b55..973938594f 100644
--- a/tests/auto/other/collections/tst_collections.cpp
+++ b/tests/auto/other/collections/tst_collections.cpp
@@ -550,6 +550,10 @@ void tst_Collections::list()
QList<QString>::const_iterator cit = list.constBegin();
QVERIFY((*cit).toLower() == "xello");
QVERIFY(cit->toUpper() == "XELLO");
+
+ cit = list.cbegin();
+ QVERIFY((*cit).toLower() == "xello");
+ QVERIFY(cit->toUpper() == "XELLO");
}
{
@@ -967,6 +971,10 @@ void tst_Collections::linkedList()
QLinkedList<QString>::const_iterator cit = list.constBegin();
QVERIFY((*cit).toLower() == "xello");
QVERIFY(cit->toUpper() == "XELLO");
+
+ cit = list.cbegin();
+ QVERIFY((*cit).toLower() == "xello");
+ QVERIFY(cit->toUpper() == "XELLO");
}
{
@@ -1607,6 +1615,10 @@ void tst_Collections::hash()
QHash<int, QString>::const_iterator cit = hash.constBegin();
QVERIFY((*cit).toLower() == "xello");
QVERIFY(cit->toUpper() == "XELLO");
+
+ cit = hash.cbegin();
+ QVERIFY((*cit).toLower() == "xello");
+ QVERIFY(cit->toUpper() == "XELLO");
}
{
@@ -1924,6 +1936,10 @@ void tst_Collections::map()
QMap<int, QString>::const_iterator cit = map.constBegin();
QVERIFY((*cit).toLower() == "xello");
QVERIFY(cit->toUpper() == "XELLO");
+
+ cit = map.cbegin();
+ QVERIFY((*cit).toLower() == "xello");
+ QVERIFY(cit->toUpper() == "XELLO");
}
{
@@ -2902,7 +2918,7 @@ void tst_Collections::linkedlist_stl()
QCOMPARE(int(stdList.size()), elements.size());
std::list<QString>::const_iterator it = stdList.begin();
- QLinkedList<QString>::const_iterator it2 = list.constBegin();
+ QLinkedList<QString>::const_iterator it2 = list.cbegin();
for (uint j = 0; j < stdList.size(); ++j, ++it, ++it2)
QCOMPARE(*it, *it2);
@@ -3001,9 +3017,11 @@ void instantiateContainer()
#ifndef QT_NO_STL
typename ContainerType::const_iterator constIt;
constIt = constContainer.begin();
+ constIt = container.cbegin();
container.constBegin();
constIt = constContainer.end();
+ constIt = constContainer.cend();
container.constEnd();
Q_UNUSED(constIt)
#endif
diff --git a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
index c984fedc86..a72dac1b81 100644
--- a/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
+++ b/tests/auto/other/qaccessibility/tst_qaccessibility.cpp
@@ -369,18 +369,22 @@ void tst_QAccessibility::eventTest()
button->setObjectName(QString("Olaf"));
button->show();
- QVERIFY_EVENT(QAccessibleEvent(QAccessible::ObjectShow, button, -1));
+ QAccessibleEvent showEvent(QAccessible::ObjectShow, button, -1);
+ QVERIFY_EVENT(&showEvent);
button->setFocus(Qt::MouseFocusReason);
QTestAccessibility::clearEvents();
QTest::mouseClick(button, Qt::LeftButton, 0);
button->setAccessibleName("Olaf the second");
- QVERIFY_EVENT(QAccessibleEvent(QAccessible::NameChanged, button));
+ QAccessibleEvent nameEvent(QAccessible::NameChanged, button);
+ QVERIFY_EVENT(&nameEvent);
button->setAccessibleDescription("This is a button labeled Olaf");
- QVERIFY_EVENT(QAccessibleEvent(QAccessible::DescriptionChanged, button));
+ QAccessibleEvent descEvent(QAccessible::DescriptionChanged, button);
+ QVERIFY_EVENT(&descEvent);
button->hide();
- QVERIFY_EVENT(QAccessibleEvent(QAccessible::ObjectHide, button));
+ QAccessibleEvent hideEvent(QAccessible::ObjectHide, button);
+ QVERIFY_EVENT(&hideEvent);
delete button;
}
@@ -684,16 +688,20 @@ void tst_QAccessibility::hideShowTest()
window->show();
QVERIFY(!state(window).invisible);
QVERIFY(!state(child).invisible);
- QVERIFY(QTestAccessibility::containsEvent(QAccessibleEvent(QAccessible::ObjectShow, window)));
- QVERIFY(QTestAccessibility::containsEvent(QAccessibleEvent(QAccessible::ObjectShow, child)));
+ QAccessibleEvent show(QAccessible::ObjectShow, window);
+ QVERIFY(QTestAccessibility::containsEvent(&show));
+ QAccessibleEvent showChild(QAccessible::ObjectShow, child);
+ QVERIFY(QTestAccessibility::containsEvent(&showChild));
QTestAccessibility::clearEvents();
// hide() and veryfy that both window and child are invisible and get ObjectHide events.
window->hide();
QVERIFY(state(window).invisible);
QVERIFY(state(child).invisible);
- QVERIFY(QTestAccessibility::containsEvent(QAccessibleEvent(QAccessible::ObjectHide, window)));
- QVERIFY(QTestAccessibility::containsEvent(QAccessibleEvent(QAccessible::ObjectHide, child)));
+ QAccessibleEvent hide(QAccessible::ObjectHide, window);
+ QVERIFY(QTestAccessibility::containsEvent(&hide));
+ QAccessibleEvent hideChild(QAccessible::ObjectHide, child);
+ QVERIFY(QTestAccessibility::containsEvent(&hideChild));
QTestAccessibility::clearEvents();
delete window;
@@ -774,7 +782,8 @@ void tst_QAccessibility::mainWindowTest()
QLatin1String name = QLatin1String("I am the main window");
mw->setWindowTitle(name);
QTest::qWaitForWindowShown(mw);
- QVERIFY_EVENT(QAccessibleEvent(QAccessible::ObjectShow, mw));
+ QAccessibleEvent show(QAccessible::ObjectShow, mw);
+ QVERIFY_EVENT(&show);
QAccessibleInterface *interface = QAccessible::queryAccessibleInterface(mw);
QCOMPARE(interface->text(QAccessible::Name), name);
@@ -934,9 +943,10 @@ void tst_QAccessibility::buttonTest()
QVERIFY(checkBox.isChecked());
QAccessible::State st;
st.checked = true;
- QVERIFY_EVENT(QAccessibleStateChangeEvent(st, &checkBox));
+ QAccessibleStateChangeEvent ev(st, &checkBox);
+ QVERIFY_EVENT(&ev);
checkBox.setChecked(false);
- QVERIFY_EVENT(QAccessibleStateChangeEvent(st, &checkBox));
+ QVERIFY_EVENT(&ev);
delete interface;
}
@@ -954,7 +964,8 @@ void tst_QAccessibility::buttonTest()
QVERIFY(radio.isChecked());
QAccessible::State st;
st.checked = true;
- QVERIFY_EVENT(QAccessibleStateChangeEvent(st, &radio));
+ QAccessibleStateChangeEvent ev(st, &radio);
+ QVERIFY_EVENT(&ev);
delete interface;
}
@@ -1017,12 +1028,14 @@ void tst_QAccessibility::scrollBarTest()
scrollBar->resize(200, 50);
scrollBar->show();
QVERIFY(!scrollBarInterface->state().invisible);
- QVERIFY(QTestAccessibility::containsEvent(QAccessibleEvent(QAccessible::ObjectShow, scrollBar)));
+ QAccessibleEvent show(QAccessible::ObjectShow, scrollBar);
+ QVERIFY(QTestAccessibility::containsEvent(&show));
QTestAccessibility::clearEvents();
scrollBar->hide();
QVERIFY(scrollBarInterface->state().invisible);
- QVERIFY(QTestAccessibility::containsEvent(QAccessibleEvent(QAccessible::ObjectHide, scrollBar)));
+ QAccessibleEvent hide(QAccessible::ObjectHide, scrollBar);
+ QVERIFY(QTestAccessibility::containsEvent(&hide));
QTestAccessibility::clearEvents();
// Test that the left/right subcontrols are set to unavailable when the scrollBar is at the minimum/maximum.
@@ -1463,7 +1476,7 @@ void tst_QAccessibility::spinBoxTest()
QTest::keyPress(spinBox, Qt::Key_Up);
QTest::qWait(200);
QAccessibleEvent expectedEvent(QAccessible::ValueChanged, spinBox);
- QVERIFY(QTestAccessibility::containsEvent(expectedEvent));
+ QVERIFY(QTestAccessibility::containsEvent(&expectedEvent));
delete spinBox;
QTestAccessibility::clearEvents();
}
@@ -1733,7 +1746,8 @@ void tst_QAccessibility::lineEditTest()
le->setFocus(Qt::TabFocusReason);
QTestAccessibility::clearEvents();
le2->setFocus(Qt::TabFocusReason);
- QTRY_VERIFY(QTestAccessibility::containsEvent(QAccessibleEvent(QAccessible::Focus, le2)));
+ QAccessibleEvent ev(QAccessible::Focus, le2);
+ QTRY_VERIFY(QTestAccessibility::containsEvent(&ev));
le->setText(QLatin1String("500"));
le->setValidator(new QIntValidator());
@@ -1753,7 +1767,8 @@ void tst_QAccessibility::lineEditTest()
le3->deselect();
le3->setCursorPosition(3);
QCOMPARE(textIface->cursorPosition(), 3);
- QTRY_VERIFY(QTestAccessibility::containsEvent(QAccessibleEvent(QAccessible::TextCaretMoved, le3)));
+ QAccessibleEvent caretEvent(QAccessible::TextCaretMoved, le3);
+ QTRY_VERIFY(QTestAccessibility::containsEvent(&caretEvent));
QCOMPARE(textIface->selectionCount(), 0);
QTestAccessibility::clearEvents();
@@ -2124,11 +2139,15 @@ void tst_QAccessibility::listTest()
// Check for events
QTest::mouseClick(listView->viewport(), Qt::LeftButton, 0, listView->visualItemRect(listView->item(1)).center());
- QVERIFY(QTestAccessibility::containsEvent(QAccessibleEvent(QAccessible::Selection, listView, 2)));
- QVERIFY(QTestAccessibility::containsEvent(QAccessibleEvent(QAccessible::Focus, listView, 2)));
+ QAccessibleEvent selectList2(QAccessible::Selection, listView, 2);
+ QVERIFY(QTestAccessibility::containsEvent(&selectList2));
+ QAccessibleEvent focusList2(QAccessible::Focus, listView, 2);
+ QVERIFY(QTestAccessibility::containsEvent(&focusList2));
QTest::mouseClick(listView->viewport(), Qt::LeftButton, 0, listView->visualItemRect(listView->item(2)).center());
- QVERIFY(QTestAccessibility::containsEvent(QAccessibleEvent(QAccessible::Selection, listView, 3)));
- QVERIFY(QTestAccessibility::containsEvent(QAccessibleEvent(QAccessible::Focus, listView, 3)));
+ QAccessibleEvent selectList3(QAccessible::Selection, listView, 3);
+ QVERIFY(QTestAccessibility::containsEvent(&selectList3));
+ QAccessibleEvent focusList3(QAccessible::Focus, listView, 3);
+ QVERIFY(QTestAccessibility::containsEvent(&focusList3));
listView->addItem("Munich");
QCOMPARE(iface->childCount(), 4);
diff --git a/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp b/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp
index f75848556c..7e546baa91 100644
--- a/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp
+++ b/tests/benchmarks/corelib/codecs/qtextcodec/main.cpp
@@ -129,7 +129,9 @@ void tst_QTextCodec::fromUnicode_data() const
void tst_QTextCodec::fromUnicode() const
{
QFETCH(QTextCodec*, codec);
- QFile file(SRCDIR "utf-8.txt");
+ QString testFile = QFINDTESTDATA("utf-8.txt");
+ QVERIFY2(!testFile.isEmpty(), "cannot find test file utf-8.txt!");
+ QFile file(testFile);
if (!file.open(QFile::ReadOnly)) {
qFatal("Cannot open input file");
return;
@@ -156,7 +158,9 @@ void tst_QTextCodec::toUnicode_data() const
void tst_QTextCodec::toUnicode() const
{
QFETCH(QTextCodec*, codec);
- QFile file(SRCDIR "utf-8.txt");
+ QString testFile = QFINDTESTDATA("utf-8.txt");
+ QVERIFY2(!testFile.isEmpty(), "cannot find test file utf-8.txt!");
+ QFile file(testFile);
QVERIFY(file.open(QFile::ReadOnly));
QByteArray data = file.readAll();
const char *d = data.constData();
diff --git a/tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro b/tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro
index c13c714543..5ee577c256 100644
--- a/tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro
+++ b/tests/benchmarks/corelib/codecs/qtextcodec/qtextcodec.pro
@@ -2,9 +2,5 @@ TARGET = tst_bench_qtextcodec
QT = core testlib
SOURCES += main.cpp
-wince*:{
- DEFINES += SRCDIR=\\\"\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
+TESTDATA = utf-8.txt
diff --git a/tests/benchmarks/corelib/io/qdir/10000/10000.pro b/tests/benchmarks/corelib/io/qdir/10000/10000.pro
index 196b3b5b30..2e83dad071 100644
--- a/tests/benchmarks/corelib/io/qdir/10000/10000.pro
+++ b/tests/benchmarks/corelib/io/qdir/10000/10000.pro
@@ -1,5 +1,5 @@
TEMPLATE = app
-TARGET = bench_qdir_10000
+TARGET = tst_bench_qdir_10000
SOURCES += bench_qdir_10000.cpp
diff --git a/tests/benchmarks/corelib/json/json.pro b/tests/benchmarks/corelib/json/json.pro
index 1694d61d94..004f4b123e 100644
--- a/tests/benchmarks/corelib/json/json.pro
+++ b/tests/benchmarks/corelib/json/json.pro
@@ -3,3 +3,5 @@ QT = core testlib
CONFIG -= app_bundle
SOURCES += tst_bench_qtbinaryjson.cpp
+
+TESTDATA = numbers.json test.json
diff --git a/tests/benchmarks/corelib/json/test.json b/tests/benchmarks/corelib/json/test.json
new file mode 100644
index 0000000000..7c935fffc8
--- /dev/null
+++ b/tests/benchmarks/corelib/json/test.json
@@ -0,0 +1,66 @@
+[
+ "JSON Test Pattern pass1",
+ {"object with 1 member":["array with 1 element"]},
+ {},
+ [],
+ -42,
+ true,
+ false,
+ null,
+ {
+ "integer": 1234567890,
+ "real": -9876.543210,
+ "e": 0.123456789e-12,
+ "E": 1.234567890E+34,
+ "": 23456789012E66,
+ "zero": 0,
+ "one": 1,
+ "space": " ",
+ "quote": "\"",
+ "backslash": "\\",
+ "controls": "\b\f\n\r\t",
+ "slash": "/ & \/",
+ "alpha": "abcdefghijklmnopqrstuvwxyz",
+ "ALPHA": "ABCDEFGHIJKLMNOPQRSTUVWXYZ",
+ "digit": "0123456789",
+ "0123456789": "digit",
+ "special": "`1~!@#$%^&*()_+-={\':[,]}|;.</>?",
+ "hex": "\u0123\u4567\u89AB\uCDEF\uabcd\uef4A",
+ "true": true,
+ "false": false,
+ "null": null,
+ "array":[ ],
+ "object":{ },
+ "address": "50 St. James Street",
+ "url": "http://www.JSON.org/",
+ "comment": "// /* <!-- --",
+ "# -- --> */": " ",
+ " s p a c e d " :[1,2 , 3
+
+,
+
+4 , 5 , 6 ,7 ],"compact":[1,2,3,4,5,6,7],
+ "jsontext": "{\"object with 1 member\":[\"array with 1 element\"]}",
+ "quotes": "&#34; \u0022 %22 0x22 034 &#x22;",
+ "\/\"\uCAFE\uBABE\uAB98\uFCDE\ubcda\uef4A\b\f\n\r\t`1~!@#$%^&*()_+-=[]{}|;:\',./<>?" : "A key can be any string"
+ },
+ 0.5 ,98.6
+,
+99.44
+,
+
+1066,
+1e1,
+0.1e1,
+1e-1,
+1e00,
+2e+00,
+2e-00,
+"rosebud",
+{"foo": "bar"},
+{"classification":{"relevancyScore":1000,"searchUrl":{"value":"http://www.bizrate.com/iphone-cases/index__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"}},"products":{"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$4,833.99","integral":483399}},"product":[{"type":"PRODUCT","title":"Silicone case for iPhone 3G/ 3GS","description":"Elite Horizontal Leather Pouch for Apple iPhone 3G/3Gs - Premium quality horizontal case for your Apple iPhone 3G/3Gs. This pouch is ideal for the style conscious on the go. This great looking case is made from high-quality leather with classic black...","manufacturer":"Apple","url":{"value":"http://www.bizrate.com/silicone-case-for-iphone-3g-3gs--pid1968262863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=1968262863","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=1968262863","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=1968262863","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=1968262863","xsize":400,"ysize":400}]},"relevancy":310711221747712.000000,"priceSet":{"minPrice":{"value":"$1.56","integral":156},"maxPrice":{"value":"$29.99","integral":2999},"stores":14},"id":1968262863,"categoryId":8515},{"type":"PRODUCT","title":"Nonslip Checkered Silicone Skin Soft Case for iPhone 4 4G","description":"Specification:Product Name Silicone Skin Case Model for Apple iPhone 4 Color Black Material Soft Silicone Skin Weight 26g Package 1 x Case for Apple iPhone 4 Description:This is a non-OEM product.Accessory Only, Phone is not included.","manufacturer":"H&B","url":{"value":"http://www.bizrate.com/nonslip-checkered-silicone-skin-soft-case-for-iphone-4-4g--pid2534935499/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2534935499","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2534935499","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2534935499","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2534935499","xsize":400,"ysize":400}]},"relevancy":175580930637824.000000,"priceSet":{"minPrice":{"value":"$0.45","integral":45},"maxPrice":{"value":"$194.95","integral":19495},"stores":34},"id":2534935499,"categoryId":8515},{"type":"PRODUCT","title":"Plastic Case for iPhone 4 - Black","description":"Description:Detachable Windmill Type Matte Hard Plastic Case Cover for iPhone 4 (Black / Magenta)Customised your iPhone with this wonderful Plastic Case which is a accessory for your iPhone 4 which is made of high quality and durable plastic, protect","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/plastic-case-for-iphone-4-black--pid2305624670/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2305624670","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2305624670","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2305624670","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2305624670","xsize":400,"ysize":400}]},"relevancy":132488642953216.000000,"priceSet":{"minPrice":{"value":"$0.99","integral":99},"maxPrice":{"value":"$303.68","integral":30368},"stores":33},"id":2305624670,"categoryId":8515},{"type":"PRODUCT","title":"Protective Silicone Case for iPhone 4","description":"Made of high quality PVC material Protects your iPhone 4 from any scratch and dirt Easy to install and remove, no any tool needed Cut-out design allows user can access all keypad / button and slot without having to remove the case","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/protective-silicone-case-for-iphone-4--pid2120981405/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2120981405","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2120981405","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2120981405","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2120981405","xsize":400,"ysize":400}]},"relevancy":108614681362432.000000,"priceSet":{"minPrice":{"value":"$1.70","integral":170},"maxPrice":{"value":"$99.99","integral":9999},"stores":11},"id":2120981405,"categoryId":8515},{"type":"PRODUCT","title":"Iphone® 4 Aerosport Case","description":"Do more than just protect your iPhone 4 with this case bundle from rooCASE. This 3 in 1 bundle include a snap-on case, screen protector and a Nike+ sensor shoe pouch that can be use on most running shoes. Color: Purple Design: Love Provides protection...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/iphone-4-aerosport-case--pid2203798762/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2203798762","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2203798762","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2203798762","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2203798762","xsize":400,"ysize":400}]},"relevancy":96203484168192.000000,"priceSet":{"minPrice":{"value":"$2.49","integral":249},"maxPrice":{"value":"$79.95","integral":7995},"stores":16},"id":2203798762,"categoryId":8515},{"type":"PRODUCT","title":"Case Reflect For Iphone 3G","description":"NCAA iPhone 3G faceplate features the schools primary logo silk screened on the front of the case.","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/case-reflect-for-iphone-3g--pid1114627445/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=1114627445","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=1114627445","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=1114627445","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=1114627445","xsize":400,"ysize":400}]},"relevancy":84727583211520.000000,"priceSet":{"minPrice":{"value":"$0.69","integral":69},"maxPrice":{"value":"$75.52","integral":7552},"stores":59},"id":1114627445,"categoryId":8515},{"type":"PRODUCT","title":"Infuse Protector Case for iPhone 4 Black","description":"Protect and personalize your iPhone 4 with this front and back image design Protector Case. Form-fitting front and back hard plastic covers Protects your cell phone without adding a lot of bulk Smooth glossy finish Snaps on to the front edges, sides...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/infuse-protector-case-for-iphone-4-black--pid2557462717/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2557462717","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2557462717","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2557462717","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2557462717","xsize":400,"ysize":400}]},"relevancy":80831066406912.000000,"priceSet":{"minPrice":{"value":"$0.59","integral":59},"maxPrice":{"value":"$79.00","integral":7900},"stores":24},"id":2557462717,"categoryId":8515},{"type":"PRODUCT","title":"Dragonfly iPhone 4 Kream Case - Black","description":"DF-0030219 - White, Kream Case for iPhone 4 by Dragon-Fly","url":{"value":"http://www.bizrate.com/dragonfly-iphone-4-kream-case-black--pid2442061740/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2442061740","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2442061740","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2442061740","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2442061740","xsize":400,"ysize":400}]},"relevancy":70900229603328.000000,"priceSet":{"minPrice":{"value":"$1.05","integral":105},"maxPrice":{"value":"$94.49","integral":9449},"stores":30},"id":2442061740,"categoryId":8515},{"type":"PRODUCT","title":"Apple iPhone 3G/3GS Silicone Case (Black)","description":"Snap on Apple iPhone 3G 3GS Synthetic Leather Hardshell Case! Premium Qualtiy Synthetic Leather cover provides style, comfort, and protection to your iPhone 3G & 3GS. It also adds a sophisticated elegance and cool to your fashion. The case allows Quick...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/apple-iphone-3g3gs-silicone-case-black--pid2004746863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2004746863","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2004746863","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2004746863","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2004746863","xsize":400,"ysize":400}]},"relevancy":65194915004416.000000,"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$414.99","integral":41499},"stores":39},"id":2004746863,"categoryId":8515},{"type":"PRODUCT","title":"Otterbox iPhone 4 Defender Case - Black","description":"Your iPhone 4 has become a big part of your life. With FaceTime video, retina display, multitasking, HD video recording and more - you've got a lot to lose. You won't find a tougher case than the OtterBox Defender Series for iPhone 4. This three-layer...","manufacturer":"Universal","url":{"value":"http://www.bizrate.com/otterbox-iphone-4-defender-case-black--pid2584611575/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2584611575","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2584611575","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2584611575","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2584611575","xsize":400,"ysize":400}]},"relevancy":61515478597632.000000,"priceSet":{"minPrice":{"value":"$3.28","integral":328},"maxPrice":{"value":"$110.65","integral":11065},"stores":25},"id":2584611575,"categoryId":8515}],"includedResults":10,"totalResults":2000}},
+{"classification":{"relevancyScore":1000,"searchUrl":{"value":"http://www.bizrate.com/iphone-cases/index__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"}},"products":{"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$4,833.99","integral":483399}},"product":[{"type":"PRODUCT","title":"Silicone case for iPhone 3G/ 3GS","description":"Elite Horizontal Leather Pouch for Apple iPhone 3G/3Gs - Premium quality horizontal case for your Apple iPhone 3G/3Gs. This pouch is ideal for the style conscious on the go. This great looking case is made from high-quality leather with classic black...","manufacturer":"Apple","url":{"value":"http://www.bizrate.com/silicone-case-for-iphone-3g-3gs--pid1968262863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=1968262863","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=1968262863","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=1968262863","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=1968262863","xsize":400,"ysize":400}]},"relevancy":310711221747712.000000,"priceSet":{"minPrice":{"value":"$1.56","integral":156},"maxPrice":{"value":"$29.99","integral":2999},"stores":14},"id":1968262863,"categoryId":8515},{"type":"PRODUCT","title":"Nonslip Checkered Silicone Skin Soft Case for iPhone 4 4G","description":"Specification:Product Name Silicone Skin Case Model for Apple iPhone 4 Color Black Material Soft Silicone Skin Weight 26g Package 1 x Case for Apple iPhone 4 Description:This is a non-OEM product.Accessory Only, Phone is not included.","manufacturer":"H&B","url":{"value":"http://www.bizrate.com/nonslip-checkered-silicone-skin-soft-case-for-iphone-4-4g--pid2534935499/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2534935499","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2534935499","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2534935499","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2534935499","xsize":400,"ysize":400}]},"relevancy":175580930637824.000000,"priceSet":{"minPrice":{"value":"$0.45","integral":45},"maxPrice":{"value":"$194.95","integral":19495},"stores":34},"id":2534935499,"categoryId":8515},{"type":"PRODUCT","title":"Plastic Case for iPhone 4 - Black","description":"Description:Detachable Windmill Type Matte Hard Plastic Case Cover for iPhone 4 (Black / Magenta)Customised your iPhone with this wonderful Plastic Case which is a accessory for your iPhone 4 which is made of high quality and durable plastic, protect","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/plastic-case-for-iphone-4-black--pid2305624670/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2305624670","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2305624670","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2305624670","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2305624670","xsize":400,"ysize":400}]},"relevancy":132488642953216.000000,"priceSet":{"minPrice":{"value":"$0.99","integral":99},"maxPrice":{"value":"$303.68","integral":30368},"stores":33},"id":2305624670,"categoryId":8515},{"type":"PRODUCT","title":"Protective Silicone Case for iPhone 4","description":"Made of high quality PVC material Protects your iPhone 4 from any scratch and dirt Easy to install and remove, no any tool needed Cut-out design allows user can access all keypad / button and slot without having to remove the case","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/protective-silicone-case-for-iphone-4--pid2120981405/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2120981405","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2120981405","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2120981405","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2120981405","xsize":400,"ysize":400}]},"relevancy":108614681362432.000000,"priceSet":{"minPrice":{"value":"$1.70","integral":170},"maxPrice":{"value":"$99.99","integral":9999},"stores":11},"id":2120981405,"categoryId":8515},{"type":"PRODUCT","title":"Iphone® 4 Aerosport Case","description":"Do more than just protect your iPhone 4 with this case bundle from rooCASE. This 3 in 1 bundle include a snap-on case, screen protector and a Nike+ sensor shoe pouch that can be use on most running shoes. Color: Purple Design: Love Provides protection...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/iphone-4-aerosport-case--pid2203798762/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2203798762","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2203798762","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2203798762","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2203798762","xsize":400,"ysize":400}]},"relevancy":96203484168192.000000,"priceSet":{"minPrice":{"value":"$2.49","integral":249},"maxPrice":{"value":"$79.95","integral":7995},"stores":16},"id":2203798762,"categoryId":8515},{"type":"PRODUCT","title":"Case Reflect For Iphone 3G","description":"NCAA iPhone 3G faceplate features the schools primary logo silk screened on the front of the case.","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/case-reflect-for-iphone-3g--pid1114627445/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=1114627445","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=1114627445","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=1114627445","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=1114627445","xsize":400,"ysize":400}]},"relevancy":84727583211520.000000,"priceSet":{"minPrice":{"value":"$0.69","integral":69},"maxPrice":{"value":"$75.52","integral":7552},"stores":59},"id":1114627445,"categoryId":8515},{"type":"PRODUCT","title":"Infuse Protector Case for iPhone 4 Black","description":"Protect and personalize your iPhone 4 with this front and back image design Protector Case. Form-fitting front and back hard plastic covers Protects your cell phone without adding a lot of bulk Smooth glossy finish Snaps on to the front edges, sides...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/infuse-protector-case-for-iphone-4-black--pid2557462717/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2557462717","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2557462717","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2557462717","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2557462717","xsize":400,"ysize":400}]},"relevancy":80831066406912.000000,"priceSet":{"minPrice":{"value":"$0.59","integral":59},"maxPrice":{"value":"$79.00","integral":7900},"stores":24},"id":2557462717,"categoryId":8515},{"type":"PRODUCT","title":"Dragonfly iPhone 4 Kream Case - Black","description":"DF-0030219 - White, Kream Case for iPhone 4 by Dragon-Fly","url":{"value":"http://www.bizrate.com/dragonfly-iphone-4-kream-case-black--pid2442061740/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2442061740","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2442061740","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2442061740","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2442061740","xsize":400,"ysize":400}]},"relevancy":70900229603328.000000,"priceSet":{"minPrice":{"value":"$1.05","integral":105},"maxPrice":{"value":"$94.49","integral":9449},"stores":30},"id":2442061740,"categoryId":8515},{"type":"PRODUCT","title":"Apple iPhone 3G/3GS Silicone Case (Black)","description":"Snap on Apple iPhone 3G 3GS Synthetic Leather Hardshell Case! Premium Qualtiy Synthetic Leather cover provides style, comfort, and protection to your iPhone 3G & 3GS. It also adds a sophisticated elegance and cool to your fashion. The case allows Quick...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/apple-iphone-3g3gs-silicone-case-black--pid2004746863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2004746863","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2004746863","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2004746863","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2004746863","xsize":400,"ysize":400}]},"relevancy":65194915004416.000000,"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$414.99","integral":41499},"stores":39},"id":2004746863,"categoryId":8515},{"type":"PRODUCT","title":"Otterbox iPhone 4 Defender Case - Black","description":"Your iPhone 4 has become a big part of your life. With FaceTime video, retina display, multitasking, HD video recording and more - you've got a lot to lose. You won't find a tougher case than the OtterBox Defender Series for iPhone 4. This three-layer...","manufacturer":"Universal","url":{"value":"http://www.bizrate.com/otterbox-iphone-4-defender-case-black--pid2584611575/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2584611575","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2584611575","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2584611575","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2584611575","xsize":400,"ysize":400}]},"relevancy":61515478597632.000000,"priceSet":{"minPrice":{"value":"$3.28","integral":328},"maxPrice":{"value":"$110.65","integral":11065},"stores":25},"id":2584611575,"categoryId":8515}],"includedResults":10,"totalResults":2000}},
+{"classification":{"relevancyScore":1000,"searchUrl":{"value":"http://www.bizrate.com/iphone-cases/index__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"}},"products":{"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$4,833.99","integral":483399}},"product":[{"type":"PRODUCT","title":"Silicone case for iPhone 3G/ 3GS","description":"Elite Horizontal Leather Pouch for Apple iPhone 3G/3Gs - Premium quality horizontal case for your Apple iPhone 3G/3Gs. This pouch is ideal for the style conscious on the go. This great looking case is made from high-quality leather with classic black...","manufacturer":"Apple","url":{"value":"http://www.bizrate.com/silicone-case-for-iphone-3g-3gs--pid1968262863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=1968262863","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=1968262863","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=1968262863","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=1968262863","xsize":400,"ysize":400}]},"relevancy":310711221747712.000000,"priceSet":{"minPrice":{"value":"$1.56","integral":156},"maxPrice":{"value":"$29.99","integral":2999},"stores":14},"id":1968262863,"categoryId":8515},{"type":"PRODUCT","title":"Nonslip Checkered Silicone Skin Soft Case for iPhone 4 4G","description":"Specification:Product Name Silicone Skin Case Model for Apple iPhone 4 Color Black Material Soft Silicone Skin Weight 26g Package 1 x Case for Apple iPhone 4 Description:This is a non-OEM product.Accessory Only, Phone is not included.","manufacturer":"H&B","url":{"value":"http://www.bizrate.com/nonslip-checkered-silicone-skin-soft-case-for-iphone-4-4g--pid2534935499/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2534935499","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2534935499","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2534935499","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2534935499","xsize":400,"ysize":400}]},"relevancy":175580930637824.000000,"priceSet":{"minPrice":{"value":"$0.45","integral":45},"maxPrice":{"value":"$194.95","integral":19495},"stores":34},"id":2534935499,"categoryId":8515},{"type":"PRODUCT","title":"Plastic Case for iPhone 4 - Black","description":"Description:Detachable Windmill Type Matte Hard Plastic Case Cover for iPhone 4 (Black / Magenta)Customised your iPhone with this wonderful Plastic Case which is a accessory for your iPhone 4 which is made of high quality and durable plastic, protect","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/plastic-case-for-iphone-4-black--pid2305624670/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2305624670","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2305624670","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2305624670","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2305624670","xsize":400,"ysize":400}]},"relevancy":132488642953216.000000,"priceSet":{"minPrice":{"value":"$0.99","integral":99},"maxPrice":{"value":"$303.68","integral":30368},"stores":33},"id":2305624670,"categoryId":8515},{"type":"PRODUCT","title":"Protective Silicone Case for iPhone 4","description":"Made of high quality PVC material Protects your iPhone 4 from any scratch and dirt Easy to install and remove, no any tool needed Cut-out design allows user can access all keypad / button and slot without having to remove the case","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/protective-silicone-case-for-iphone-4--pid2120981405/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2120981405","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2120981405","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2120981405","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2120981405","xsize":400,"ysize":400}]},"relevancy":108614681362432.000000,"priceSet":{"minPrice":{"value":"$1.70","integral":170},"maxPrice":{"value":"$99.99","integral":9999},"stores":11},"id":2120981405,"categoryId":8515},{"type":"PRODUCT","title":"Iphone® 4 Aerosport Case","description":"Do more than just protect your iPhone 4 with this case bundle from rooCASE. This 3 in 1 bundle include a snap-on case, screen protector and a Nike+ sensor shoe pouch that can be use on most running shoes. Color: Purple Design: Love Provides protection...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/iphone-4-aerosport-case--pid2203798762/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2203798762","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2203798762","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2203798762","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2203798762","xsize":400,"ysize":400}]},"relevancy":96203484168192.000000,"priceSet":{"minPrice":{"value":"$2.49","integral":249},"maxPrice":{"value":"$79.95","integral":7995},"stores":16},"id":2203798762,"categoryId":8515},{"type":"PRODUCT","title":"Case Reflect For Iphone 3G","description":"NCAA iPhone 3G faceplate features the schools primary logo silk screened on the front of the case.","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/case-reflect-for-iphone-3g--pid1114627445/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=1114627445","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=1114627445","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=1114627445","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=1114627445","xsize":400,"ysize":400}]},"relevancy":84727583211520.000000,"priceSet":{"minPrice":{"value":"$0.69","integral":69},"maxPrice":{"value":"$75.52","integral":7552},"stores":59},"id":1114627445,"categoryId":8515},{"type":"PRODUCT","title":"Infuse Protector Case for iPhone 4 Black","description":"Protect and personalize your iPhone 4 with this front and back image design Protector Case. Form-fitting front and back hard plastic covers Protects your cell phone without adding a lot of bulk Smooth glossy finish Snaps on to the front edges, sides...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/infuse-protector-case-for-iphone-4-black--pid2557462717/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2557462717","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2557462717","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2557462717","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2557462717","xsize":400,"ysize":400}]},"relevancy":80831066406912.000000,"priceSet":{"minPrice":{"value":"$0.59","integral":59},"maxPrice":{"value":"$79.00","integral":7900},"stores":24},"id":2557462717,"categoryId":8515},{"type":"PRODUCT","title":"Dragonfly iPhone 4 Kream Case - Black","description":"DF-0030219 - White, Kream Case for iPhone 4 by Dragon-Fly","url":{"value":"http://www.bizrate.com/dragonfly-iphone-4-kream-case-black--pid2442061740/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2442061740","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2442061740","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2442061740","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2442061740","xsize":400,"ysize":400}]},"relevancy":70900229603328.000000,"priceSet":{"minPrice":{"value":"$1.05","integral":105},"maxPrice":{"value":"$94.49","integral":9449},"stores":30},"id":2442061740,"categoryId":8515},{"type":"PRODUCT","title":"Apple iPhone 3G/3GS Silicone Case (Black)","description":"Snap on Apple iPhone 3G 3GS Synthetic Leather Hardshell Case! Premium Qualtiy Synthetic Leather cover provides style, comfort, and protection to your iPhone 3G & 3GS. It also adds a sophisticated elegance and cool to your fashion. The case allows Quick...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/apple-iphone-3g3gs-silicone-case-black--pid2004746863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2004746863","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2004746863","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2004746863","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2004746863","xsize":400,"ysize":400}]},"relevancy":65194915004416.000000,"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$414.99","integral":41499},"stores":39},"id":2004746863,"categoryId":8515},{"type":"PRODUCT","title":"Otterbox iPhone 4 Defender Case - Black","description":"Your iPhone 4 has become a big part of your life. With FaceTime video, retina display, multitasking, HD video recording and more - you've got a lot to lose. You won't find a tougher case than the OtterBox Defender Series for iPhone 4. This three-layer...","manufacturer":"Universal","url":{"value":"http://www.bizrate.com/otterbox-iphone-4-defender-case-black--pid2584611575/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2584611575","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2584611575","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2584611575","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2584611575","xsize":400,"ysize":400}]},"relevancy":61515478597632.000000,"priceSet":{"minPrice":{"value":"$3.28","integral":328},"maxPrice":{"value":"$110.65","integral":11065},"stores":25},"id":2584611575,"categoryId":8515}],"includedResults":10,"totalResults":2000}},
+{"classification":{"relevancyScore":1000,"searchUrl":{"value":"http://www.bizrate.com/iphone-cases/index__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"}},"products":{"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$4,833.99","integral":483399}},"product":[{"type":"PRODUCT","title":"Silicone case for iPhone 3G/ 3GS","description":"Elite Horizontal Leather Pouch for Apple iPhone 3G/3Gs - Premium quality horizontal case for your Apple iPhone 3G/3Gs. This pouch is ideal for the style conscious on the go. This great looking case is made from high-quality leather with classic black...","manufacturer":"Apple","url":{"value":"http://www.bizrate.com/silicone-case-for-iphone-3g-3gs--pid1968262863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=1968262863","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=1968262863","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=1968262863","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=1968262863","xsize":400,"ysize":400}]},"relevancy":310711221747712.000000,"priceSet":{"minPrice":{"value":"$1.56","integral":156},"maxPrice":{"value":"$29.99","integral":2999},"stores":14},"id":1968262863,"categoryId":8515},{"type":"PRODUCT","title":"Nonslip Checkered Silicone Skin Soft Case for iPhone 4 4G","description":"Specification:Product Name Silicone Skin Case Model for Apple iPhone 4 Color Black Material Soft Silicone Skin Weight 26g Package 1 x Case for Apple iPhone 4 Description:This is a non-OEM product.Accessory Only, Phone is not included.","manufacturer":"H&B","url":{"value":"http://www.bizrate.com/nonslip-checkered-silicone-skin-soft-case-for-iphone-4-4g--pid2534935499/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2534935499","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2534935499","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2534935499","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2534935499","xsize":400,"ysize":400}]},"relevancy":175580930637824.000000,"priceSet":{"minPrice":{"value":"$0.45","integral":45},"maxPrice":{"value":"$194.95","integral":19495},"stores":34},"id":2534935499,"categoryId":8515},{"type":"PRODUCT","title":"Plastic Case for iPhone 4 - Black","description":"Description:Detachable Windmill Type Matte Hard Plastic Case Cover for iPhone 4 (Black / Magenta)Customised your iPhone with this wonderful Plastic Case which is a accessory for your iPhone 4 which is made of high quality and durable plastic, protect","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/plastic-case-for-iphone-4-black--pid2305624670/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2305624670","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2305624670","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2305624670","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2305624670","xsize":400,"ysize":400}]},"relevancy":132488642953216.000000,"priceSet":{"minPrice":{"value":"$0.99","integral":99},"maxPrice":{"value":"$303.68","integral":30368},"stores":33},"id":2305624670,"categoryId":8515},{"type":"PRODUCT","title":"Protective Silicone Case for iPhone 4","description":"Made of high quality PVC material Protects your iPhone 4 from any scratch and dirt Easy to install and remove, no any tool needed Cut-out design allows user can access all keypad / button and slot without having to remove the case","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/protective-silicone-case-for-iphone-4--pid2120981405/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2120981405","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2120981405","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2120981405","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2120981405","xsize":400,"ysize":400}]},"relevancy":108614681362432.000000,"priceSet":{"minPrice":{"value":"$1.70","integral":170},"maxPrice":{"value":"$99.99","integral":9999},"stores":11},"id":2120981405,"categoryId":8515},{"type":"PRODUCT","title":"Iphone® 4 Aerosport Case","description":"Do more than just protect your iPhone 4 with this case bundle from rooCASE. This 3 in 1 bundle include a snap-on case, screen protector and a Nike+ sensor shoe pouch that can be use on most running shoes. Color: Purple Design: Love Provides protection...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/iphone-4-aerosport-case--pid2203798762/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2203798762","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2203798762","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2203798762","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2203798762","xsize":400,"ysize":400}]},"relevancy":96203484168192.000000,"priceSet":{"minPrice":{"value":"$2.49","integral":249},"maxPrice":{"value":"$79.95","integral":7995},"stores":16},"id":2203798762,"categoryId":8515},{"type":"PRODUCT","title":"Case Reflect For Iphone 3G","description":"NCAA iPhone 3G faceplate features the schools primary logo silk screened on the front of the case.","manufacturer":"Griffin","url":{"value":"http://www.bizrate.com/case-reflect-for-iphone-3g--pid1114627445/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=1114627445","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=1114627445","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=1114627445","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=1114627445","xsize":400,"ysize":400}]},"relevancy":84727583211520.000000,"priceSet":{"minPrice":{"value":"$0.69","integral":69},"maxPrice":{"value":"$75.52","integral":7552},"stores":59},"id":1114627445,"categoryId":8515},{"type":"PRODUCT","title":"Infuse Protector Case for iPhone 4 Black","description":"Protect and personalize your iPhone 4 with this front and back image design Protector Case. Form-fitting front and back hard plastic covers Protects your cell phone without adding a lot of bulk Smooth glossy finish Snaps on to the front edges, sides...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/infuse-protector-case-for-iphone-4-black--pid2557462717/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2557462717","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2557462717","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2557462717","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2557462717","xsize":400,"ysize":400}]},"relevancy":80831066406912.000000,"priceSet":{"minPrice":{"value":"$0.59","integral":59},"maxPrice":{"value":"$79.00","integral":7900},"stores":24},"id":2557462717,"categoryId":8515},{"type":"PRODUCT","title":"Dragonfly iPhone 4 Kream Case - Black","description":"DF-0030219 - White, Kream Case for iPhone 4 by Dragon-Fly","url":{"value":"http://www.bizrate.com/dragonfly-iphone-4-kream-case-black--pid2442061740/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2442061740","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2442061740","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2442061740","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2442061740","xsize":400,"ysize":400}]},"relevancy":70900229603328.000000,"priceSet":{"minPrice":{"value":"$1.05","integral":105},"maxPrice":{"value":"$94.49","integral":9449},"stores":30},"id":2442061740,"categoryId":8515},{"type":"PRODUCT","title":"Apple iPhone 3G/3GS Silicone Case (Black)","description":"Snap on Apple iPhone 3G 3GS Synthetic Leather Hardshell Case! Premium Qualtiy Synthetic Leather cover provides style, comfort, and protection to your iPhone 3G & 3GS. It also adds a sophisticated elegance and cool to your fashion. The case allows Quick...","manufacturer":"Luxmo","url":{"value":"http://www.bizrate.com/apple-iphone-3g3gs-silicone-case-black--pid2004746863/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2004746863","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2004746863","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2004746863","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2004746863","xsize":400,"ysize":400}]},"relevancy":65194915004416.000000,"priceSet":{"minPrice":{"value":"$0.01","integral":1},"maxPrice":{"value":"$414.99","integral":41499},"stores":39},"id":2004746863,"categoryId":8515},{"type":"PRODUCT","title":"Otterbox iPhone 4 Defender Case - Black","description":"Your iPhone 4 has become a big part of your life. With FaceTime video, retina display, multitasking, HD video recording and more - you've got a lot to lose. You won't find a tougher case than the OtterBox Defender Series for iPhone 4. This three-layer...","manufacturer":"Universal","url":{"value":"http://www.bizrate.com/otterbox-iphone-4-defender-case-black--pid2584611575/compareprices__rf--af1__af_assettype_id--10__af_creative_id--6__af_id--50085__af_placement_id--1.html"},"images":{"image":[{"value":"http://image10.bizrate-images.com/resize?sq=60&uid=2584611575","xsize":60,"ysize":60},{"value":"http://image10.bizrate-images.com/resize?sq=100&uid=2584611575","xsize":100,"ysize":100},{"value":"http://image10.bizrate-images.com/resize?sq=160&uid=2584611575","xsize":160,"ysize":160},{"value":"http://image10.bizrate-images.com/resize?sq=400&uid=2584611575","xsize":400,"ysize":400}]},"relevancy":61515478597632.000000,"priceSet":{"minPrice":{"value":"$3.28","integral":328},"maxPrice":{"value":"$110.65","integral":11065},"stores":25},"id":2584611575,"categoryId":8515}],"includedResults":10,"totalResults":2000}}
+]
+
diff --git a/tests/benchmarks/corelib/json/tst_bench_qtbinaryjson.cpp b/tests/benchmarks/corelib/json/tst_bench_qtbinaryjson.cpp
index 8f3e2cc8c6..2253d00778 100644
--- a/tests/benchmarks/corelib/json/tst_bench_qtbinaryjson.cpp
+++ b/tests/benchmarks/corelib/json/tst_bench_qtbinaryjson.cpp
@@ -87,7 +87,9 @@ void BenchmarkQtBinaryJson::cleanup()
void BenchmarkQtBinaryJson::parseNumbers()
{
- QFile file(QLatin1String("numbers.json"));
+ QString testFile = QFINDTESTDATA("numbers.json");
+ QVERIFY2(!testFile.isEmpty(), "cannot find test file numbers.json!");
+ QFile file(testFile);
file.open(QFile::ReadOnly);
QByteArray testJson = file.readAll();
@@ -99,7 +101,9 @@ void BenchmarkQtBinaryJson::parseNumbers()
void BenchmarkQtBinaryJson::parseJson()
{
- QFile file(QLatin1String("../../../auto/corelib/json/test.json"));
+ QString testFile = QFINDTESTDATA("test.json");
+ QVERIFY2(!testFile.isEmpty(), "cannot find test file test.json!");
+ QFile file(testFile);
file.open(QFile::ReadOnly);
QByteArray testJson = file.readAll();
@@ -111,7 +115,9 @@ void BenchmarkQtBinaryJson::parseJson()
void BenchmarkQtBinaryJson::parseJsonToVariant()
{
- QFile file(QLatin1String("../../../auto/corelib/json/test.json"));
+ QString testFile = QFINDTESTDATA("test.json");
+ QVERIFY2(!testFile.isEmpty(), "cannot find test file test.json!");
+ QFile file(testFile);
file.open(QFile::ReadOnly);
QByteArray testJson = file.readAll();
diff --git a/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro b/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro
index 5555e5cd14..83d0708b60 100644
--- a/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro
+++ b/tests/benchmarks/corelib/kernel/qmetatype/qmetatype.pro
@@ -1,6 +1,6 @@
QT = core testlib
TEMPLATE = app
-TARGET = tst_qmetatype
+TARGET = tst_bench_qmetatype
SOURCES += tst_qmetatype.cpp
diff --git a/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro b/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro
index 00b63f9863..f54f8320d4 100644
--- a/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro
+++ b/tests/benchmarks/corelib/tools/qalgorithms/qalgorithms.pro
@@ -1,3 +1,3 @@
-TARGET = tst_qalgorithms
+TARGET = tst_bench_qalgorithms
QT = core testlib
SOURCES = tst_qalgorithms.cpp
diff --git a/tests/benchmarks/corelib/tools/qlist/qlist.pro b/tests/benchmarks/corelib/tools/qlist/qlist.pro
index bb69d7651d..c83bc455d2 100644
--- a/tests/benchmarks/corelib/tools/qlist/qlist.pro
+++ b/tests/benchmarks/corelib/tools/qlist/qlist.pro
@@ -1,4 +1,4 @@
-TARGET = tst_qlist
+TARGET = tst_bench_qlist
QT = core testlib
SOURCES += main.cpp
diff --git a/tests/benchmarks/corelib/tools/qstring/main.cpp b/tests/benchmarks/corelib/tools/qstring/main.cpp
index 9d5c43c290..9b10e97f2b 100644
--- a/tests/benchmarks/corelib/tools/qstring/main.cpp
+++ b/tests/benchmarks/corelib/tools/qstring/main.cpp
@@ -1408,7 +1408,9 @@ void tst_QString::ucstrncmp() const
void tst_QString::fromUtf8() const
{
- QFile file(SRCDIR "utf-8.txt");
+ QString testFile = QFINDTESTDATA("utf-8.txt");
+ QVERIFY2(!testFile.isEmpty(), "cannot find test file utf-8.txt!");
+ QFile file(testFile);
if (!file.open(QFile::ReadOnly)) {
qFatal("Cannot open input file");
return;
diff --git a/tests/benchmarks/corelib/tools/qstring/qstring.pro b/tests/benchmarks/corelib/tools/qstring/qstring.pro
index 72300de9da..cf2ee24c6d 100644
--- a/tests/benchmarks/corelib/tools/qstring/qstring.pro
+++ b/tests/benchmarks/corelib/tools/qstring/qstring.pro
@@ -3,11 +3,7 @@ QT -= gui
QT += core-private testlib
SOURCES += main.cpp data.cpp fromlatin1.cpp fromutf8.cpp
-wince*:{
- DEFINES += SRCDIR=\\\"\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
+TESTDATA = utf-8.txt
sse4:QMAKE_CXXFLAGS += -msse4
else:ssse3:QMAKE_FLAGS += -mssse3
diff --git a/tests/benchmarks/corelib/tools/qvector/qvector.pro b/tests/benchmarks/corelib/tools/qvector/qvector.pro
index 78a56adcd6..e24b16230a 100644
--- a/tests/benchmarks/corelib/tools/qvector/qvector.pro
+++ b/tests/benchmarks/corelib/tools/qvector/qvector.pro
@@ -1,4 +1,4 @@
-TARGET = tst_vector
+TARGET = tst_bench_vector
QT = core testlib
INCLUDEPATH += .
SOURCES += main.cpp outofline.cpp
diff --git a/tests/benchmarks/gui/itemviews/qheaderview/qheaderview.pro b/tests/benchmarks/gui/itemviews/qheaderview/qheaderview.pro
index 12cb5d5f03..7e8415e495 100644
--- a/tests/benchmarks/gui/itemviews/qheaderview/qheaderview.pro
+++ b/tests/benchmarks/gui/itemviews/qheaderview/qheaderview.pro
@@ -1,7 +1,7 @@
QT += widgets testlib
TEMPLATE = app
-TARGET = bench_qheaderview
+TARGET = tst_bench_qheaderview
SOURCES += qheaderviewbench.cpp
diff --git a/tests/benchmarks/gui/painting/qtbench/qtbench.pro b/tests/benchmarks/gui/painting/qtbench/qtbench.pro
index 06c77a93c0..ab3f040033 100644
--- a/tests/benchmarks/gui/painting/qtbench/qtbench.pro
+++ b/tests/benchmarks/gui/painting/qtbench/qtbench.pro
@@ -1,7 +1,7 @@
QT += widgets testlib
TEMPLATE = app
-TARGET = tst_qtbench
+TARGET = tst_bench_qtbench
SOURCES += tst_qtbench.cpp
diff --git a/tests/benchmarks/gui/text/qtext/main.cpp b/tests/benchmarks/gui/text/qtext/main.cpp
index d4acfce821..5a4745fbc7 100644
--- a/tests/benchmarks/gui/text/qtext/main.cpp
+++ b/tests/benchmarks/gui/text/qtext/main.cpp
@@ -129,7 +129,9 @@ void tst_QText::shaping_data()
QTest::newRow("lorem") << m_lorem;
QTest::newRow("short") << QString::fromLatin1("Lorem ipsum dolor sit amet");
- QFile file(QString::fromLatin1(SRCDIR) + QLatin1String("/bidi.txt"));
+ QString testFile = QFINDTESTDATA("bidi.txt");
+ QVERIFY2(!testFile.isEmpty(), "cannot find test file bidi.txt!");
+ QFile file(testFile);
QVERIFY(file.open(QFile::ReadOnly));
QByteArray data = file.readAll();
QVERIFY(data.count() > 1000);
diff --git a/tests/benchmarks/gui/text/qtext/qtext.pro b/tests/benchmarks/gui/text/qtext/qtext.pro
index ef91a97493..084cf858fd 100644
--- a/tests/benchmarks/gui/text/qtext/qtext.pro
+++ b/tests/benchmarks/gui/text/qtext/qtext.pro
@@ -6,4 +6,4 @@ TARGET = tst_bench_QText
SOURCES += main.cpp
-DEFINES += SRCDIR=\\\"$$PWD/\\\"
+TESTDATA = bidi.txt
diff --git a/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp b/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp
index a3644efd53..761fbcc7a7 100644
--- a/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp
+++ b/tests/benchmarks/plugins/imageformats/jpeg/jpeg.cpp
@@ -59,7 +59,9 @@ void tst_jpeg::jpegDecodingQtWebkitStyle()
{
// QtWebkit currently calls size() to get the image size for layouting purposes.
// Then when it is in the viewport (we assume that here) it actually gets decoded.
- QFile inputJpeg(SRCDIR "n900.jpeg");
+ QString testFile = QFINDTESTDATA("n900.jpeg");
+ QVERIFY2(!testFile.isEmpty(), "cannot find test file n900.jpeg!");
+ QFile inputJpeg(testFile);
QVERIFY(inputJpeg.exists());
inputJpeg.open(QIODevice::ReadOnly);
QByteArray imageData = inputJpeg.readAll();
diff --git a/tests/benchmarks/plugins/imageformats/jpeg/jpeg.pro b/tests/benchmarks/plugins/imageformats/jpeg/jpeg.pro
index d278e9e721..281e79f585 100644
--- a/tests/benchmarks/plugins/imageformats/jpeg/jpeg.pro
+++ b/tests/benchmarks/plugins/imageformats/jpeg/jpeg.pro
@@ -3,10 +3,6 @@ TARGET = jpeg
QT += testlib
CONFIG += release
-wince*: {
- DEFINES += SRCDIR=\\\"\\\"
-} else {
- DEFINES += SRCDIR=\\\"$$PWD/\\\"
-}
-
SOURCES += jpeg.cpp
+
+TESTDATA = n900.jpeg
diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp
index 92fdd35f3c..5a6a04aee0 100644
--- a/tools/configure/configureapp.cpp
+++ b/tools/configure/configureapp.cpp
@@ -264,6 +264,8 @@ Configure::Configure(int& argc, char** argv)
dictionary[ "PCRE" ] = "auto";
+ dictionary[ "ICU" ] = "auto";
+
dictionary[ "GIF" ] = "auto";
dictionary[ "JPEG" ] = "auto";
dictionary[ "PNG" ] = "auto";
@@ -504,6 +506,12 @@ void Configure::parseCmdLine()
dictionary[ "PCRE" ] = "system";
}
+ else if (configCmdLine.at(i) == "-icu") {
+ dictionary[ "ICU" ] = "yes";
+ } else if (configCmdLine.at(i) == "-no-icu") {
+ dictionary[ "ICU" ] = "no";
+ }
+
// Image formats --------------------------------------------
else if (configCmdLine.at(i) == "-no-gif")
dictionary[ "GIF" ] = "no";
@@ -1468,7 +1476,7 @@ bool Configure::displayHelp()
"[-no-multimedia] [-multimedia] [-no-audio-backend] [-audio-backend]\n"
"[-no-script] [-script] [-no-scripttools] [-scripttools]\n"
"[-no-webkit] [-webkit] [-webkit-debug]\n"
- "[-no-directwrite] [-directwrite] [-qpa] [-no-widgets] \n\n", 0, 7);
+ "[-no-directwrite] [-directwrite] [-qpa] [-no-widgets] [-icu]\n\n", 0, 7);
desc("Installation options:\n\n");
@@ -1565,6 +1573,9 @@ bool Configure::displayHelp()
desc("PCRE", "qt", "-qt-pcre", "Use the PCRE library bundled with Qt.");
desc("PCRE", "qt", "-system-pcre", "Use the PCRE library from the operating system.\nSee http://pcre.org/\n");
+ desc("ICU", "yes", "-icu", "Use the ICU library.");
+ desc("ICU", "no", "-no-icu", "Do not use the ICU library.\nSee http://site.icu-project.org/\n");
+
desc("GIF", "no", "-no-gif", "Do not compile GIF reading support.");
desc("LIBPNG", "no", "-no-libpng", "Do not compile PNG support.");
@@ -1811,6 +1822,9 @@ bool Configure::checkAvailability(const QString &part)
else if (part == "PCRE")
available = findFile("pcre.h");
+ else if (part == "ICU")
+ available = findFile("unicode/utypes.h") && findFile("unicode/ucol.h") && findFile("unicode/ustring.h") && findFile("icuin.lib");
+
else if (part == "LIBJPEG")
available = findFile("jpeglib.h");
else if (part == "LIBPNG")
@@ -1924,6 +1938,10 @@ void Configure::autoDetection()
if (dictionary["PCRE"] == "auto")
dictionary["PCRE"] = checkAvailability("PCRE") ? defaultTo("PCRE") : "qt";
+ // ICU detection
+ if (dictionary["ICU"] == "auto")
+ dictionary["ICU"] = checkAvailability("ICU") ? "yes" : "no";
+
// Image format detection
if (dictionary["GIF"] == "auto")
dictionary["GIF"] = defaultTo("GIF");
@@ -2118,6 +2136,10 @@ void Configure::generateOutputVars()
if (dictionary[ "PCRE" ] == "qt")
qmakeConfig += "pcre";
+ // ICU ---------------------------------------------------------
+ if (dictionary[ "ICU" ] == "yes")
+ qtConfig += "icu";
+
// Image formates -----------------------------------------------
if (dictionary[ "GIF" ] == "no")
qtConfig += "no-gif";
@@ -3060,6 +3082,8 @@ void Configure::displayConfig()
cout << " JPEG support............" << dictionary[ "JPEG" ] << endl;
cout << " PNG support............." << dictionary[ "PNG" ] << endl;
cout << " FreeType support........" << dictionary[ "FREETYPE" ] << endl << endl;
+ cout << " PCRE support............" << dictionary[ "PCRE" ] << endl;
+ cout << " ICU support............." << dictionary[ "ICU" ] << endl;
cout << "Styles:" << endl;
cout << " Windows................." << dictionary[ "STYLE_WINDOWS" ] << endl;