Commit Graph

10374 Commits

Author SHA1 Message Date
Mitch Curtis
13846e8013 Revert removal of commented out tests in tst_qdatetime.cpp.
Two lines were commented out but were removed with
Ib6ceb1cb7fb4c6eca672495f96d9cfd907853c85. They have been replaced
as expected fails.

Task-number: QTBUG-22833
Change-Id: Ib154a31bffcdc8e43c6ad236df193e99334652c6
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2012-10-22 03:21:33 +02:00
Marc Mutz
a438267c84 normalise signal/slot signatures [QtCore tests]
Normalise all signal/slot signatures in tests/*/corelib,
except in tst_QObject, where they might be test data.

Change-Id: Id4e101f285b1676bb583b0afae06d235e599e24b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-10-22 03:21:01 +02:00
Thiago Macieira
8e82a8e11f Doc: refer to QUrlQuery in QUrl's main doc body
As opposed to the deprecated methods.

Task-number: QTBUG-25628
Change-Id: Ic1b50b1ac1b974cdd2dd9f0151d567227784e547
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-19 20:28:08 +02:00
Sze Howe Koh
d7e8b57d0a Remove the QThread::terminated() signal
The signal is removed from the API; all references to it are removed
from documentation; the unit test that checks for its emission is
modified to listen for QThread::finished() instead.

The QThreadPrivate::terminated flag is also removed, as it served no
purpose other than to trigger the emission of QThread::terminated()

As discussed at http://lists.qt-project.org/pipermail/development/2012-October/007216.html
the signal is not guaranteed to be emitted after every termination,
rendering it useless.

Change-Id: I7b0c45d7889da0d33875545331606f2208ee56fc
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-10-19 20:25:16 +02:00
Samuel Rødal
39eaff6773 Remove DRI2/OpenGL code paths from xcb plugin.
These were used to test QtWayland, but there are other options available
for that now. The DRI2 code hasn't been maintained and doesn't even
compile at the moment, so let's just remove it to de-clutter the source.

Change-Id: I7db0f4db82348497b9f4d6c2dcf2e13f3ab14a76
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-19 20:24:11 +02:00
Samuel Rødal
9b2e4cd5a8 Small xcb startup performance optimization.
Prefetch all the extensions, to avoid having to do blocking calls later.

Change-Id: I1527dbf03d76372ec88bc0d5d9f7af18a4cc2a26
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2012-10-19 20:24:03 +02:00
Samuel Rødal
cdc2161b6f Made xcb plugin work when the GLX extension is not present.
Change-Id: I9285d7524586ff404206c088019ece33335137d9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-19 18:11:06 +02:00
Samuel Rødal
7d7f09650c Fixed GCC 3.4 build with sse2 enabled.
With minimal effort we can keep the GCC 3.4 build working.

Task-number: QTBUG-19803
Change-Id: I31611a27b97d5ac426ea857d8f1b656dc6f5377a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-19 18:10:46 +02:00
Konstantin Ritt
9690548113 QFont: Don't invalidate engine unless request has been changed
This makes QFont do a "light" detach when the font attributes data has been changed.
The new test clearly shows that the engine is now shared between
two font instances after changing the kerning attribute.

Change-Id: I59db822f459f02d111686dba7101b98e361fada9
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-19 18:04:36 +02:00
Andreas Hartmetz
bdc115d969 detach() safely in QVector::erase(), and update callers to not detach.
remove() can use non-detaching iterators internally before calling
erase(), which hasn't been exploited so far, so that the detach() in
erase() never actually detached. When using erase() from outside,
you can't do it legally without calling begin() or end() that detach()
before erase() is called.
Now remove() doesn't detach anymore, and detaching in erase() works.
With new tests that fail after changing only the erase() callers
and pass again after fixing erase().

Change-Id: I47c0a9e362dce8628ec566f5437d951755de96c8
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2012-10-19 18:04:11 +02:00
Gabriel de Dietrich
c4ff5c53ef Mac: Adapt scrollbar fadeout animation for QStyleAnimation
Change-Id: I39f1089e8d6ba1bb412d33aa4ebc0971aba52681
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-19 17:53:26 +02:00
Gatis Paeglis
4c41cb48d0 Modularize drag and drop documentation
- Move dnd docs and examples out of QtDoc module to gui library in QtBase
- Remove info related to Motif dnd since Qt5 doesn't implement it

Change-Id: Id7eb4eb422f4294a36dd92709ce3007903371f03
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2012-10-19 17:35:51 +02:00
J-P Nurmi
59009cfd0c QStyleSheetStyle: kill more dependencies to QWidget
Change-Id: I5e58ec68c5d20fd7b201c83743f9d284e7c4dc52
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-19 15:19:03 +02:00
Thomas McGuire
391d2e37f3 QNX: Use extra information in dirent to avoid stat() calls
This improves iterating over /usr/bin with QDirIterator by more
than half, from 36 to 13 milliseconds.

Change-Id: Ib3a9271c3a6f81c1ea3c21d012c875c7e9bad2ad
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-10-19 13:02:31 +02:00
Jerome Pasion
b206fba8b1 Doc: Adding Event System documentation.
Previously in qtdoc repository.

Change-Id: I9f5cc876f2b49e86520097c0d8efe7e21eabc04e
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-10-19 13:02:17 +02:00
Marc Mutz
848c88c7a2 normalise signal/slot signatures [QtSql tests]
Change-Id: I06573bc2ad58378dd835565cd07d711bfc760411
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
2012-10-19 13:02:17 +02:00
Stephen Kelly
6444d36e5d Use a qmake variable to pass the Qt version to the cmake version file.
By depending on a simple variable instead of a more complex expression, we
can more easily use this file from other contexts.

Change-Id: Ib6ce1e2537f3e7ac19d25ad33454f25e85f71040
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-19 13:02:17 +02:00
Oswald Buddenhagen
1e68ec7e67 remove explicit load(qt_build_config)s from the libraries
.qmake.conf (and previously .qmake.cache) already does that for us.

Change-Id: I06cc01fa45921d7bd66dda7a0f88729faeff37bd
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-10-19 13:02:17 +02:00
Peter Hartmann
1da978416d configure: state compiler explicitly when testing for supported flags
... so we can test those functions with host and cross compilers.

Change-Id: Ifebfdac54580633c797f77b139514cf9d66edd8c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-19 13:02:17 +02:00
Debao Zhang
b340e40f91 qmake ExtraCompilerTargets: deal with file name which contains space
Task-number: QTBUG-27629
Change-Id: I6d6c3345cc1bb0a866524df3a1534ed50fc00f3e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-19 13:02:17 +02:00
Miikka Heikkinen
bdc0eaae6b Fix excess enter/leave event generation for native widgets
Native widgets have a native window each, so QPA plugin sends enter and
leave events for associated QWindow whenever mouse cursor moves from
one widget to another. QWidgetWindow had no context to interpret these
events as moves from one widget to another, since they were sent
separately. This resulted in leaves and enters for each widget in
parent chain, when only the bottom child should have gotten them.

Fixed by peeking into window system message queue when handling leave
in QWidgetWindow and retrieving the entered window from queued enter
event.

Also provided a convenience function that QPA plugin can use to
ensure both leave and enter events are in the event queue when
moving from one QWindow to another.

Task-number: QTBUG-27550
Change-Id: I74fec0ac90f6848495c2392c5f7e41624ad8aea2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-19 13:02:17 +02:00
Caroline Chao
f948294f5e Test: remove QSKIP from tst_QStringList::initializeList()
Instead omit the whole test when Q_COMPILER_INITIALIZER_LISTS
is not defined.

Change-Id: I34017484a027b95a2677e1c4cb9231fa2aeb5680
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-10-19 09:41:36 +02:00
Caroline Chao
33aea0cc1c Test: remove QSKIP in tst_QLocale::emptyCtor
Instead omit the whole test when appropriate.

Change-Id: Iebd569676cc7b2f8fe4a1d272107e092410d397b
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-10-19 09:41:36 +02:00
Konstantin Ritt
dbb2581af5 Remove Qt3 compat leftovers
Change-Id: I91c3d26125168998d6279bddb0671cfb68eac2f4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-19 09:41:36 +02:00
J-P Nurmi
734324c37c QStyleSheetStyle: QObject-based style & render rules
The goal is to cut as many QWidget dependencies as possible and make
stylesheets eventually work for the desktop components.

Change-Id: Ib4aa47af07379fc39fd6df1961e113d03df6df35
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-10-19 07:50:29 +02:00
Thiago Macieira
320c4e31e1 Make QContiguousCache with zero capacity not crash
These containers don't make sense and will just result in no action
being taken (all items added will simply be discarded), but it
shouldn't crash due to a division by zero.

Update the documentation to explain the fact.

Task-number: QTBUG-27339
Change-Id: Ib9acf5c0a9a826e6853e7beaf5e56511fde98dc6
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Ian Walters <ian@walters.id.au>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-19 07:50:29 +02:00
Bernd Weimer
c4b2d77f40 Fix for slowness of touch move events
In the event dispatcher native events will be processed in a tight loop
to drain the queue. IO events and timers will be postponed.

Change-Id: Ic2c06ed182027289eb5e7042fbae99efbd01ea27
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2012-10-19 07:50:29 +02:00
Michele Caini
efe607e8aa Review of documentation.
Documentation has been updated to reflect changes in Qt5.

Change-Id: I378858cf61f4bf62375c30c3903818d754dadcf0
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2012-10-19 07:50:29 +02:00
Thiago Macieira
b8fe5e1bbc Make sure functions returning iterators have an iterator as parameter
The IA-64 C++ ABI does not encode the return type for non-template
functions (QVector is the template, not the function), which means that
these two functions have the same signature:

  Node *QVector<Node>::begin()
  typename class QTypedArrayData<Node>::iterator QVector<Node>::begin()
  [both are _ZN7QVectorI4NodeE5beginEv]

When linking compilation units compiled with different
QT_STRICT_ITERATORS settings, only one of the two out-of-line copies
will survive. Depending on the ABI, we may have a problem: the ABI can
say that a function returning a structure takes an implicit first
parameter, which a function returning a regular pointer doesn't.

Task-number: QTBUG-27277
Change-Id: I57a59e5a7c46f55faabfe85c073dca89d2a7bbf3
Reviewed-by: Jan Kundrát <jkt@flaska.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-19 05:35:39 +02:00
Caroline Chao
f7f9a28a26 Test: remove QSKIP from tst_QDateTime::fromString_LOCALE_ILDATE
Instead omit the whole test when Q_OS_WIN is not defined.

Change-Id: I311538ce839353d4d5e83edfd12c68968fe61215
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-19 02:44:52 +02:00
Frederik Gladhorn
9fa2e5a14d Accessibility: itemviews check for valid model.
The problem is that isValid() should return true as
soon as we have a view widget.
That sadly means we need to verify that the model is still
valid whenever accessing it.

Change-Id: I9237528abf2f5c75a73382525103307e9ca15f05
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-10-19 02:44:40 +02:00
Stephen Kelly
89c53738de CMake: Remove content from else() and endif() commands.
Having them empty is the common style and is less noisy.

Change-Id: I30c0c4d297a7bdb373a57a636f4fdbc488a69fcd
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
2012-10-19 02:44:26 +02:00
Jason Barron
a61788d139 Change the default major version of QGLFormat to 2.
This is being changed because:
- The OpenGL paint engine in Qt only supports GL2
- QML2 only supports GL2
- QSurfaceFormat has a default value of 2

Applications that want to use GL1 on a QGLWidget will have to
explicitly request this format using QGLFormat::setVersion.

Task-number: QTBUG-27589

Change-Id: Ieb283ef7d6e15a29ec28ce7e4363dbf477decaa7
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-10-19 02:43:05 +02:00
Joerg Bornemann
c54a2dca16 tst_qlocalsocket: get rid of QtScript dependency
Removing the lackey executable that needs QtScript to be built.
This was a qscript bastard that was able to run a client and a server
script. It's replaced by a C++ version with the same functionality.

Nice side effect: the two second wait per test row could be removed.
The client executable is now waiting for the server to be created.

Task-number: QTBUG-24142

Change-Id: I135b75abf6620d3b0af50dc226ea8c81c2bf4149
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-10-19 02:43:05 +02:00
Thiago Macieira
0510fc149e Make QtDBus work again with D-Bus 1.0 and 1.1
The dbus_get_version function was introduced in 1.2, so we'd need to
detect pre-1.2 by the absence of the function. But if we're going to
detect the presence or absence of any function, we might as well do it
on dbus_connection_can_send_type, which is the function we wanted anyway.

Change-Id: I6e17a3a8f1382c6a489490084f6e3f61aa5a1947
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-10-19 02:43:05 +02:00
Sergio Ahumada
221bd941ff test: Moving tst_QProcess::echoTest_performance()
tst_QProcess::echoTest_performance() is not an unit test but a
performance test, so moving it from 'tests/auto/corelib/io/qprocess'
to 'tests/benchmarks/corelib/io/qprocess'

Change-Id: I796788534eafc5ca3b8d86c0ec46998285fd4b8f
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-10-19 02:43:05 +02:00
Samuel Rødal
7b8e10ddd0 Fixed inconsistent QPainter fill rules for aliased painting.
Qt 5 is the time to get rid of all the old inconsistencies in the raster
paint engine caused by trying to preserve the old X11 based
coordinate system where (0, 0) is in the center of the top-left pixel
instead of the upper left corner of said pixel. However, this was only
adhered for line drawing and path / rect filling, and not for image or
pixmap drawing and not at all when doing antialiased painting. By
defining the antialiased coordinate system as being the right one and
letting the aliased fill rules follow from that we finally end up with
some consistent behavior that doesn't lead to surprises and workarounds
in application code.

It is still possible for applications to get the old behavior by
setting the QPainter::Qt4CompatiblePainting render hint. This should
make porting easier for the few cases where an application relies on the
aliased fill rules we used to have in Qt 4.

Task-number: QTBUG-27500
Change-Id: If86b95e77d838ec83033d64af86632b9a73c74a9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2012-10-19 02:43:05 +02:00
Stephen Kelly
ae3ad0ad21 Handle the case where persistent indexes have gone invalid.
Don't add invalid ranges to the result. They will be removed
whenever d->ranges is processed for public consumption
anyway. For example, QItemSelectionModel::selection() calls
merge() with another selection. The merge() method removes
invalid ranges already. But the invalid ranges don't need
to be there in the first place, so this patch removes them.

A longer-term goal is to maintain d->ranges as an always-sorted list.

This method can be called with a vector containing invalid
QPersistentModelIndexes when those persistent indexes are made invalid
in between layoutAboutToBeChanged and layoutChanged. It's a normal
thing to happen and a case that should be handled deliberately.

Change-Id: I741ed9208d8a75644975c9e8d61f0d6d78e20576
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-10-19 00:44:54 +02:00
Stephen Kelly
d84f449bcd Make sure uints remain uints when editing in itemviews.
Task-number: QTBUG-22974
Change-Id: I07428862c4dffc629f868f3010f663eb655922d0
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-10-19 00:44:54 +02:00
José Millán Soto
8bed283f13 Correct accessibility index handling in QListView
QListView::currentChanged and QListView::selectionChanged changed to
use 0-based indexes instead of 1-based indexes.

Change-Id: Ie618970c9a37ec76156dbfab2e86685c3c8f374c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2012-10-19 00:44:54 +02:00
José Millán Soto
687e31df80 Handle separators in menus in AT-SPI (Linux accessibility)
Change-Id: Id9c109d53bbb8ded04bbe98a622d44e13d572340
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2012-10-19 00:44:54 +02:00
Marc Mutz
a4ffbfefe7 normalise signal/slot signatures [QtNetwork tests]
Change-Id: I2491cfe421a811d00759224da03580b3dcc2a091
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2012-10-19 00:44:54 +02:00
Marc Mutz
b5b165ffb3 normalise signal/slot signatures [QtDBus tests]
Change-Id: I4a0441d37e455dce28072ee3650b2062bec65759
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-10-19 00:44:54 +02:00
Marc Mutz
bb73c085a6 normalise signal/slot signatures [QtWidgets tests]
Change-Id: Iffab60f0911a55e4be09faeb29df0bae1ea2eb19
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-19 00:44:54 +02:00
Frederik Gladhorn
0783b1670d Doc fix in return value of QDate::setYMD
Change-Id: Ie107e451a7b2a084fb6131939f212acd412a9df6
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-10-19 00:44:54 +02:00
Frederik Gladhorn
519dce78f1 Clean up instantiation of mapping of AT-SPI roles.
Change-Id: If31b33f1b259f896408a66b0574d640b0ad57019
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-10-19 00:44:54 +02:00
Frederik Gladhorn
730a5a994f Accessibility: make sure right objects are cached on linux
The linux test would actually fail because the qobjects created
could end up having the same address (create-delete-create...).
After an object is deleted, it's not instantly removed from the
cache of valid objects.
Instead it would stay in the list with it's smart pointer becoming zero.

This patch adds the missing null pointer check so we are always up to date.

Change-Id: Ia7be14741d4798c2b8e75cb7127298c73cf206ef
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-10-19 00:44:54 +02:00
Teemu Katajisto
3ebee851b2 Cocoa: fix memory leak
Release the created CGImageRef.

Change-Id: If3b36b636ae1302b8a63bbae7285a6461b993f62
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-10-19 00:44:54 +02:00
Teemu Katajisto
0a7e6c5856 Cocoa: fix coretext memory leaks
Change-Id: Id85dbf8a2ea8994d9fca07d3f10b43f62ec305a0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-10-19 00:44:54 +02:00
Thiago Macieira
c67a5df8d8 Rename the syncqt -qtdir to -mkspecsdir
It's actually looking for the mkspecs (so it can read qconfig.pri to
get the Qt version), so give it exactly what it wants.

Change-Id: I2957b2d93a8837b8492d313209d45ff3ec01704c
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-19 00:44:54 +02:00