Add Q_DECL_NOTHROW to some qHash functions

The hashing functions for QDateTime and QHostAddress did not get the
noexcept keyword because they might allocate memory. QDateTime doesn't
do it now, but it could in the future. QHostAddress does allocate
memory today.

Change-Id: Ia5f80942944bfc2b8c405306c467bfd88ef0e48c
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
tst_qurlinternal: use qurl_p.h instead of declaring the functions

Just in case someone (like me) changes the function signatures or adds
new functions.

Change-Id: I1025fea012d95ffe89acaf799aa58fd2b0babc80
Reviewed-by: David Faure <faure@kde.org>
Fix decoding of QByteArray in the deprecated "encoded" setters in QUrl

The asymmetry is intentional: the getters can use toLatin1() because the
called functions, with a QUrl::FullyEncoded parameter, return ASCII
only. This gives a small performance improvement over the need to run
the UTF-8 encoder.

However, the data passed to setters could contain non-ASCII binary data,
in addition to the percent-encoded data. We can't use fromUtf8 because
it's binary and we can't use toPercentEncoded because it already encoded.

Change-Id: I5ecdb49be5af51ac86fd9764eb3a6aa96385f512
Reviewed-by: David Faure <faure@kde.org>
Cocoa: use filterNativeEvent instead of the deprecated filterEvent

Change-Id: I76259d1a0d978fb2f7fb60cd0d05990365691b7e
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
fix some QTest documentation

* Use \b instead of \bold
* widnow -> window typo
* QTest::touchEvent's second parameter is QTouchDevice *, not
  QTouchEvent::DeviceType, and autoCommit defaults to true
* QSignalSpy::wait() isn't const

Change-Id: I75a91c1cd98b1c582cd654b2b72ad61e5c0e31d2
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Document QTranslator::translate SIC (91d2ee5e09a6b4)

Detected by a unittest failure in KDE, due to the KDETranslator subclass
not being called anymore.

Change-Id: I0171117a677e2d58aba2f76bc27f7f1f7a521cc1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
QTouchDevice documentation

Change-Id: I33c39522c92ef1abd5572b757122f6467702b1e6
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
Fixed qdoc complaints for qsurface and qsurfaceformat.

Also QTBUG-25231

Change-Id: I54e1f2d4ca9a52590b28e4d5ea04a8ae4a48d318
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
QWindow documentation fixes; make pos, size and geometry properties

Change-Id: I745bbe5d0baa68fc7ee49d6fe76d3678f3212b3d
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
Remove warning about non existing paint device engine

The QWindowsVistaStyle::drawPrimitive() method was trying to draw the
pixmap for an item in an item view even if the section width was zero
or less then zero. This resulted "QPainter::begin: Paint device
returned engine == 0, type: 2" error.
It's now checked that the width and the height of the section is
greater than zero before creating the painter.

Task-number: QTBUG-26047
Change-Id: I36dd2792fd505be773951e5ac36b0e3362ec2292
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Remove reference to 'How to Learn Qt' from qtwidgets module.

Change-Id: Ib6bce643332d34450e64e191ca7beeec3bf12c9c
Reviewed-by: Gabriel de Dietrich <gabriel.dietrich-de@nokia.com>
Add AVX support for the JPEG handler

Apparently I had forgotten about this previously. Use the AVX conversion
function if the compiler could generate AVX code.

Note: the functions need to be declared outside of the function block
so namespace scoping works properly with MSVC. For functions declared
inside, it expects them to be in the global namespace.

Change-Id: I7b7248dbfce3cc7c580dee920407c205049cb746
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
doc: Added \relates command to some function qdoc comments

When a documented function is global, it must be related
to a namespace or class, or its documentation won't be
included anywhere.

When a documented function is a class member, the function
signature in the \fn command must include the class name
qualifier, e.g. QImage::isValid(), not just isValid()

Change-Id: I53e2230fa9468f94d51aec8cc76781d7ab755a13
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
cross compile with mingw

  - improve defaults
  - fix linker errors

Change-Id: I7e1deb55fb616a3890510806593a0ab9a0a31d9a
Reviewed-by: Yuchen Deng <loaden@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
make it possible to pass configure zlib lib name

Change-Id: I82fde11436261dab51393b35dfbf2a753df58ec9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Serialise QDateTime as UTC and timeSpec() instead of private spec.

QDateTime currently serialises its private Spec enum. If a user was to
deserialise the individual components of a QDateTime separately, the
resulting timeSpec may be invalid when cast to the Qt::TimeSpec enum.

E.g.:

QDateTime dateTime(QDate(2012, 8, 14), QTime(8, 0, 0), Qt::UTC);
// ... serialise
// ... deserialise date, time, spec separately.
// spec == 2, the value of QDateTimePrivate::UTC.
// spec != UTC, will be set to LocalUnknown.
QDateTime deserialised(date, time, spec);

This patch serialises QDateTime objects in UTC and the value of
timeSpec() as opposed to QDateTimePrivate's spec. This changes the
serialisation behaviour of QDateTime for version 13 of QDataStream.

Task-number: QTBUG-4057
Change-Id: If650e7960dca7b6ab44b8233410a6369c41df73a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Disregard milliseconds in QTime::secsTo().

"The documentation states that "secsTo() does not take into account any
milliseconds", however, this is not the case. Given times 12:30:01.500
and 12:30:02.400 secsTo returns 0. If milliseconds are not taken into
account, I would expect this to return 1 (i.e. interprets the times as
12:30:01 and 12:30:02 thus truncating the milliseconds)."

Note that tests were also written for QDateTime::secsTo(), as it uses
QTime::secsTo internally. This addresses Javier's issue in the
comments of QTBUG-9304.

Task-number: QTBUG-9304
Change-Id: I9efe0c8f710db859c1d086d67ba3e5b349a56c4e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reuse the same QAbstractTableModel implementation for 4 snippets

They were really the same anyway.  This makes the source distro a bit
more compact and eliminates some qdoc errors of the form
../doc/snippets/reading-selections/model.cpp:51: Overrides a previous doc
../doc/snippets/itemselection/model.cpp:51: (The previous doc is here)

Change-Id: I7956f457422e9078c32de65cd421685f589c8a6c
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@nokia.com>
doc: Fixed qdoc errors

These classes will not be public until Qt 5.1.
This change marks a few things internal, so they
don't cause qdoc errors in Qt 5.0. It also adds
a few qdoc comments for future use in Qt 5.1.

Change-Id: If90692b97653223d8a986f2ae1fff49c20cd444b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Whitespace fixes

Change-Id: Ibfb48076ad62804344db6e9e97ac90fdcf82dc04
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>