Commit Graph

9759 Commits

Author SHA1 Message Date
Marc Mutz
26f238a80d qfuturesynchronizer.cpp: fix whitespace errors
Change-Id: I106ae536f1411939c3785f0a97c39752db59b19c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-28 23:50:10 +02:00
Marc Mutz
b1d2b80a90 QException/QFuture*: add \inmodule QtCore
Change-Id: Iad787e3280889eae6b6aace9a85bda966b1a7094
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-28 23:50:10 +02:00
Marc Mutz
427a271426 Include qexception.h instead of qtconcurrentexception.h
Change-Id: I9a54412b77596aa74af7a513c33b10eb52257db2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-28 23:50:10 +02:00
Marc Mutz
7d21abfca3 Move QFutureSynchronizer back to QtCore
This class, too, belongs with QFuture.

Change-Id: I41a532ca66c156f1631e4b22ffc1a5879c854488
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-28 23:50:10 +02:00
Marc Mutz
08c50599f1 Move QFutureWatcher back to QtCore
This belongs with QFuture.

Change-Id: I555cd01c1d3890fbbaca4fd8a9170292ea4eb0fb
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-28 23:50:10 +02:00
Marc Mutz
727f25214e Move QFuture from QtConcurrent to QtCore
This class belongs to QThreadPool/QRunnable more than to QtConcurrent, so
move to QtCore, where QThreadPool awaits it.

Change-Id: Ibf20288a986593bf779453427c2dae8db1e1423a
Reviewed-by: Qt Doc Bot <qt_docbot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-28 23:50:10 +02:00
Marc Mutz
f7a33ec29f QFuture: remove unused include
qtconcurrentcompilertest.h defines the HasResultType<> template, which
qfuture.h doesn't use.

Include qtconcurrentcompilertest.h in the headers which actually use
HasResultType<> instead.

Change-Id: Ic5939ccf4c9058b2b624432c7ea48a5aca2236b5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-28 23:50:10 +02:00
Marc Mutz
a65a98399b Move QtConcurrent::ResultStore as QtPrivate::ResultStore to QtCore
No compatibility header needed. While this wasn't marked as private API,
it wasn't documented, either.

This is a prerequisite for moving QFuture to QtCore.

Change-Id: I8e986e6e2a22fbe5cf08d0600ec39ae9ae993e20
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-28 23:50:10 +02:00
Marc Mutz
3a29976eac Move QtConcurrent::Exception as QException back to QtCore
Leave the old name as a deprecated typedef; adapt users.

This is a prerequisite for moving QFuture back to QtCore.

Change-Id: I81dcee2c7e6eb234c16f3f42e2415ca0da3dc4f8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-09-28 23:50:10 +02:00
J-P Nurmi
5414a9a03b tst_QDateTimeEdit: cleanup whitespace & follow Qt coding style
Change-Id: Iae04cd0c9ac6ea85621b293f2ce184d673548e9b
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
2012-09-28 21:12:21 +02:00
Romain Pokrzywka
84118ffa2c Fix accessing the rpath dir from included modules
The wrong variable was used when reading the module settings

Change-Id: If35dc9694240a68393b24d7dba72520108cb9ac3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-28 21:09:35 +02:00
Romain Pokrzywka
e4486e9fd0 Fix rpath dir in forwarding module .pri file
The module rpath should be the raw QT_INSTALL_LIBS, without the sysroot

Change-Id: I4140929b38a589134872593e4ce35eaf7d1cd5b7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-09-28 21:09:35 +02:00
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