Commit Graph

10146 Commits

Author SHA1 Message Date
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
Kevin Krammer
4d693b6cdf QNX: Change base font sizes from pixels to points
Previously recommended fonts sizes in pixels do not work very well
on the new high resolution devices.

Current UX documentation recommends certain point sizes for certain
roles. Those work well on both type of devices.

Change-Id: Ia4faa4cf2d753cab9b10f91d01dfef1450683272
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-10-18 22:24:16 +02:00
Richard Moe Gustavsen
0221d769c7 Cocoa: fix frameStrutMouseEvents
It turns out that the calculation of mouse pos over the frame
strut (title bar) was wrong. When outside the content view, the
nsevent coordinates are negative, so to get this correct, we
need to calculate the height of the window above the content view
and use this information to get the mouse pos in positive
coordinates with origin window top left.

This bug was especially apperent with QDockWidget, as it became
almost impossible to dock a window under such circumstances.

Change-Id: I2faf6aab5e2aa0b4e217ea087ceec8c1b1e978bb
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-10-18 21:50:27 +02:00
Jens Bache-Wiig
f45afd7155 Introduce new style Fusion
This is a new non-native style for Qt.
It is intended as a replacement for the now aging
Plastique and Cleanlooks styles.

Change-Id: I30c0518a69e4e3b8b2b05ee7d84c3a5a1f307578
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-18 21:46:21 +02:00
Tero Ahola
8b6de46771 Modified vertical alignments of simple widgets on OSX
Adding QCheckBox, QComboBox, QLineEdit etc. into an HBox layout or grid
layout makes the layout look like a snake's trail. Fixed the positioning
of these widgets to make the layouts visually more appealing.

Updated qmacstyle auto-test accordingly.

Task-number: QTBUG-13635
Ammended-by: Gabriel de Dietrich
Change-Id: I89461f9aad68ea8488070ed06257b9b8e7f493c5
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2012-10-18 21:45:46 +02:00
Tor Arne Vestbø
e6cbf2f985 Prevent 'make install' from automatically installing documentation
Just like 'make docs' is used to build documentation, you will now have
to run 'make install_docs' to install it.

Change-Id: I57db53160ca91618784f4e39da0a47322c070208
Task-number: QTBUG-27590
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-18 21:01:26 +02:00
Tor Arne Vestbø
b9facbf345 Refactor recursive target logic out of default_post into function
The qmake function prepareRecursiveTarget can now be used both by the
existing logic in default_post, as well as future recursive targets that
will be needed as part of the modularization of documentation builds.

Change-Id: Ibc72c3e224cb57c9f1796de3b04fda9de663dbb4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-18 21:01:09 +02:00
Andy Shaw
d060620e6c Use the right properties when checking the frame's margins
Changed it to check the Frame*Margin property instead of the
Block*Margin property as this was incorrect for a QTextFrameFormat.

Task-number: QTBUG-22173
Change-Id: I2c3066165fb592ed034874b1180593822859f933
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-10-18 20:56:05 +02:00
Oswald Buddenhagen
6226fcdc3e add a .qmake.conf file which load()s qt_build_config
that way we don't have to auto-generate code for that in the configures.

note that we now load qt_build_config.prf instead of just qmodule.pri,
which means that exceptions_off is set everywhere. we forcibly re-enable
them for testcases to minimize the deviation from default 3rd party usage.
testlib selftests are not qt testcases, so the one that needs exceptions
needs to enable them explicitly.

Change-Id: I1b9360bb11f2e80c92a2b63a7c45991ad17fda1b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-18 17:42:40 +02:00
Jens Bache-Wiig
a2e4b7a92f Remove dependency on QWindowsStyle in QGtkStyle
Now that we no longer re-use the animation code in gtk,
it is time to remove this strange dependency.

Change-Id: Ib672a9b110dfba08d79b8654e572994007675957
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-18 17:22:49 +02:00
Gabriel de Dietrich
92e4ec7a14 Bring back Mac dependent code in QBoxLayout, QGridLayout
We also made an accessibility auto-test more stable, so that it would
not be influenced by this patch.

Task-number: QTCREATORBUG-7966
Change-Id: I6ce4e2361c8847aee5dd1cf5664c29cd2d83e38d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2012-10-18 15:19:48 +02:00
Giuseppe D'Angelo
e75be9f30e Add new error strings to QRegularExpression
They are introduced in PCRE 8.31.

Change-Id: Id0447b381d5e23996d4e87ae0368b07a8bc1c318
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-10-18 15:17:22 +02:00
Friedemann Kleint
23c19acc59 Windows QPA plugin: Parse arguments from list passed to factory.
Using dynamic properties on the native interface is deprecated.

Change-Id: Ia3411780dad15af61d4805c0d9fabf00dba92301
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-10-18 15:13:11 +02:00
Caroline Chao
5c57d1eacb Test: remove QSKIP in tst_qarraydata
Instead omit the whole tests when appropriate.

Change-Id: Id4ec171528d4b4d6849b2478ac4f4a2332789b55
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-18 14:55:23 +02:00
Caroline Chao
8506850cc8 Test: remove QSKIP from tst_QTextStream::stillOpenWhenAtEnd
Instead omit the whole test when Q_OS_WINCE is defined.

Change-Id: Ifd09048687db95913f39a64cffb42a743af8fa81
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-18 12:24:55 +02:00
Jan Arve Saether
8660a3bce1 Make sure we copy *all known events* properly in order to not assert.
This caused the following assertion in tst_QAccessibility::listTest():
ASSERT: "m_type != QAccessible::TableModelChanged" in file
qaccessible.h, line 455

Change-Id: If1f1e80521f346019bdbd59aac58e30c870d6e4e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2012-10-18 12:24:13 +02:00
Rohan McGovern
bfbeaffda8 Fix compile with -no-widgets
Remove more unnecessary references to QtWidgets in accessibility
implementation.

Disable accessibility tests (which rely on QtWidgets) when QtWidgets is
not available.

Change-Id: I57315537779d31af1245d42d1b4c49174016da54
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2012-10-18 12:24:11 +02:00
Caroline Chao
0b23cd186c Test: remove QSKIP in tst_QDataStream::stream_QIcon
Instead omit the whole test when Q_OS_WINCE is defined.

Change-Id: Ic69accb138121d2b39f068cef181da13b18e46ee
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-18 12:23:44 +02:00
Caroline Chao
6dfeee624a Test: remove QSKIP in tst_file
Instead omit the whole tests when appropriate.

Change-Id: I5eae127a497e290c5e4ba1a81a8f325c300471c1
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-18 12:23:23 +02:00
Caroline Chao
1fef528d33 Test: remove QSKIP in tst_QDir::dotAndDotDot
Instead omit the omit the whole test when Q_OS_WINCE is defined.

Change-Id: I8c0f12c63bbc4567edb3a8626ab060d5ce38f3cd
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-18 12:22:51 +02:00
Marc Mutz
a23be1b3e1 normalise signal/slot signatures [QtOpenGL tests]
Change-Id: Ie8a56873013ad2408d792e371a7d3e2ecf1f9c2c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-10-18 12:22:31 +02:00
Christian Strømme
6039179373 Fix for memory leak in ResultStore
In ResultStoreBase::addResults() it possible that the ResultItem we
create is invalid (filter-mode enabled). Since an invalid ResultItem
won't have any result data, we need to make sure that we don't allocate
any data for it.

Task-number: QTBUG-27224
Change-Id: Ic99b191db0e9dd4e29b64911f87d90a8148bb7a5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-10-18 00:58:11 +02:00
Gabriel de Dietrich
8003fd6d5b Mac: Fix QLineEdit shadow
The cursor is still rendered 1px too low, but probably needs to be
fixed in QTextLayout.

Change-Id: Ie56c7140898b941c8d896f503ce1934d0d681a4d
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-10-18 00:14:59 +02:00
Jens Bache-Wiig
9410b307af Improve branch indicators in common style
The branch indicators in common style was painted based on motif
style, effectively making it useless.

Since most styles inherit from Windows style, I
moved that into common style. It was already duplicating
most of the code used in commonstyle.

Change-Id: I1a383d90254bb97aebc038fa058ec0f225cf9dab
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2012-10-18 00:14:48 +02:00
Jonathan Liu
12d25f1a42 Fix compilation with MinGW-w64
Change-Id: I0c9e6adc54ccce34e0f81af048f2a51a4ac051b4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-10-17 21:21:09 +02:00
Friedemann Kleint
4b7dd71aa0 Windows: Multisampling is disabled by default.
The previous code assumed that -1 indicated some sort of "auto",
but this is not the case according to documentation.

Task-number: QTBUG-27600
Change-Id: Id17ce32f94ded61a63a33d0c04ec5312f53c7923
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-10-17 21:21:03 +02:00
Friedemann Kleint
743d963078 Windows: QT_LIGHTHOUSE_WINDOWS_VERBOSE -> QT_QPA_VERBOSE.
Change-Id: Ieffa1f483cddd220b158ccd570af151420c8e3c3
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
2012-10-17 21:20:57 +02:00
Caroline Chao
8a2d1ce2c6 Test: remove QSKIP and remove whole test cases instead.
Change-Id: I8b625d20a2cf9215cbfdb96cd252bf1c81bba522
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-17 21:06:30 +02:00
Caroline Chao
ceb5474d5f Test: remove QSKIP in tst_QDBusMarshall::receiveUnknownType
Omit the whole test and relative types if DBUS_TYPE_UNIX_FD is not defined
since the test is not relevant in that case (D-Bus library too old).

Change-Id: I167622f485c0f34d64984c4fa96be974e54f56bc
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-10-17 21:05:57 +02:00