Commit Graph

9897 Commits

Author SHA1 Message Date
J-P Nurmi
91ca6cd619 config.tests/fontconfig: remove app_bundle config (mac compatibility)
Change-Id: I77e00ee57f6062de76814f83d947a7e3a7300ebf
Reviewed-by: Jiang Jiang <gzjjgod@gmail.com>
2012-09-28 16:58:14 +02:00
Rafael Roquetto
0c0731208b QNX: fix assert condition on the destructor
m_childWindows must be 0 (and not > 0), since at this point it should have no
children.

Change-Id: I149e34849cab2d56f8617cc04fc6bf95c0476e4c
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-09-28 16:15:28 +02:00
Mark Brand
2e5fef3e66 fix indentation
Change-Id: Iebec20c1be5a0610007a8e7ffd2646bda7f2785d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-28 16:02:20 +02:00
Joerg Bornemann
219b0d2174 QProcess/Win fix forwarding of output channels
We must not create pipe readers for the forwarded channels as we don't
want to read from stdout/stderr into the internal QProcess buffer.
Also, we must not pass CREATE_NO_WINDOW to CreateProcess because this
will render our stdout/stderr handles useless.

Change-Id: Ie6485e86c103d1e9225cf39c04aa54093c1efe0d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-09-28 12:46:43 +02:00
Gabriel de Dietrich
1bface4f3e Mac: Fix label margins in QGroupBox
Also use mini-sized checkbox and label when checkable. This looks better when
there are several group boxes on the same dialog.

Change-Id: I69bb0240f2a6725afb9819d20696ca404be0bca7
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-09-28 12:46:43 +02:00
Gabriel de Dietrich
73f3f4e6b3 Some improvements to the system Mac palette
Change-Id: I0c3c306db440a9a230a0916e7ee1eb27b072d057
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-09-28 12:46:43 +02:00
Andy Shaw
55b63a406f Make sure the path is quoted in case it has spaces in it
This fixes a problem when the preprocessing scripts were called from a
path with spaces in it.

Task-number: QTBUG-15317
Change-Id: I92ea85e12e2f9abfc262a8dcaa4f414e471e468c
Reviewed-by: João Abecasis <joao@abecasis.name>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-09-28 12:46:43 +02:00
Thomas McGuire
d162f27671 Blackberry: Support input method hints
Change-Id: I2d30d6079d3982e5ca2b8d9346d0d511279792ad
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-09-28 12:46:43 +02:00
Rafael Roquetto
72d7a833bd QNX: use assert on QQnxWindow destructor
This makes it clear that the m_childWindows size must be 0 at this point,
indicating otherwise an inconsistency in the logic of the child windows
management.

Change-Id: I04e418bc6e1d23681bd96f4d619cde9645dc6a22
Reviewed-by: Thomas McGuire <thomas.mcguire@kdab.com>
2012-09-28 10:11:00 +02:00
Thiago Macieira
928fc8d939 Update the NaN tests to deal with non-conformance better
ICC apparently optimises 0 * anything directly to zero, even when it
should be doing a multiplication to conform to IEEE requirements. GCC in
fast-math mode does the same, but that also makes the rest of the
function unreliable, so we try to turn off fast-math mode if we can.

Task-number: QTBUG-22340

Change-Id: I0e3c5f4927b0a6bcb3189bb156c18843fc4b29b9
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-09-28 10:11:00 +02:00
Pierre Rossi
a152157998 QDoc: remove the experimental basedir variable
It was introduced in the early days of the docs'
modularization and appears not to be used anywhere
anymore.

Change-Id: I5b0c60d92828624af2129153fce96ad01aec861c
Reviewed-by: Martin Smith <martin.smith@digia.com>
2012-09-28 07:32:55 +02:00
Kai Koehne
e47faabe23 TestLib: Fix MinGW compile warning
MinGW-64 defines _CrtSetReportMode, but only as a noop, resulting
in a warning "statement has no effect [-Wunused-value]"

Change-Id: I6e509246134dd5929b23b07abdb6d705db603793
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-09-28 07:32:21 +02:00
Geir Vattekar
46608f98c6 Doc: Small updates to QMenu's addAction() methods.
Task-number: QTBUG-26792
Change-Id: I41289cf10065161baca368ca195268d39cdff6cf
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Geir Vattekar <geir.vattekar@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-27 23:51:30 +02:00
Stephen Kelly
bbaee3afd9 Remove the <module>version.h files from .gitignore.
Since e0839abbb4 they are created
in the build dir, not the source dir. Further, they are generated
in the include/ dir in the build dir, which is also already ignored
for in-source builds.

Change-Id: I0e709abf4b2b40351eb2728a36e9e238e3fc98bc
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-27 23:51:30 +02:00
Teemu Katajisto
7615b54ce8 Run application main run loop in color/font dialog test
In cocoa the timers are associated with main run loop but
the way font and color dialog tests are executed the modal
dialog run loop is only run in cocoa. This causes timers to
not to fire and test cases to hang.

Unfortunately this does not completely fix the test failure
because the QTest::keyClick is not working with cocoa
native dialog helpers and therefore the tests are marked
with QEXPECT_FAIL.

Task-number: QTBUG-24320
Task-number: QTBUG-24321

Change-Id: I88740a20ad2b794b6ca15e1b6455f436ffd39335
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2012-09-27 23:51:30 +02:00
Frederik Gladhorn
e8ca2e008f Accessibility: rather than assert, just warn.
Screen readers do random things with the dbus interface,
we should be careful when handling what they send.

Change-Id: Ie8fc515c8d399dae9b5e892a135b54a1820d09e2
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-27 23:51:30 +02:00
jian liang
0a7e8350ae Fix drag and drop with native widgets
Task-number: QTBUG-27336

Don't check 'widget != m_widget' in
QWidgetWindow::handleDragEnterMoveEvent() since the current window's
parent widget may be the actual drop target. I replace it with a check
'!widget->isWindow()' to prevent we pass through a top level window.
I also change 'widget->mapFrom(m_widget, event->pos())' to
'widget->mapFromGlobal(m_widget->mapToGlobal(event->pos()))' since m_widget
may not be widget's parent.

Change-Id: Ia4f10f85ccdf1e27223ddc51afabd98b5d16f2fb
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-27 23:51:30 +02:00
Marc Mutz
f9547c89ea QPostEventList: change pointer comparison to integer comparison
This is exactly the type of pointer arithmetics that GCC likes to
miscompile.

Just use offset >= size() (=subtract begin() from both sides).

Change-Id: Ifb13652d7b96bf4c06727d9c965516e95d16ab5c
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-09-27 23:51:30 +02:00
Gabriel de Dietrich
b0a7974c6a Mac: Fix small glitch in editable combo boxes
Change-Id: I4b064116183834226372b14c3c442dcaa518c3b4
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-09-27 23:51:30 +02:00
Caroline Chao
67391eedfe Test: Enable tst_QWMatrix::operator_star_qwmatrix
Expecting results were not correct. The test is passing.

Task-number: QTBUG-22362

Change-Id: Ie41c262019f76aace9062d7897d7934dc7437c3a
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
2012-09-27 21:13:52 +02:00
Caroline Chao
47d635b011 Test: Split tst_QVarLengthArray::oldTests
The entire test is currently skipped while only the last part is
causing problems.

Move the out of memory test code to its own test function and skip
only this function with the appropriate bug number. By allocating too
much memory this test is causing a crash.

Task-number: QTBUG-27361
Task-number: QTBUG-22342

Change-Id: Ia308099b7f12cf2c567b62063a7bbcc6fb38515b
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2012-09-27 21:13:52 +02:00
J-P Nurmi
171c638a89 tst_QLabel: remove QSKIP, wrap Q_OS_MAC
Change-Id: If67dbb07900bfa8f1bcf55aa457bd90ef0550900
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-27 21:13:52 +02:00
J-P Nurmi
41dc50edff tst_QMenu: remove QSKIP's -> wrap Q_OS_WINCE
Change-Id: If8cb4a7dc0630aca83e4796bffb46f547abc4b6f
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-27 21:13:52 +02:00
J-P Nurmi
70bef120b7 tst_QMainWindow: remove QSKIP, wrap Q_OS_MAC
Change-Id: Ided3c4cbdc7508a36e96351b5f60d79532bb7f26
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-27 21:13:52 +02:00
Stephen Kelly
cea7a87d5f Take a QPersistentIndex out of the container instead of casting it.
These indexes are later used as the boundary points of a QItemSelectionRange
anyway, which means that they're going to become QPersistentModelIndexes again
soon.

Because QPersistentModelIndex::row and ::column API are not inline, we cache
the resulting values in the loop.

Change-Id: Ib5099148269a8ccbb7ff2d8819a347e429c55dd1
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-27 18:35:55 +02:00
Stephen Kelly
978d3d01cf Use a QVector to store QPersistentModelIndexes.
QPersistentModelIndex is not so big that it causes very bad QList performance,
but considering how we use the container, QVector is fine. We never prepend to
the container, we only ever append, clear and iterate over it.

Change-Id: If1e53db9252c22340f1e0179b14a460495b5b35d
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-27 18:35:55 +02:00
Stephen Kelly
edec823c00 Avoid looping over the indexes multiple times to create a persistent list.
Change-Id: I089d272254eb531cd27c7b23fbab4d7183ba01d4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-09-27 18:35:55 +02:00
Stephen Kelly
2d97c6a474 Use the sibling method to make iteration over a range potentially faster.
The implementation of QAIM can implement an efficient version of sibling.

Task-number: QTBUG-17732
Change-Id: I474dbc11e52b3ccc42e2165bc9336882fab13d03
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-27 18:35:55 +02:00
Stephen Kelly
a7b2c43dfb Create an invalid QPersistentModelIndex if it will be converted anyway.
Change-Id: I278d4515d74e2213492c443e5a04731b2e79fe1e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-27 18:35:55 +02:00
Stephen Kelly
764c4fa8fe Fix resetting of the QCompletionModel.
This model apparently pre-dates the API required to do resetting properly.

Change-Id: I0ea903cef87077ca4a3d8ca2b53eba213e77cc26
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-27 18:35:55 +02:00
Stephen Kelly
1f2a289834 Store an unsigned temporary for the internalId.
This is compared later with the internalId() of other indexes, which
produces a warning.

Change-Id: I57ea248c792db3b49947cc6a8fe989c68b67ff0f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2012-09-27 18:35:55 +02:00
Pasi Matilainen
2e902799df Sand box support, fix for the file dialogs.
- Also get rid of all deprecated calls

Task-number: QTBUG-21609
Change-Id: I284587517537c7be4229d99637c6907d7e7652a5
Reviewed-by: Christoph Schleifenbaum <christoph.schleifenbaum@kdab.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-09-27 18:35:55 +02:00
Samuel Rødal
ccf0669da9 Added QGLPixelBuffer implementation using framebuffer objects.
Instead of having QGLPixelBuffer be a unusable stub implementation we
deprecate it and implement it in terms of QOpenGLFramebufferObject.
Framebuffer objects are anyway the recommended replacement for
pixelbuffers in modern OpenGL, as the context switching overhead is
avoided.

Change-Id: Ia220c358ee92813e87981d297c51d84525010322
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2012-09-27 18:35:55 +02:00
J-P Nurmi
2d70dde68a tst_QAbstractButton::keyNavigation(): QSKIP -> XFAIL
Task-number: QTBUG-22286
Change-Id: If2c0e9181f2d954f3487dbb4c3f440d26a38adb6
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-09-27 18:35:55 +02:00
Gabriel de Dietrich
0fbb41dea7 Better drawn 1-pixel thick splitter on Mac
Change-Id: I72effdfb997a7733fbbd270db719c163d1d53a66
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2012-09-27 15:56:51 +02:00
Gabriel de Dietrich
fc0ad0aca2 Fixed selected menu item (& Co.) text color
On Mac, highlighted text remains the same color as normal text. That's
not the case for menu and combobox items.

Change-Id: I3efe2547413f77921524b833b4b10cf2d533e110
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-09-27 15:56:40 +02:00
Gabriel de Dietrich
65b39b3cdc Fixed text rendering in selected tab button
We resort to custom Qt rendering when selected since it looks better
than using Carbon's HITheme engine.

Change-Id: Iefcc2bebb1ba58d0d99f078c4960c5126542f637
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
2012-09-27 15:55:10 +02:00
Joerg Bornemann
0ef459d7a2 use QLatin1String::size() in qt_setWindowTitle_helperHelper
Change-Id: I0c8193a7c6bf8b5f894da3e20af3c4d23e0b593a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-09-27 15:50:23 +02:00
Joerg Bornemann
52e6a908bd remove no-op test from tst_qfile
According to the repo history the tailFile was introduced with the
S60 port but the functionality it's testing was never implemented.

Task-number: QTBUG-22341

Change-Id: I16e8e43bbd799f05f8b136925cb0add0b918289e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-09-27 15:50:17 +02:00
Joerg Bornemann
9e750d341a fix conflicting Visual Studio project names for Qt examples
Loading examples.sln resulted in a cascade of error messages because
Visual Studio doesn't allow projects of the same name in a solution.
Now using QMAKE_PROJECT_NAME to give the projects distinct names.

Change-Id: Ifd3a00311253e4b234ece936092649ce0f0869d8
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-27 15:50:14 +02:00
Jędrzej Nowacki
82cc324762 Remove unused qMetaType helpers.
These function were replaced by QMetaTypeFunctionHelper class that is
a bit more flexible.

Change-Id: I5aee2089f543b6e05c4d65a688fa8ca721f8abe0
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-27 15:47:30 +02:00
Giuseppe D'Angelo
1c9b0eb640 Workaround MSVC2008 build failure after switching to std::lower_bound
MSVC2008 tries to see if a container is fully ordered.

This causes a build failure when operator< is not defined
between the elements in the container (but is instead defined
between the element type and the item passed to std::lower_bound).

Change-Id: I093d6f67f64a247f0aae763acb35ee73614f4208
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-09-27 15:47:21 +02:00
Miikka Heikkinen
9c4b7d5eb2 Fix OpenGL context creation in Windows platform plugin
Attribute index was incremented incorrectly.

Task-number: QTBUG-27272
Change-Id: Ia7e9c76acc6c9d8208b8ba43131861a3beff6b2c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-09-27 15:47:20 +02:00
Giuseppe D'Angelo
60e2ec9db4 Workaround MSVC2008 build failure after switching to std::upper_bound
QPostEventList is kept sorted by priority; std::upper_bound
is used to insert a QPostEvent in the right place in the list.

Turns out that MSVC2008 is a bit too picky and tries to see if the
list is actually ordered. This causes a build failure as there is
no operator< defined between two QPostEvents (in fact,
an integer -- the priority -- is passed to std::upper_bound).

Work around this issue by defining operator< between two QPostEvents.

Change-Id: Ie3562dd0cc7253e25fc988b25d566d9d9e9fe62b
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2012-09-27 15:47:16 +02:00
Laszlo Papp
0e3b1f4b48 Do not reference to the QAbstractNativeEventFilter documentation
1) It is not strictly necessary since the method argument type is already
designed for clickable here. Thereby, it is just a duplication.

2) It is not done inside the removeNativeEventFilter, so it is not consistent
now.

3) Similarly, the following documentation in 4.8 did not have another explicit
reference to the documentation of the EventFilter typedef:
EventFilter QCoreApplication::setEventFilter ( EventFilter filter )

Change-Id: I45fd42a03b16fd173fca9d734a7771e804d577d8
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: David Faure <faure@kde.org>
2012-09-27 15:47:10 +02:00
Yuchen Deng
84c2236f04 CMake: Change suffix from "cxx" to "cpp" for generate sources
Cause Qt5's source file use "cpp" as suffix
and automoc use "cpp" as suffix too.
Keep it with same feel better.

Change-Id: Iba3f8ffb5c3dbf003a9e1aacf3706089c1b6765c
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-09-27 15:46:53 +02:00
Stephen Kelly
ff70c020bc Make CMake tests significant on Windows.
All bugs in the testing scripts are now fixed.

Task-number: QTBUG-27087
Change-Id: I764257a9bbee7efeb9265449f6fa6a15bdeba883
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-09-27 15:46:18 +02:00
Jens Bache-Wiig
9bdd7e2239 More consistent dock widget painting on Windows
Before we would draw dock widget handles on windows classic
and no handles on XP, Vista and Windows 8. This would make it
very hard to make a consistent look and feel across those styles.

I also added a workaround to avoid the redundant toolbar borders
when they are used outside of the toolbar areas.

Change-Id: Ib703453677fcac8d51b2180abe45527297af0a80
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2012-09-27 15:37:29 +02:00
Stephen Kelly
b80216c9f3 Fix typo: contais -> contains.
Change-Id: I718b0178ba03fcf15f2962cb6f917efb2da27a04
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-09-27 15:31:52 +02:00
J-P Nurmi
4a9bdbd8cc tst_QCommandLinkButton: cleanup whitespace
Change-Id: Ia1aab643f7b93b0532a38b27d7777fbcf5f489bc
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
2012-09-27 15:21:41 +02:00