Commit Graph

2523 Commits

Author SHA1 Message Date
Pekka Vuorela
34cb690163 Adapt from QInputContext interface to QInputPanel
Change-Id: I4143c3b516e7b0e46c706b8a6560bca9d8951572
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-20 12:57:38 +01:00
Frederik Gladhorn
a730a2b196 Add destructor to QPlatformFontDatabase.
Virtual functions deserve a virtual dtor.

Change-Id: I71b7ae3b7fb0aa1553a37a90dce6270740d49e32
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-20 12:57:38 +01:00
Alan Alpert
cb9b7ceffb Revert "Revert "Add QObject::objectNameChanged(con... signal""
This reverts commit 9b17557f3b.

Justification: Temporary commit, see JIRA task.
Task-number: QTBUG-22985
Change-Id: I3df9eb5fdbdc133349dca5e192dcfcc9e758626c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-12-20 11:15:21 +01:00
Olivier Goffart
8754bf03f5 Better error reporting in case of connection failure.
Use Q_STATIC_ASSERT_X give a better error message.
If C++11 is used, you get the string in the error.
Else, clicking on the QStaticFailure error still shows you the
string in the qobject.h source code)

And report better failure if the return types do not match.
(Without the static assert, you would still have a compilation error,
but in an unrelated place, with no reference to the actual connect()
call. The error was thrown from the virtual call
QSlotObject::call, without saying where it was instantiated)

Previously the error was relying on the existence of a type inside
CheckCompatibleArguments, but the Q_STATIC_ASSERT requires a bool
(hence the introduction of CheckCompatibleArguments::value)

There also was a typo in the return value of
AreArgumentsCompatible::dummy that made that code not work, and that
error not be reported.
(Instead, the error was reported when QObjectSlot::call is instantiated)

Specialization of AreArgumentsCompatible for the void type have been
added because if the return value of a signal or slot is void, the
connection should work.

Change-Id: I5a93ec787ce2a4b94a26630ca31d5001cd294e4d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-12-20 09:15:41 +01:00
Jason McDonald
85a77cd5c8 Retire QTest::pixmapsAreEqual().
QTest::pixmapsAreEqual() was left in the Qt4 API for compatibility with
some old tests written for Qt3.  QCOMPARE() is the preferred way to
compare QPixmaps and provides superior diagnostic output when a
comparison fails.

This commit removes QTest::pixmapsAreEqual() from the testlib API and
replaces the last few remaining calls with QCOMPARE.

Change-Id: I051c0e7d3bda072855fcd262d82e8e540619233b
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-20 06:17:42 +01:00
Stephen Kelly
1749fef3c5 Remove declaration which is exported from QtGui.
Fixes static build.

Change-Id: I6f82ded7bf6cb3b72b0ef987e781c7e8f9ed932b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-19 23:04:38 +01:00
David Faure
8707c09fcd Fix QDir::removeRecursively so it doesn't follow symlinks to directories.
Critical bug... Good thing I had backups of my $HOME.

Change-Id: I43b3a80786c946b0aec797036c1164d436d521f8
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-19 20:48:16 +01:00
Shane Kearns
9ffd69a6a6 Fix regression in user-agent setting of http proxy in a QNetworkRequest
Modifying the proxy causes a detach(), so the socket is still using
the unmodified proxy.
Changed this to setProxy() the modified one back to the socket.

Test case tst_QNetworkReply::httpProxyCommands()

Change-Id: I448c2f2ab43ce8d78bc6edb8261599bf67372676
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-19 19:08:57 +01:00
Laszlo Agocs
2edada763a Update the touchscreen plug-in.
Now works with bcm5974: Added manual contact tracking for drivers that
do not report a tracking id and fixed abs limit querying to use
ABS_MT_* instead of ABS_*.

Fixed reported area: The incoming point was the top-left point instead
of the center which was incorrect.

Added pressure support.

Tracking of event type has been removed as handleTouchEvent no longer
needs it.

Broken debug prints have been removed.

Changed udev auto-detection to pick only /dev/input/event*.

Fixed multiple released state reports with some drivers.

Name and capabilities are now set properly for the QTouchDevice.

Change-Id: I8f026c9a14465bfb6d567f4dcf36c5c03f843868
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-12-19 17:29:10 +01:00
Olivier Goffart
87679491cb Do not call QueuedConnection slot on partialy destroyed object
This is a regression introduced in Qt 4.8
When QApplication::processEvents is called from a destructor, it is
possible that pending events would still be called on the already
destroyed subclass.
Prevent that by using the same pattern as in QMetaObject::activate

Change-Id: Ida50db07ae089264402dafcde7a41a066479d08b
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-19 14:06:12 +01:00
Friedemann Kleint
bbc098ab9f Windows: Remove Window from list before calling DestroyWindow.
Change-Id: Ifef99d9e4e46f0450cecf8ecba18ce79ebec3e8d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-19 12:27:45 +01:00
Olivier Goffart
92464faea9 Q_STATIC_ASSERT: fix C style cast
Else tst_moc::oldStyleCasts will fail if one add STATIC_ASSERT in
some headers included by moc generated files

Change-Id: I29ae64c14f10c889137fde36bb14c8ce047d5244
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2011-12-19 12:27:45 +01:00
Frederik Gladhorn
74c9f9d83f Accessibility: childAt returns interface
childAt used to return an integer.
Return an interface instead.

Not requiring a direct child to be returned allows optimizing
by bypassing iterating through the hierarchy of accessibles.
For QtQuick this is the only sensible way of implementing this.

The bridges are still responsible for finding the top-most element.

The default implementation in QAccessibleObject is sufficient
to return direct children. The implementation in
QAccessibleApplication is therfore no longer needed.

Change-Id: Id7100dd5bcc3a98de516a7f4a12eaaa41cb46d26
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-19 12:27:45 +01:00
Stephen Kelly
7e12d2d30f Change a slot into a virtual method.
Implements a BiC Qt5 TODO.

Change-Id: Ie7dc32d954335019166dbd78d8b01ef79e2ad5c2
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-19 10:42:26 +01:00
Stephen Kelly
c023f5600a Remove plugin related variables from the CMake files.
It doesn't currently have any effect and needs to be re-thought
anyway.

Change-Id: I6e620ca5b341264bbf5279a19e8f25af8fa7d396
Reviewed-by: Alexander Neundorf <neundorf@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-19 10:42:02 +01:00
Jędrzej Nowacki
31d8ecfe3b Make QMetaTypeInterface POD.
QMetaTypeInterface has to be POD because it is constructed in a static
array. Constructors in POD types are not allowed so we will use a macro
instead.

Change-Id: Iab9ae776dfe4dcd7148558f02d6181c5917aa5c3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-19 10:21:16 +01:00
Chris Meyer
e75e4421cd Enable option to see filename extension in Mac save dialog
Many Mac OS users expect to have the option to see the file extension
of the file being saved in the save dialog. This patch enables that
option.

Change-Id: I7713bcef16b6f43135b382c7107f306009c7a0a1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-19 09:55:24 +01:00
Chris Meyer
b13f630c81 Add check to make sure qApp exists before using
Check for qApp before using. I'm aware that this is in commented
out code right now; but I wanted to make sure it doesn't
accidently slip back in without this check so I'm submitting
this patch. It caused problems at shutdown in 4.8.

Change-Id: I1c2358ab94f8b698e5519b3e0f988fb5cdd653fa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-19 09:53:42 +01:00
Jason McDonald
e299832dbf Avoid confusing method overloading in QTestTable.
The private class had two append() methods, one appending a column and
one appending a row.  Use more meaningful names instead of overloading
orthogonal operations.

Change-Id: I97e0268d6cb289694557846f244fe770cf980aaf
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-19 04:43:38 +01:00
Robin Burchell
3992c1cb15 Remove note about Maemo5-reserved enum values, and renumber appropriately.
With the ABI/API break, we can afford to do this.

Change-Id: Iaf318a56d572679322fde0448556eaa4242842d1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-18 15:15:21 +01:00
Robin Burchell
eada3449b9 Remove widget attribute orientation values from Qt:: enum.
These were only actually implemented on Symbian, thus, they aren't too useful,
apart from confusing developers when they don't work.

Removed per the discussion on:
http://lists.qt-project.org/pipermail/development/2011-December/000860.html

Change-Id: Id097cb392a3d964364adbe51a72a22927b9c382c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-18 15:15:12 +01:00
Friedemann Kleint
51fb43b37f QSortFilterProxyModel: Fix warnings about unused variables.
Introduced by 4ebceaba39.

Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>

Change-Id: I81985c4121db5f6abd832f64ef412646daec6259
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-16 19:10:47 +01:00
Joerg Bornemann
d1a671b698 extract QWindowsPipeReader from qlocalsocket_win.cpp
The code for reading named pipes can now be used in
other places as well.

Change-Id: Id734617a3927e369491a6c5daf965169ceb01f74
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-16 15:14:12 +01:00
Morten Johan Sorvig
ac0e35c8c7 Cocoa: Accept mouse clicks that activates windows.
Events for mouse clicks that active windows are by
default suppressed. Qt needs to see all events in
order to properly close popup windows.

Wether or not the event should be sent to the
target needs to be implemented later on - in the
QWidget world this is controlled by WA_MacNoClickThrough

Change-Id: I4b96d33978ed2b3cb793f52bb5b6fef234190a00
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
2011-12-16 14:57:04 +01:00
Stephen Kelly
211e434a05 Move proxy and selection models to QtCore.
Change-Id: I71097855cb9e28105238e496778f29f99f7fc84e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-16 13:00:57 +01:00
Martin Petersson
9bc4b56656 QNetworkAccessManager: delay IPv4 connection with Happy Eyeballs
Incase we have both IPv4 and IPv6 available after the host lookup
we should delay the connection attempt to IPv4.

Task-number: QTBUG-23066
Change-Id: I8c0177cf125c9daae314ada73cacef790a39b856
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-12-16 11:22:52 +01:00
Jason McDonald
f4ccbc2868 Avoid qDebug in verbose benchmark test output.
Use QTestLog::info() rather than qDebug() to output informational
messages from testlib.  Source file and line are deliberately omitted as
they would come from testlib rather than from a test program.

Change-Id: I7b479bba4d3d553c6fa846d8d5ea2c29a8ef42b8
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-16 02:43:46 +01:00
Jason McDonald
8c2727ac18 Switch off signal dumper when testing is completed.
Previously, if the signal dumper was switched on with the -vs
command-line switch, it would never be switched off again.

Change-Id: I192e188010471525723fad0844ff33e9482128ea
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-16 02:43:46 +01:00
Kim Motoyoshi Kalland
6506e0a6ee Improved path filling performance in the raster paint engine.
Convert bezier curves to polylines before rasterizing with gray
raster.

Change-Id: I353debd4338f2a3ce2fa1cfa1bff9dd2e36f05ab
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-12-16 00:51:47 +01:00
Morten Johan Sorvig
7b874b7fc4 Cocoa: Update geometry on window move.
Call [QNSView updateGeometry] directly. We can't
got through the frameDidChange notification since
we are not actually changing the QNSView frame.

Rename frameDidChangeNotification -> updateGeometry
sine it now handles updates from two different sources.

Change-Id: I848e558294093cd51d97778734b5cf872435266a
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-15 21:04:27 +01:00
Morten Johan Sorvig
140579cb3e Cocoa: Don't set window size in propagateSizeHints
Unless QWindow:baseSize returns a valid value.
Setting the size caused lots of window geometry
instability in Creator.

Change-Id: Iab45e88b47207db900c7655c217959391d84a1bb
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-15 21:04:27 +01:00
Morten Johan Sorvig
c13b223979 Cocoa: Add version check for convertRectToScreen.
convertRectToScreen was added in 10.7, use
convertBaseToScreen on 10.6

Change-Id: Ica1ee0f62e1fc9b0d5ccf463419496684da779b7
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-15 21:04:27 +01:00
Robin Burchell
81d55783bb Rename QEventDispatcherQPA to QUnixEventDispatcherQPA.
This removes confusion when we add a Linux-specific QPA dispatcher, and is
technically more accurate, as QEDQPA was not 'the' QPA event dispatcher in the
first place.

Change-Id: I2a41d425f284522ee76ef86782d5eb2bdd805120
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-12-15 21:04:27 +01:00
Robin Burchell
ec9ea7f3e8 Merge integrity support into unix.
Since integrity was pulling in all the same code (except the glib-in-QT_CONFIG
branch), we can just merge this in.

This shouldn't break integrity unless they somehow magically inject glib into
QT_CONFIG without actually having glib, but the removal of redundancy makes this
worthwhile.

Change-Id: I527b5e60bea4452fdca5eedfe729214f16519234
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-12-15 21:04:27 +01:00
Joerg Bornemann
0330036631 QLocalSocket/Win: eliminate checkReadyRead()
Change-Id: I459c0ba42d3e5b0da57884f5cdfc6f44a11600f7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-15 19:17:04 +01:00
Joerg Bornemann
3ccd626429 QLocalSocket/Win: make emitReadyRead timer persistent
This saves us from creating a single shot timer every time we emit
readyRead and eliminates the parallel pendingReadyRead flag.

Done-with: ossi

Change-Id: I1de7f07b83b583b9d60dd8862d6a9f7865b5b891
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-15 19:17:04 +01:00
Joerg Bornemann
abccefa4a8 QLocalSocket/Win: fix behaviour on broken pipe
We must not close the QIODevice, if we detect a broken pipe.
We still can have data in our read buffer that can be read by the user.

Autotest: tst_QLocalSocket::threadedConnection

Change-Id: Ibe823c006516acb27f51a06ca0bbe5555dbd88f5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-15 19:17:04 +01:00
Robin Burchell
1431679fb5 Remove Symbian support from /src/corelib/kernel/.
Change-Id: Ic4a1b4f074d2ffd4cdfcb44e47c9bfccc2378760
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-12-15 17:20:03 +01:00
Thorbjørn Lund Martsum
f405a57fa1 QHeaderView - remove stupid if
Not only is this extra if unnecesary - it is confusing.
oldSize is different from size.
(otherwise we would have returned less than 10 lines above)

Change-Id: Ie911414f679df2be7b5c8bc2670225d46e986b32
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-15 15:39:24 +01:00
Thorbjørn Lund Martsum
3bb0c88de8 QHeaderView - no big update work if updates are disabled
There is no reason to find out where to update the headerview
if updates aren't enabled.  Another approch I considered to skip the
whole calculation and just call update. I seriosly doubt that this
calculation and update of a particular QHeaderView rect will normally(*)
be faster than just updating everything.

However to be safe I have done the conservative fix.

(*) Normally but with many/fragmented spans in the headerview.

Change-Id: Ia812a747ee825653db0345cdc34f9d2f7155ea01
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-15 15:39:24 +01:00
Robin Burchell
f9516e4c8e Split timer handling out of QEventDispatcherUnix.
This makes it easier to see the guts of the unix event dispatcher, and to
experiment with it.

Change-Id: I715bb68c4de6798e10bc55304a128b88e0249c63
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-12-15 13:33:31 +01:00
Bradley T. Hughes
317ee62d44 Remove unused ownObjectName field from QObjectData
This field isn't used at all in qtbase, nor in any of the qt5
submodules.

Change-Id: If57d389935593f797818506a220c6a3cc04b6078
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-15 13:33:04 +01:00
Bradley T. Hughes
2561ab5841 Remove QT_JAMBI_BUILD code
Change-Id: Ic9231b11293af4352f11cf075893175f0c9a471f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-15 13:28:09 +01:00
Bradley T. Hughes
0501c9d8f1 Correct sizeof(QObjectData) after out-of-order cherry-picks by Gerrit
Commits a6ae75f92a and
6f0f9f6928 were cherry-picked in the wrong
order (despite the dependencies shown in Gerrit), causing the
QObjectData::unused bitfield to be too large.

Change-Id: I65acaa8b507f7f6f2c5735f45bd0ad8343abea54
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-15 08:17:49 +01:00
Jason McDonald
a925226d44 Remove Qt5 comment from qsignalspy.h.
The removed comment refers to a task in a bug tracker that no longer
exists.  The comment also mentions making (part of) testlib use Qt's
regular binary compatibility mechanisms, which is desirable in the long
term but not in scope for Qt 5.

Change-Id: I6f23a9a2c8a84e30afe2aeb5c53ea93c25ba6f11
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-15 08:15:13 +01:00
Jason McDonald
95cb93dc59 Fix incorrect function name in assertion.
Change-Id: I3eb8e7afe3f7ca514dd4839e603612b56c7d8082
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-15 08:15:08 +01:00
Jason McDonald
a3109c8b0b Remove QTest::qt_snprintf() from testlib API.
This was an internal function that used to act like qsnprintf() but also
filtered unprintable characters out of the test output.  The filtering
has been moved somewhere more appropriate and this function is no longer
used by testlib.

Unfortunately, the function was exposed in the public API due to its
former use in the implementation of a public macro.

In the unlikely event that any code outside testlib calls this function,
the call should be replaced by calling qsnprintf(), which comes from the
QtCore/QByteArray header.

Change-Id: Iddc17b4361d16ebddd19346ae7d1064951dd7738
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-15 08:02:36 +01:00
Giuseppe D'Angelo
be6b29f001 Fix typos in QObject::(dis)connect warnings
For some strange reason "Object::method ..." was printed, without
the leading Q.

Change-Id: I10b99e8aa8730e4020d15b3e04a01004bade76c3
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-15 05:48:27 +01:00
Jason McDonald
dc98d58562 Improve QTest::keyClick documentation.
Make it clear that the delay is applied before each key-click is
simulated.

Change-Id: Id100f1f2db1a5b1651c3046905719d7eb06ec1a0
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-15 01:57:57 +01:00
Jason McDonald
5b413852dd Update documentation of QTEST_MAIN macro.
Update the docs to describe the behaviour that resulted from moving the
traditional Qt widgets into a separate library from the rest of GUI
classes.

Change-Id: Ibd0ef05cc871b8f5a6700e421aa41bdf64c1210b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-15 01:57:53 +01:00
Jason McDonald
c45f9c7761 Improve QCOMPARE for QStringList
After establishing that both lists are the same size, there is no need
to calculate the minimum of the list sizes.  Also, use sizeof() instead
of hard-coded values when calling qsnprintf().

Change-Id: I2396cf3f941770229e1cef6422aeddbe549c51fc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-15 01:57:48 +01:00
Bradley T. Hughes
c4e36728bc Disable warnings when building mkv8snapshot
Like in commit 5341cf7831, do not enable
warnings when building V8 code.

Change-Id: I447db52d546b50aea1c3afc88db7ce6923a5e310
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2011-12-14 23:26:15 +01:00
Morten Sorvig
f950a0f0c0 Make QCocoaWindow independent of NSWindow.
QCocoaWindow now gets resize events from QNSViev
and does not require a NSWindow. QWindow instances
can now be inserted in NSView hierarchies. This is
useful for Qt-as-a-plugin use cases and is needed to
implement QMacNativeWidget for Qt 5.

Change-Id: Ia95ea9c22a15a3e62d1e6543466cff07390c70a2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-14 23:26:15 +01:00
Morten Johan Sorvig
f295ef1a4b Cocoa: Add window debug output
Add logging for setGeometry/setVisible/propagateSizeHints.

Change-Id: I3590caed586d36f789dd67b1951e8152f923a407
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-12-14 23:26:15 +01:00
Friedemann Kleint
3b2d99a5c8 QIBusPlatformInputContext: Fix a crash in tst_qinputpanel::update.
Change-Id: If50c442958b6f25f17325f7792bb3f882e4b13e7
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-14 23:26:15 +01:00
Friedemann Kleint
56c4ddfdf6 QPlatformDialogHelpers: Reduce dependency on QDialog.
For each QDialog-derived class, introduce a Q[X]Options class
containing the options of the dialog. An instance is shared
between the QDialog (or dialog desktop component) and the
helper.

Change-Id: Ibabf508a4b9eaea25615638a47a4c1b8f93c019e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-14 21:49:33 +01:00
Thorbjørn Lund Martsum
f86007175d QHeaderView::ResizeToContents slow hide fix
I have been a bit confused about what QHeaderView::ResizeToContents
does good. It only sizes depending of the visible part.

However in hide it goes crazy and checks calculates size hints
for every row. At first I considered to solve it in QTableView.
It could be made to calculate the maximum height of the maximum
screen - however I decided not to touch it since I was not
certain that it wouldn't have any unexpected side effects.

Therefore I instead made this patch which is more simple and seems
to be safer. The logic is that when a QHeaderView is hidden we actually
only want to recalculate sizes if the headerview has a visible parent.

Task-number: QTBUG-14234

Change-Id: I186ab6afa95aed43022f2bb7c36e3fd008355d9b
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-14 18:18:59 +01:00
Aaron Kennedy
eeade8bf9c Update V8 to match current patchset
Change-Id: Ib3a093129b1f8bbe66fc870af8871dea3f58c081
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2011-12-14 15:39:43 +01:00
Aurindam Jana
cd44813bae Update V8
Update V8 with fix for Issue 1853
(http://code.google.com/p/v8/issues/detail?id=1853)

Change-Id: I10f652228ab1421b280b433eb2a59aeb83a7699f
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-12-14 13:19:03 +01:00
Laszlo Agocs
3064c1bc8c Remove redundant touch processing in QtGui and widgets.
The duplicated hash tables in QGuiApplicationPrivate and
QApplicationPrivate are now unified into one single hash table in
QGuiApplicationPrivate. This also reduced the number of lookups.

The extra processing needed to keep the touch points' first/lastPos
values in sync is now done only once, in QGuiApplication. This
eliminates the performance penalty (for widget-based apps) that was
introduced during the QPA migration.

As an added bonus the patch adds support for touch events arriving
simultaenously from multiple devices. This was broken before: As there
is no guarantee that two devices/drivers will not send touch points
with the same ID, using structures with only the ID as key is
wrong. The proper key is composed of the device ID (that is, a
QTouchDevice pointer) and the touch point ID.

The exported internal function qt_translateRawTouchEvent() has been
removed. This function cannot work properly in the QPA world: It
injected touches into the widget subsystem (QApplication) only which
is wrong, and would result in half-filled touch events due to not
routing the injected data through QGuiApplication. Autotests using
this function are migrated to
QWindowSystemInterface::handleTouchEvent().

Change-Id: I7632781d77f9e0ac4626fd7c9933511c94492156
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-14 13:17:19 +01:00
Bradley T. Hughes
14d9a2b06c Remove QAlphaPaintEngine::drawImage()
It was not a proper reimplementation of QPaintEngine::drawImage(), which
takes 4 arguments, not 3 as declared in QAlphaPaintEngine. Remove the
code, since it is not being called.

Change-Id: Ia125a9c7e8a2e05ec2ca11b859c01ccbf4d55af5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-14 09:27:04 +01:00
Jason McDonald
2395a3c897 Remove incorrect information from QCOMPARE documentation.
The documentation stated that QStringList objects would be compared
starting from the end of the lists.  The implementation in qtest.h
actually starts at the beginning of the list, and always has done since
qtestlib became part of Qt.

Change-Id: I056f584564d46402ba23fc6a89c801cb5c3c6262
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-14 09:27:04 +01:00
Morten Johan Sorvig
876b2d06f7 Cocoa: Use new 10.7 mouse wheel API.
Silence "deprecated" warnings. Use the old API
on 10.6.

Change-Id: I0cfa3a083108618023b491589a85ddfc268f990b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-14 09:27:04 +01:00
Michael Brasser
a9ad8886fe Fix possible jump in animation timer.
When starting new animations with existing animations running, ensure
we force an update to the timer first, so that the new animations can't
mistakenly start with a very large delta.

This fixes tst_qdeclarativeanimations::alwaysRunToEndRestartBug failure
on slow machines.

Change-Id: Ida4e5dcf0ff792e6bfe0d244b6e969d04d0b20fa
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-12-14 02:16:40 +01:00
Jędrzej Nowacki
3ed0a23323 Add specialization for QTypeInfo<void>
QTypeInfo uses sizeof which is illegal operation for void type.

Change-Id: Idf43551bdfafbb76e32f4f2785af5f4291981e73
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-13 16:36:33 +01:00
Debao Zhang
7694599ef9 Fix Memory leak related to Content Menu
From Qt4.7 on, the contextmenu of
QTextEdit/QPlainTextEdit/QLineEdit/QLabel/QMainWindow etc using
QMenu::popup() instead of QMenu::exec(), but the
setAttribute(Qt::WA_DeleteOnClose) does not work, as QMenu::close()
isn't called when the menus disapper. And this causes a memory leak.

This is a side effect of b7af368e86874d71ffc9071c9ef009814d6a3467

Task-number: QTBUG-22817
Task-number: QTBUG-19592
Change-Id: I4c2c3edb3f63ce914b7b57cd0fbcec20488c8315
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-12-13 16:36:33 +01:00
Bradley T. Hughes
d308797d00 Finish removing virtual child integers
Finish the work started by commit
beb72b2fbf. This silences warnings found
by -Woverloaded-virtual.

Change-Id: Ic6f5e77e324463ade8349f23f272b41b509d87e4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-12-13 14:54:09 +01:00
Johannes Zellner
8757aaaf2f Fix debug output in eglfs with QEGL_EXTRA_DEBUG enabled
Change-Id: I615a953b52184d01c5b1b78d1cff283f94c458d9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-13 13:58:56 +01:00
Kim Motoyoshi Kalland
d52fd497f6 Improved performance of large text when parts are outside view.
Avoid generating paths for the parts of the text that are outside
the viewport in the raster paint engine.

Task-number: QTBUG-22687
Change-Id: I06159bc4c1aa82a07606f4b2f0336cb25dfd56d2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-12-13 11:11:58 +01:00
Bradley Smith
0553ab9127 Fix QPA xlib plugin handling of setParent(0).
Dereference of the parent argument did not check for nullptr. For
example, the hellogl example would crash. Now if the parent
argument is null, the screen's root window is used.

Change-Id: Ib06181c9ab9794d577722f1c1dd5ee92e4edaee5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-13 11:11:58 +01:00
Jason McDonald
d702da7482 Add missing assertion to QAbstractTestLogger.
If passed an empty string, QAbstractTestLogger::outputString() would
crash, so add a QTEST_ASSERT to make the cause of any crashes more
obvious.

Change-Id: I00afe2e73120b87e211f858402d441f345dddd08
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-13 07:41:27 +01:00
Rohan McGovern
9f592dbd60 testlib: fixed actual, expected order in QTest::compare_helper
These two parameters were written in the opposite order in the
function's declaration and definition.  Harmless to the compiler,
but confusing to developers and reviewers.

Change-Id: I1d4cb0a41b465b5f918daa76756677fe0cfe0a59
Reviewed-by: Jason McDonald
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-12-13 05:19:08 +01:00
Michael Brasser
5d00ae3b69 Stop animation driver in the appropriate place.
Calling stop from restartAnimationTimer was incorrect (it was initially
added as a fix after the introduction of QAnimationDriver, but this is
a better location for the fix).

Change-Id: I2507096b846ada061e36a9ece6aa814d801ddd53
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-12-13 02:24:03 +01:00
Michael Brasser
30a4d9bc99 Only call profiler callback once per animation tick.
Change-Id: I369afdf34ded2c6327ce36cdb80fab51bf89a1b5
Reviewed-by: Christiaan Janssen <christiaan.janssen@nokia.com>
2011-12-13 02:23:55 +01:00
Michael Brasser
08d378d933 Cleanup pause timer handling in QUnifiedTimer.
The animationTimer is now only used for pauses, so can be renamed to
pauseTimer, and directly queried for whether it is active.

Change-Id: I3d9319b6ee76158e875ab43657126a0aa0a1cf2e
Reviewed-by: Leonardo Sobral Cunha <leo.cunha@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-12-13 02:23:47 +01:00
Michael Brasser
3bd3b82a2f Fix possible jump in animation timer.
If both a stop and start happen within an event loop, ensure they are
processed in order.

Based on a patch from Charles Yin.

Task-number: QTBUG-22865
Change-Id: I6131bd43a6ba5ad4fa37c863a9f4598bf2ac0e01
Reviewed-by: Leonardo Sobral Cunha <leo.cunha@nokia.com>
Reviewed-by: Martin Jones <martin.jones@nokia.com>
2011-12-13 02:23:42 +01:00
Stephen Kelly
309cdc358e Move QAbstractItemModel into a separate directory.
Change-Id: Ib505520dd5b52743634befbf3f148d7f8c21ec44
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-13 02:23:42 +01:00
Thorbjørn Lund Martsum
4465fdd166 Compile fix - qxcbconnection.cpp (‘Display’ was not declared)
To avoid getting
qxcbconnection.cpp:89:29: error: ‘Display’ was not declared in this scope

Platform linux - configured with
./configure -nokia-developer -nomake examples -nomake demos -nomake tests -no-gtkstyle -no-v8

Change-Id: Ief7315bb8aa67c6454cdeddb1c02e60ea79801b5
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-13 00:44:09 +01:00
Robin Burchell
a3b3cfe3b8 Use QVarLengthArray in QXcbConnection.
There's no need in using a QList here, since it's never passed around anywhere;
the reference counting is just unnecessary overhead.

Change-Id: I92107c69f7338acc396e2ac4a69123c6a2becaed
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-13 00:44:00 +01:00
Stephen Kelly
23ab6a726a Add the .exe suffix to executables on Windows.
Change-Id: I257bb7d62ae18ea529df6b10694fcf25eedc83f4
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-12 19:10:34 +01:00
Frederik Gladhorn
2e02aaf24c Make QApplication::type() set by QGuiApplication.
QApplication::type used to be static and set by the
QApplicationPrivate constructors.

In QCoreApplication we have the new application_type that should take its place.
QApplication::GuiServer is deprecated (since it doesn't have any functionallity
any more with QWS being removed).

This change prepares QStyle to be called from a QQuickCanvase based application
that does not inherit the QWidget version of QApplication.

Change-Id: Ifbe992e25f1e5821fa047b6eb915f75fa675ab97
Reviewed-by: Paul Olav Tvete <paul.tvete@nokia.com>
2011-12-12 17:28:24 +01:00
Rohan McGovern
1b6b1358bf v8: give sensible error message if v8 sources are not checked out
A common error for developers attempting to build qtbase for the first
time is to miss cloning the v8 submodule.

Let qmake check for existence of the sources so we get a sensible error
at qmake time, rather than a relatively inscrutable error at make time.

Change-Id: I70b478e63c962263dac4f2ddccb377b4c9777ceb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-12 17:27:19 +01:00
Laszlo Agocs
91b48208f5 Add touchEvent() virtual to QWindow.
Unlike keyPressEvent(), mousePressEvent(), etc. the touch events had
no equivalent so one had to fall back to reimplementing event() or
using an event filter. This is now corrected by introducing
touchEvent(). Touch events are finally becoming a first-class citizen
in Qt 5.

Change-Id: Ia2044030154fd5b1b5384f08a3cb1749b798435f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-12 17:27:19 +01:00
Stephen Kelly
0319f13f1a Remove symbian cases from library and plugin loading code.
Change-Id: I381873449b1520152cd2a7aede9c7253e110ef7a
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-12-12 17:27:19 +01:00
Morten Johan Sørvig
82b73ab03a Cocoa: Add autorelease pools.
A couple of cases where we call Cococa APIs without
having an autorelease pool in place surfaced after
removing the global autorelease pool in 1a218a7. 
(This happens when when Qt API is called before 
app.exec() has started the Cocoa event loop.)

Add local autorelease pools to prevent memory leaks.

Change-Id: I0c4be3ff102aaff4539235857f95ab29fdbc9d70
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
2011-12-12 17:27:19 +01:00
Robin Burchell
6802e3165e Add QVarLengthArray::length().
This also adds a unit test for length()/count()/size(), since there wasn't one
testing it explicitly.

Change-Id: Ifb7f113aa97beef5f76e5fb246eb38495344b0ad
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Marco Schmidt <Marco.Schmidt@Taugamma.de>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-12-12 17:27:19 +01:00
Richard Moore
3ac957690c Remove unused member variables from private class.
These aren't used, and so they shouldn't be there.

Change-Id: Id4a08d90836c45c140d811b8eca07756e14c56e5
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2011-12-12 17:27:19 +01:00
João Abecasis
e7a6906da6 Remove template <class T> class QRingBuffer
.. as it is declared and defined in .cpp file but never used.

Change-Id: I7b72daf62712b4ec25717afbe2b7f0792ffa2a85
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-12 17:27:19 +01:00
Friedemann Kleint
c9d6def002 Windows-DnD: Fix cursors.
Re-add pixmaps that were removed from QGuiApplication.

Change-Id: I9936da115e494cf816116159419d40840176afd5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-12 15:38:47 +01:00
Friedemann Kleint
5b7a1ca85b Windows: Fix clipboard test.
Return the QMimeData set on the Ole object if we own it.

Change-Id: I08de0968e04a7356fed1255feb495f7b85e7a6f8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-12 15:38:40 +01:00
Bradley T. Hughes
7ac4bf8a40 Silence -Woverloaded-virtual warnings in QRasterPaintEngine
The QRasterPaintEngine::updateState() is not a reimplementation of
QPaintEngineEx::updateState(const QPaintEngineState &state). Rename the
updateState() function to updateRasterState(), and ensureState() to
ensureRasterState(). These names were chosen to match the class name
QRasterPaintEngineState on which these functions operate.

../../include/QtGui/5.0.0/QtGui/private/../../../../../src/gui/painting/qpaintengine_raster_p.h:271:10:
warning: 'QRasterPaintEngine::updateState' hides overloaded virtual
function [-Woverloaded-virtual]
    void updateState();
         ^
../../include/QtGui/5.0.0/QtGui/private/../../../../../src/gui/painting/qpaintengineex_p.h:202:18:
note: hidden overloaded virtual function 'QPaintEngineEx::updateState'
declared here
    virtual void updateState(const QPaintEngineState &state);
                 ^

Change-Id: Ie9ff0230019b383d53757029c6b2194dfc6a2664
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-12-12 15:35:54 +01:00
Bradley T. Hughes
c560836263 Silence -Woverloaded-virtual warnings in QBlitterPaintEngine
QPaintEngineEx declares several virtual clip() overloads, but clip()
with no argument does not reimplement any of these. Rename it to
clipData() (to make the name of the return value more closely).

../../include/QtGui/5.0.0/QtGui/private/../../../../../src/gui/painting/qpaintengine_blitter_p.h:104:29:
warning: 'QBlitterPaintEngine::clip' hides overloaded virtual function
[-Woverloaded-virtual]
    inline const QClipData *clip(){return raster()->d_func()->clip();}
                            ^
../../include/QtGui/5.0.0/QtGui/private/../../../../../src/gui/painting/qpaintengineex_p.h:157:18:
note: hidden overloaded virtual function 'QPaintEngineEx::clip' declared
here
    virtual void clip(const QPainterPath &path, Qt::ClipOperation op);
                 ^

Change-Id: Ifd7c494e2c999d743216cfb4c27a9c3ccf66f2a9
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-12-12 15:34:14 +01:00
Shane Kearns
f74ff46c7a Fix NTLM authentication with email address
When using "user@dns-domain" for NTLM authentication, the whole string
should be sent as the username, and the domain should be set to an
empty string.
The domain sent by the server is still reflected if the username
does not contain an '@' character.

Manually tested using MS IIS on a domain-joined PC.

Task-number: QTBUG-19894
Task-number: ou1cimx1#949951
Change-Id: Ie1f81172e71cb7cce7b8c909062be990c24aea47
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-12-12 13:34:25 +01:00
Shane Kearns
b830c9cede Fix null pointer dereference in NTLM authentication
If NTLM authentication is required for the URL with an empty path,
then QNetworkAuthenticationCache::findClosestMatch(url.path()) returns 0.
e.g. "http://10.1.2.3".
Return a default constructed credential in this case.

Change-Id: I84ad3b308ee3f74fbbac9ad0f11dbdc66047b50b
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-12-12 13:34:11 +01:00
Andrew den Exter
d6fb4463b8 Delay masking the last character in Password echo mode.
If QT_GUI_PASSWORD_ECHO_DELAY is defined in qplatformdefs.h with an
integer value in milliseconds, QLineEdit and TextInput will display
the last character entered unmasked for that delay period and then
mask the character as normal.  If QT_GUI_PASSWORD_ECHO_DELAY is
not defined then the behaviour is unchanged.

Task-number: QTBUG-17003
Task-number: QTBUG-20719
Reviewed-by: Martin Jones
(cherry picked from commit f9e7aee2019d321edd655bfde7de43f20a106971)

Change-Id: If69b384636e3775ad7898b8ffc441011c21abe98
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-12 13:19:40 +01:00
Andrew den Exter
6e0e834e03 Fix TextInput test failures.
emitCursorPositionChanged won't emit cursorPositionChanged if the
cursor position hasn't changed but that doesn't mean the micro focus
hasn't changed, so emit updateMicroFocus changed when
cursorPositionChanged isn't.

Task-number: QTBUG-21017
Task-number: QTBUG-21011
Task-number: QTBUG-20719
Change-Id: I86344621151dbeba0eebc67fbc786a8da76b7021
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-12 13:19:34 +01:00
Andrew den Exter
28165d5446 Move cursorDelegate with the mouse selection of read only text input.
Task-number: QTBUG-20719
Task-number: QTBUG-19109
Reviewed-by: Martin Jones

Change-Id: I2cec51eb5b01dc5750614edf5b39d6a3da661fc6
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-12 13:19:28 +01:00
Andrew den Exter
734033e71d Make it easier to select words at the start of a line.
QTextControl's word selection will only include a word if the cursor
position is past the mid point of the word. This can make it
difficult to select words near the edges of the screen on touch
devices.  For the TextEdit word selection mode select a word ignore
the relative position within a word.

Task-number: QT-5206
Task-number: QTBUG-20719
Change-Id: I77e71e01d8021d66ada785cf894ba876faccefdf
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-12-12 13:19:13 +01:00
Laszlo Agocs
6f1c4fb342 Store the primary status in the touch point flags.
For some reason the primary bit has previously been encoded in the
touch point state, even though it has nothing to do with the regular
states like Pressed, Released, etc.

The value is now stored in the recently introduced flags member of the
touch points. This also reduces the need for error-prone internal
masking of the state value.

The structure used by QWindowSystemInterface::handleTouchEvent also
becomes cleaner because the primary status can now be set in the flags
member and the isPrimary bool can be dropped.

Change-Id: I1da2cb99154afd97e1e3a5943ab115cae3a8232f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-12 12:28:29 +01:00
Honglei Zhang
67be01ae50 Check driver validity before using it
Even though it is stated in the documentation that the SQL driver must
remain valid during the life time of QSqlQuery, there are users who don't
follow the rule. It's common that the destructor of QSqlQuery is called
after the driver is already deleted. This fix checks the validity of
the SQLite driver before QSqliteResult uses it in destructor.

Task-number: QTBUG-16967
Change-Id: If0f52113f12e14102da1671cd6e12bdaa267114f
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2011-12-12 10:43:44 +01:00
Friedemann Kleint
b9ebb65c77 Revert "Remove unused overload of QTest::qExec."
The overload is used in Qt Creator
(see src/libs/extensionsystem/pluginmanager.cpp).
The use case here is an application whose internal
QObjects can be tested by passing a command line parameter.

For this use case, it is inconvenient to have to allocate
memory and create a char argv[]- array.

This reverts commit ad80d42f8e.

Change-Id: I2a2f91e2840100fd62743f6d03b33005d67b18f8
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-12-12 10:43:44 +01:00
Bradley T. Hughes
77f41a68b3 Silence -Woverloaded-virtual warnings in QFileDialog
The QPaintDevice::init() virtual, reimplemented in QWidget, is hidden by
these declarations, and clang (and gcc with -Woverloaded-virtual) warns
about this. There is no need to overload the init() name, use more
descriptive names instead.

dialogs/qsidebar_p.h:124:10: warning: 'QSidebar::init' hides overloaded
virtual
      function [-Woverloaded-virtual]
    void init(QFileSystemModel *model, const QList<QUrl> &newUrls);
         ^
dialogs/qfiledialog_p.h:303:10: warning: 'QFileDialogLineEdit::init'
hides
      overloaded virtual function [-Woverloaded-virtual]
    void init(QFileDialogPrivate *d_pointer) {d_ptr = d_pointer; }
         ^
dialogs/qfiledialog_p.h:314:10: warning: 'QFileDialogComboBox::init'
hides
      overloaded virtual function [-Woverloaded-virtual]
    void init(QFileDialogPrivate *d_pointer);
         ^
dialogs/qfiledialog_p.h:330:10: warning: 'QFileDialogListView::init'
hides
      overloaded virtual function [-Woverloaded-virtual]
    void init(QFileDialogPrivate *d_pointer);
         ^
dialogs/qfiledialog_p.h:342:10: warning: 'QFileDialogTreeView::init'
hides
      overloaded virtual function [-Woverloaded-virtual]
    void init(QFileDialogPrivate *d_pointer);
         ^
kernel/qwidget.h:682:10: note:
      hidden overloaded virtual function 'QWidget::init' declared here
    void init(QPainter *painter) const;
         ^

Change-Id: I7a317a551b92fde966e61958dcaf25dea94d69b4
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-12 08:56:53 +01:00
Jason McDonald
c07b840739 Remove -keyevent-verbose option for autotests.
This option does nothing -- the only function that checks if the option
has been set is never called.  This appears to have been the case ever
since testlib was imported into the Qt repository in October 2005.

Change-Id: I837aa957e2d8bd47c3d1c551f1b94d4374daa25e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-12 08:50:55 +01:00
Jason McDonald
949aaf9a2a Stop using QTest::qt_snprintf() in testlib.
After the previous commit, QTest::qt_snprintf() is equivalent to
qsnprintf(), so just use that instead.

Change-Id: I89ad6e3749ba5efb1926b0b618a904e8baca9f52
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-12 06:43:44 +01:00
Jason McDonald
e179afdbb6 Improve definition of QTEST_NO_SPECIALIZATIONS
Remove the part of the definition that applies to gcc versions <= 2.x
as these versions are not supported by Qt5.

Change-Id: Icee6b51ffe78fa30fd7193ef96b6ce0484b8fcae
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-12 06:43:39 +01:00
Jason McDonald
c5ee721795 Filter unprintable chars out of all test output.
Previously, unprintable characters were filtered out of test output
while the output strings were being formatted by either qt_snprintf() or
qt_asprintf().  Any strings not formatted by one of those functions
weren't filtered at all, and any strings passed more than once would be
filtered more than once.

This commit separates the filtering of output strings from their
formatting, leaving the filtering until just before the strings are
written to the output stream.  For now, the filtering is done by a
protected method of QAbstractTestLogger, but this could easily be
changed to a virtual method in future to allow different filtering
for loggers with different output character sets.

Change-Id: Ia4bb49cd10d37c84af75d2cf58325d27f0e16d99
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-12 05:01:00 +01:00
Stephen Kelly
4c1f5edda6 Clean up includes in QStringListModel.
Change-Id: Idb7167d1206925179fa812b6e3643ed9172f8479
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-12 01:34:15 +01:00
Bradley T. Hughes
6f0f9f6928 Remove QMetaObject guards and deprecate QPointer.
QWeakPointer is superior and preferred.

Remove QMetaObject::addGuard(), QMetaObject::changeGuard(),
QMetaObject::removeGuard(), and QObjectPrivate::clearGuards().

Implement QPointer using QWeakPointer<T> instead. This changes the
behavior of QPointer in 2 ways:

- During destruction of a QWidget. Previously, the destructor of QWidget
would reset all QPointers so that they would return zero when destroying
children. Update tst_QPointer to account for this change.

- When constructing a QSharedPointer to take ownership of an object
after a QPointer is already tracking the object. Previously, the shared
pointer construction would not be affected by the QPointer, but now
that QPointer is implemented using QWeakPoiner, constructing the
QSharedPointer will cause an abort(). Fix tst_QSharedPointer by
removing the use of QPointer in the objectCast() test.

These behavior changes are documented in the QPointer class
documentation and in the changes file.

Change-Id: I92d0276219c076ece7bcb60f6e1b9120ce4f5747
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-10 16:11:48 +01:00
Bradley T. Hughes
a6ae75f92a Don't overload the meaning of QObjectData::wasDeleted
The union in QObjectPrivate of declarativeData and
currentChildBeingDeleted shouldn't use wasDeleted to determining the
meaning of the unioned pointer. Instead, add
QObjectData::isDeletingChildren, set that in
QObjectPrivate::deleteChildren(), and only use the
currentChildBeingDeleted member when the parent's isDeletingChildren is
set.

This solves aborts seen in autotests when widgets are deleting window
children. The abort comes from QWeakPointer on the parent in the child's
close event handler (the abort checks that wasDeleted is not set).

Change-Id: I1a58449159d4a5312aad8ba12e559d05d6c43d93
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-10 16:11:42 +01:00
Thomas Zander
fb8dc15ba6 Fix typo in APIDocs
The name of an enum was slightly misspelled in the API docs, so lets
make sure its now copy-paste friendly.

Change-Id: I5da5230ab29743b63bf238a379891c98ac9d5039
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thomas Zander <zander@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-10 10:19:49 +01:00
Stephen Kelly
d215bdfc52 Make headers safe with QT_NO_CAST_FROM_BYTEARRAY.
Change-Id: I0f9dfee505ebc48d9c586c010ad75877a7387836
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-12-09 18:31:08 +01:00
Laszlo Agocs
4471e45f74 Remove QWidget dependency from QTouchEvent.
QWidget *widget() is replaced with QObject *target().

Change-Id: Ib2c860480764410cf1527662e89f352ff688b32a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-09 16:36:00 +01:00
Laszlo Agocs
5da5230ab2 Remove event type parameter from handleTouchEvent.
Requiring platform and generic plug-ins to pass TouchBegin,
TouchUpdate, or TouchEnd is unnecessary. The type can be easily
deduced from the touch point states. In fact handleTouchEvent already
collected the combined point states, it was just not utilized until
now.

Change-Id: Icf3c787fefdebc51609a763bc4286c18a0b6aac2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-09 16:35:43 +01:00
Bradley T. Hughes
b986131c6d Correctly reimplement QPlatformCursor::pos() in QCocoaCursor
QPlatformCursor::pos() is a const function, the reimplementation should
be as well.

Change-Id: I7e37e41086e3b329dc31ebc060fcb0915771d884
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-09 14:15:37 +01:00
Laszlo Agocs
4222603f8e Extend touch events.
The capability flags indicate which information is valid in the touch
points. Previously there was no way to tell if e.g. the value returned
by pressure() is actually the value provided by the driver/device or
it is just something bogus due to pressure not being supported.

The points' flags return information about the individual touch
points. One use case is to differentiate between touches made by
finger and pen.

Velocity, if available, is now also exposed.

Each touch point can now contain an additional list of "raw"
positions. These points are not reported individually but are taken
into account in some way by the underlying device and drivers to
generate the final, "accurate" touch point. In case the underlying
drivers expose these additional positions, they are made available in
the lists returned by the touch points' rawScreenPosition().

The raw positions are only available in screen coordinates to prevent
wasting time with mapping from global positions in applications that
do not use this data. Instead, apps can query the QWindow to which the
touch event was sent via QTouchEvent::window() and can call
mapFromGlobal() manually if they need local raw positions.

The capability and device type information is now held in a new
QTouchDevice class. Each touch event will contain only a pointer to
one of the global QTouchDevice instances. On top of type and
capability, the new class also contains a name which can be used to
differentiate between multiple touch input devices (i.e. to tell from
which one a given QTouchEvent originates from).

The introduction of QTouchDevice has three implications: The
QTouchEvent constructor and QWindowSystemInterface::handleTouchEvent
need to be changed (to pass a QTouchDevice pointer instead of merely a
device type value), and each platform or generic plug-in is now
responsible for registering one or more devices using the new API
QWindowSystemInterface::registerTouchDevice.

Change-Id: Ic1468d3e43933d8b5691d75aa67c43e1bc7ffe3e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-09 14:15:37 +01:00
Frederik Gladhorn
6651e4fae3 Do not assert on invalid model index.
No need to crash here, just warn.
This will happen when asking a table for out of range indexes.

Change-Id: Ida83604bd587390a3b54fbed68f98dab8038c757
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-09 10:17:55 +01:00
Albert Astals Cid
f5f92c9fe7 Add support for three new X11 keys
New keys are: XF86XK_TouchpadToggle, XF86XK_TouchpadOn and XF86XK_TouchpadOff

Change-Id: I51c0330213def093adf959d4065ee6d7c1f66d76
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-09 10:17:55 +01:00
Stephen Kelly
4ebceaba39 Forward the contents of the parents argument through this proxy.
Change-Id: Ifabc2a7deec8ea045bf9a9f46fb3a97410dd33f2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-09 02:39:06 +01:00
Stephen Kelly
50ef3ae2f3 Notify about moves in the source model more efficiently.
Change-Id: I5ea2a2dddc1b39a3d2b405bda815f42df7c07c75
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-09 02:39:06 +01:00
João Abecasis
f8b290f8cd Remove wacomcfg.h from 3rdparty
The last reference to this file was removed in commit a2337f79.

With the new QPA architecture there is no longer a reason why this
should be needed in qtbase.

Change-Id: I84765eca066fd6bdd1dabac32e866c58a39fe183
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-09 01:01:01 +01:00
Stephen Kelly
8021e2d5e7 Remove the backwards compatibility signal emissions when moving items.
Change-Id: I29a44835d3397c1dbf37026daf0c5234dae770e0
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-08 23:22:39 +01:00
David Faure
757ef710d8 QTemporaryDir/File: cleanups (static internal function, QScopedPointer)
Change-Id: I61311d151e2ae94a22df58297bbfb7a636a01c4a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-08 18:28:31 +01:00
Robin Burchell
ee18d6ea1f Merge QColorDialog::getColor() overloads.
Symbian-specific code was removed as a side effect of the merge.

Change-Id: I01d28b2aa2fef16ce3988382c2b2a0436c46227c
Reviewed-by: John Brooks <john.brooks@dereferenced.net>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-12-08 17:59:55 +01:00
Morten Johan Sorvig
1a218a7ee1 Cocoa: remove autoreleasepool in QCocoaIntegration
This one was far to long lived and would delay
releases until application shutdown.

We might get more "no autoreleasepool in place"
warnings now, these should be fixed by adding local
auto release pools.

Change-Id: Ia7a46ab05fb1937154997d0c47b8899d2a0cef65
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
2011-12-08 12:46:08 +01:00
Robin Burchell
e79b9d6a36 Remove unused QMapData::createData()/node_create() overloads.
Change-Id: I79010e1ecfdfe579d996db65681ab1559598f3ce
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-08 08:51:35 +01:00
Frederik Gladhorn
1e37a053ed Create a class to contain accessibilty enums.
This is needed in order to expose the enums to qml.
Do not inherit QAccessible.

Change-Id: I220a0ea3add2d790e4fa6e93ce3deda762859e1a
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-08 08:51:35 +01:00
Kent Hansen
59fb032839 Avoid variable shadowing in qobject_impl.h
Some people like to build their Qt-based projects with -Wshadow
-Werror, and since qobject_impl.h is included from a public Qt
header, their build breaks.

Change-Id: I5d8a5ee1937092149a18c0ff66a723f5bfc9ffc3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-08 07:05:54 +01:00
Jason McDonald
ad80d42f8e Remove unused overload of QTest::qExec.
The overload of QTest::qExec() that takes a QStringList is not used
anywhere in Qt's autotests, despite having been in the qtestlib API
since Qt 4.4.

This lack of use most likely derives from the fact that none of the
QTEST_MAIN macros use the overload, and more than 99% of Qt's tests
use those macros to avoid explicitly calling QTest::qExec().

Change-Id: I264b21d7fe1a9f2d565f748cf8bbe32414a73bb0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-08 03:04:55 +01:00
João Abecasis
479fc3e49c Remove ptmalloc from source tree
This malloc-replacement library is marked experimental and disabled by
default. It is also Unix-only.

On linux (GNU C library, actually) ptmalloc graduated to become the
native allocator, according to its webpage (http://www.malloc.de/en/),
making the need to have a copy here significantly lower.

Anyway, there is nothing preventing interested parties from adding this
library to their own setup and very little value in keeping it around in
qtbase.

Change-Id: I2b1c798ca38b59bb767b44d6e5190080ec6ecdf4
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-08 01:06:22 +01:00
David Faure
2aea665194 Add "see also" links for QPrinter::{get|set}PageMargins
Change-Id: Ie1ec9cf3740818c71a7afbdec2c99f5fa0e81337
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-07 18:58:43 +01:00
David Faure
ab3c4a06c6 Remove unused include
Change-Id: Idec12079fdc7ad29e780b537577050f01d8d076c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-07 18:58:43 +01:00
Martin Petersson
44bd7c66e2 QNetworkAccessManager: check the buffer size before allocate
The downloadBuffer size should not be larger then the
downloadBufferMaximumSize. I also added a try catch for the allocation
incase we are low on memory, so that we don't crash.

Task-number: QTBUG-23040
Change-Id: Ib9820bc19fc5db994ede20f123f8c167a8d43ff7
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-12-07 16:27:37 +01:00
Friedemann Kleint
ebfdb73b75 qtbase: Remove QSound.
Which currently causes tests not to compile on Windows
due to missing symbols in QtWidgets (QSound::QSound() ,etc).

Change-Id: I87f0a403e61c3a67f9a758f114e33db1012e33e8
Reviewed-by: Michael Goddard <michael.goddard@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-07 14:37:41 +01:00
Richard Moore
2757a5fe8c Check we're connected before startClientEncryption()
The docs say this is required, but we don't check it and instead
segfault right now.

Change-Id: I825b00a312a481c5383af127333c0c4698188348
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-12-07 12:55:28 +01:00
Samuel Rødal
bab5329437 Better handling of GLX / EGL errors.
If context creation fails, try again without a shared context. Added
QPlatformOpenGLContext::isSharing() and
QPlatformOpenGLContext::isValid() to propagate whether the platform
context was successfully created with or without sharing.

Change-Id: I37080b645f531fd207946441057be6d3f6be3f6e
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-12-07 11:15:28 +01:00
Morten Johan Sorvig
77fb1c71bf Accessibility: Add Text::DebugDescription
Useful for debugging QML accessibility.

Change-Id: I814c64bcc4c6b534666adca5865b1588e4d13f44
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-12-07 11:15:28 +01:00
Lars Knoll
33fe499d47 Remove the hacks for having QxmlStream in core and xml
QXmlStream was moved from QtXml to QtCore for Qt 4.4.
Remove all the hacks that we added to support that move
in a binary compatible way.

Change-Id: Iea348e980b8efce322d5a7510e5b3ab5c3a108ce
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-07 09:33:47 +01:00
Stephen Kelly
dc8fa99b2b Use VERBATIM where needed in macros.
Forward port of fix for http://cmake.org/Bug/view.php?id=12554

Test fails before and passes after.

Change-Id: I7a3ab2369cb3095c63f9e2a3e604088ebdcc2465
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-07 03:17:25 +01:00
Holger Hans Peter Freyther
f091eccf91 directfbegl: Add unimplemented QDirectFbWindow::eglSurface, build fix
QDirectFbScreen needs to have the full QDirectFbCursor definition, include
the header file directly instead of a forward declaration.

Impelement QDirectFbWindowEGL::eglSurface to return the EGLSurface of the
underlying DirectFBWindow.

Change-Id: Ib6765331ffea6e0b5f10f738d9e05320b7f8155f
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-12-06 20:14:10 +01:00
Jyri Tahtela
2711230757 Executing 'make install' did not build mkv8snapshot
During shadow-building it was noticed that executing make install
did not actually build mkv8snapshot and therefore caused an error.

Change-Id: I126cdbaffb85170e25412b93bc99af79ac6f4642
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-12-06 18:37:54 +01:00
Stephen Kelly
e8f27a71bb Port to CMakeParseArguments from a custom rolled macro.
Change-Id: Ia7bf5046420ee8f2d690d098937a212eb75b07ce
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-06 16:57:16 +01:00
Stephen Kelly
38ca60985e Now that qt5_automoc doesn't exist, this macro is not needed.
Change-Id: I4746ed5ba41fba801599f443d1214e1744807e20
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-12-06 16:56:18 +01:00
Gunnar Sletta
6ddcdee120 Ask for a context that is likely to be supported.
Most embedded GL chips support 24-bit depth with packed
8 bit stencil, but more rarely 32-bit. Asking for 32
bit means we often fail on other properties to, such as
multisampling.

Change-Id: Ib913d94af0635b09913ff15cff54cc694ba293fc
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-06 08:40:25 +01:00
Jason McDonald
7ac3d7c5c1 Remove obsolete autotest parameters.
Previously, autotests silently ignored the -graphicssystem and -qws
parameters so that test-runners did not need to include logic to decide
whether to pass those parameters depending on whether a particular test
was a GUI test or a non-GUI test.

In Qt 5, both of those parameters have been removed from QApplication,
so tests don't need to ignore them anymore as they should no longer be
supplied to any test.

Change-Id: Ic59e38ddfa3303e760645ed1782a211340ce70f2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-06 05:04:25 +01:00
Jason McDonald
e3640d1bdd Remove TESTED_CLASS/TESTED_FILES comments from tests.
These comments were mostly empty or inaccurate.  Appropriate naming of
tests and appropriate placement of tests within the directory tree
provide more reliable indicators of what is being tested.

Change-Id: Ib6bf373d9e79917e4ab1417ee5c1264a2c2d7027
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-06 02:19:25 +01:00
Bradley T. Hughes
e2d5c06e1a Fix QT_DEPRECATED_SINCE evaluation
QT_DEPRECATED is defined by default by the logic in qglobal.h, but
QT_DEPRECATED_SINCE is evaluated before that definition, making
QT_DEPRECATED_SINCE evaluate to 0, disabling all deprecated code (even
though it shouldn't be disabled).

Fix this by moving the QT_DEPRECATED_SINCE evaluation to after the
evaluation of QT_NO_DEPRECATED and/or definition of QT_DEPRECATED, to
ensure that QT_DEPRECATED_SINCE works as expected.

Change-Id: I57d9f6a3e1859b0057fd4f37bcf2d2cc3dfba230
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-05 23:03:16 +01:00
Bradley T. Hughes
2c9d042476 Re-add QInternal::EventNotifyCallback
This is needed by QtScript, so we need to keep it for now.

Change-Id: Iee6bd7daf7e86a09242523f5aca72ede413a6981
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-05 23:03:03 +01:00
Friedemann Kleint
097a3f4231 qpixmap_win.cpp: Fix typo in format conversion (alpha).
Change-Id: I8abdae5482e94a7f9af494e5d547352431285336
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-05 15:08:25 +01:00
Holger Hans Peter Freyther
7beed86493 v8: Introduce MIPS code for the QML code
Copy and paste the ARM code into the MIPS dir, there is no lithium
support in MIPS right now.

Change-Id: I21491d36da2a4ac4cb6898c47b0e5bd37a733b41
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-12-05 12:29:42 +01:00
Holger Hans Peter Freyther
30a5928e2a v8: Attempt to fix a typo in the commit message
is resolve -> is resolved

Change-Id: I95a6072be63e353bafdafccc404e90d331a01894
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-12-05 12:27:58 +01:00
Holger Hans Peter Freyther
ddc580643b mips: Really build the MIPS V8 code
2008d2d40e was not rebased properly and
should have used the V8_TARGET_ARCH to add the MIPS code to the build.

Change-Id: Idf0c183fca63da0fa9f9aa8d091a764b88c888f5
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-12-05 12:25:07 +01:00
Stephen Kelly
bae85d2f0e Fix typos in Sqlite docs.
Change-Id: I4a57e9e37831c135b1ad620c8c9586a5eea76220
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2011-12-05 10:48:37 +01:00
Jiang Jiang
25be03f046 Remove unused Mac specific font code in widgets
Change-Id: If7a81b8b59aedcc0ba54c735787a220bab9ca535
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-04 23:39:42 +01:00
Jiang Jiang
d05b6b6e95 Remove QCoreTextFontEngineMulti
It's not used anymore since we have switch to HarfBuzz on Mac.

Change-Id: I68252fbe3021f54dacac5a901184c3f3e541a6b7
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-04 23:39:38 +01:00
Jiang Jiang
6887a7e395 Enable subpixel rendering for raster on Mac
Change-Id: I06e6465e03c17776974d361254abf5b750736080
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-04 23:39:34 +01:00
Stephen Kelly
7d2ab7f01d Move the metatype declaration for QGraphicsScene.
From where it is forward declared to where it is fully defined.

Change-Id: Ie2240ffef6d1edbbbd5b193f9528ef94ef412d82
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-04 20:45:49 +01:00
Frederik Gladhorn
298f8b67ab Remove unused enum values.
These were used for foreground/background color.
Since we have proper functions for these two now,
the hack with invoke_method is no longer needed.

Change-Id: I66eb645124caa838adb1ceb41383a2724a45f553
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-12-04 17:29:09 +01:00
David Faure
e999c543a0 New class QTemporaryDir.
As discussed on qt5-feedback / development lists.

Change-Id: If1733369d12daa29054776ec2cbd78e63679768e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-02 21:04:34 +01:00
Bradley T. Hughes
ad8edac53c Remove QInternal callbacks and internal functions
After commit 79f675a1e0, the connect and
disconnect callback API effectively becomes useless. Now that these
callbacks cannot/do not, it makes little sense to keep the backdoors
added for Qt Jambi support.

Remove them for now. Should the Qt Jambi team want/need to port to Qt 5,
we can re-add them, possibly designing a better API for doing so as
well.

Change-Id: I6209a1d647d683c979d5294b632b8c12c0f9f91c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-12-02 15:59:58 +01:00
David Faure
1bb51cb8b1 Implement QDir::removeRecursively
Task-number: QTBUG-4592
Change-Id: I363e2c24d1c0ada975b8b927d7c6e776b8aae579
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-12-02 15:59:58 +01:00
Honglei Zhang
8c74fe5c7a QSqlRelationalTableModel doesn't follow relations on the first column
QSqlRelationalTableModel doesn't follow relations on the first column
of a table. The DisplayRole and the EditRole for indexes on column 0
are always the same. The bug is found in QSqlRelationalTableModel::data.

Task-number: QTBUG-20038
Change-Id: Ie1e98b5f46ffc171113f2d51b9b19ff5febb1c3c
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2011-12-02 15:59:58 +01:00
Gunnar Sletta
35a9e53dea Added minimal class docs for QWindow to make it visible.
Change-Id: Ibed2279ba5454547fb4060005e805a11221b3732
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-02 15:59:58 +01:00
Bradley T. Hughes
409b3b42a2 Remove cast and assignment operators from QAtomicInt and QAtomicPointer
This is a source incompatible change. There is concern that the
convenience of the implicit cast and assignment operators can lead to
misuse. Several commits have already been done that remove excess use
of the implicit cast, which is a *volatile* read every time it's used.

Users of the QAtomic* API should have to think about when they are
loading the value, and if they do or don't need the acquire memory
barrier on load. The code that people would write using this API is
meant to be multi-threaded, concurrent, and correct. The API should not
allow them to inadvertently, possibly unknowingly, shoot themselves
in the foot.

SC-break-rubber-stamped-by: Lars Knoll

Change-Id: I88fbc26d9db7b5ec80a58ad6271ffa13bbfd191f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-02 13:21:32 +01:00
Morten Johan Sorvig
3a72240d86 Cocoa: Handle accessible interface children.
Implement AccessIbleChildrenAttribute and
accessiblityHitTest.

Change-Id: Ia9fa80e3015edbb969d173a2587cb53b9c69852e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-12-02 11:13:15 +01:00
Jan-Arve Saether
1efa30b7ef Don't inherit QAccessible from QWindowsAccessible
Qualify all references to QAccessible members with QAccessible::

Change-Id: Ia78d8482bbab3d77c9e258a52bc74f8e7c0c7e10
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-12-02 11:11:24 +01:00
Jason McDonald
2a3738265a Update documentation for QTest::qExec()
Update the documentation to make it clear that regular test applications
should not call QTest::qExec() more than once.  Also minor rewording of
description of return value.

Change-Id: I45bdf520ed10fd3c9232847a0ec0bc2b32d4caf3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-12-02 08:23:13 +01:00
Frederik Gladhorn
0d7cc00c07 Clean formatting.
Remove extra spaces, remove virtual keywords.
This code was simply inconsistent with the rest.

Change-Id: Iec8e9542dd4c458ddd535cb1766c90c18051686a
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-12-02 08:19:58 +01:00
Frederik Gladhorn
04c65c2454 Accessibility: table2 -> table
Rename the new interface after the old one has been removed.
This interface is very close to the IAccessible2 Table2 interface.

Change-Id: I8659232189fe0e8307151c743727de425c30ac9a
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-12-02 08:16:44 +01:00
Martin Jones
9b17557f3b Revert "Add QObject::objectNameChanged(const QString &objectName) signal"
This reverts commit ba635d7e74.

Breaks tests in declarative:
tst_qdeclarativeecmascript::deleteLater
tst_qquickvisualdatamodel::objectListModel

Change-Id: I467b45109332e66fc62f3de00f376b1b88ab19ca
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2011-12-02 06:03:12 +01:00
Holger Hans Peter Freyther
6534898cc6 directfb: Introduce EGL integration for DirectFB
Introduce a new platform called 'directfbegl' that allows platform
integration with EGL. Change the QDirectFbIntegration to make it more
easy to hook up in the creation process, introduce an EGL integration
with custom screen, window and EGL Platform Context.
Vendors might need to add custom code to initialize EGL to be used with
DirectFB, this can be done in QDirectFbScreenEGL::platformInit.

Change-Id: I7bee277ede27c72437cd7c5977fa6ed85e65f538
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-12-02 00:08:32 +01:00
Holger Hans Peter Freyther
614bb9c085 directfb: Use QT_BEGIN_NAMESPACE/QT_END_NAMESPACE around the code
Change-Id: Iabf32130dcfe4f5a383e9c99f661ded176432817
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-12-02 00:08:32 +01:00
Holger Hans Peter Freyther
3d07ef1d0c directfb: Move the macro to the qdirectfbconvenience header file
We will need to have logging outside of the blitter code, make the
macro available to everyone.

Change-Id: I811ecb98a870a818630276b5daa788790db71ccd
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-12-02 00:08:32 +01:00
Frederik Gladhorn
9e09b8dc48 Remove action enum.
This is a left over from the old way of
handling accessibility actions.

Change-Id: I1146f3dfec2b842f83a3cdd264e4ebb1013cc517
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-12-01 20:52:08 +01:00
Frederik Gladhorn
dd02fcd711 Make cell a proper QAccessible2Interface.
Change-Id: I9b245037e8448f39ed2cb80d1ef5fb0714173518
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-12-01 19:18:34 +01:00
Holger Hans Peter Freyther
2008d2d40e v8: Be able to build V8 for MIPS
Add mips to the list in configure and the v8.pri, build the existing
MIPS files. The result has not been verified to work.

Change-Id: I0f4fd29cd9752d32b6d87e0df0e888822f40ac0a
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-12-01 17:46:57 +01:00
Bradley T. Hughes
ba635d7e74 Add QObject::objectNameChanged(const QString &objectName) signal
This is sent when the object's name changes.

tst_moc must be updated since the method count of QObject has changed.
The test assumed that there were 4 invokable methods in QObject. The
new signal is the 5th, which breaks the test's assumptions. Fix this
as well.

tst_QObject must be updated since the
QObjectPrivate::isSignalConnected() method only supports the first 64
signals. With the addition of this new signal, sig61() in the test
becomes the 65th signal, and will always appear connected now.

Task-number: QTBUG-13999 (related)
Change-Id: Ie87893c71a231fafa7ccf2f16102238a7be8327a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-12-01 17:46:57 +01:00
Shane Kearns
1a52819c70 Fix QTcpServer::serverAddress() for dual stack sockets
When listening on QHostAddress::Any, serverAddress() should return
QHostAddress::Any too, assuming that setting the socket options
was successful.

Task-number: QTBUG-22899
Change-Id: I50a9ff1b4ad0c1c1905e2952c595d7068df2627d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-12-01 15:58:57 +01:00
Jędrzej Nowacki
e650859dc9 Improve Q_CONSTRUCTOR_FUNCTION and Q_DESTRUCTOR_FUNCTION macros.
By adding anonymous namespace and static linkage we are reducing
visibility of implementation of these macros.

This patch also fixes warning about a declared but unused variable which
was issued by gcc 4.6 for Q_CONSTRUCTOR_FUNCTION.

Change-Id: I2cb70ad4c93f6f77e5518420abcce6fd4cadccfa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-12-01 14:35:42 +01:00
Gunnar Sletta
389538c2e7 Fix image format use in cocoa plugin
The screen should be opaque. It is used to create the
default pixmap data which should be RGB32 on mac.

The backing store uses premultiplied in the resize but
initializes with non premultiplied. Unify this to all
premultiplied

Change-Id: I7d17d492fcff30b555a768da852ff9be0a9d96aa
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-01 12:34:16 +01:00
Jiang Jiang
c5383f2e49 Add QRawFont from data support to Mac font db
Change-Id: I02f1c4b35b9ed585e72aa4bad9b75d3c098f8e62
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-01 10:51:10 +01:00
Jiang Jiang
f8725f2c8d Set supporting writingSystem correctly
Change-Id: I963aa7b69a48441619c5885c443ae2620fcc4e57
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-12-01 10:51:10 +01:00
Friedemann Kleint
8f2da7cd63 Polish QWinEventNotifier.
Fix docs, remove redundant Q_DISABLE_COPY.

Change-Id: I8398fb71bced5ac6f7eb8613cd2f8d10c325f056
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-12-01 10:51:10 +01:00
Holger Hans Peter Freyther
f1a67c6531 opengl: Do not crash when programGuard is a nullptr
The rest of the code is checking programGuard for nullptr, do it here
as well to prevent a segmentation fault.

Change-Id: I38a03f74d493b8f731157be1739707b39904f7ba
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-12-01 10:51:10 +01:00
Samuel Rødal
89aee9ecde Added QPA window system interface handler for logical DPI changes.
Logical DPI is independent from geometry and physical DPI.

Change-Id: Ice487f61e1bda9e6791e2adf6998ebf61cdbaef2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-12-01 10:51:10 +01:00
Rohan McGovern
8481369f3d testlib: add QFINDTESTDATA macro for finding testdata files
Automated tests often need to load some data from external files.
Currently, a wide variety of approaches for this have been used in Qt
autotests, including:

  - embed the source directory into the test binary at compile time, and
    find the testdata relative to that; this fails when the source tree
    is no longer available (e.g. when the tests are deployed to a device).

  - use a path relative to the current working directory, and trust that
    the caller always sets the current working directory such that the
    testdata can be found; this fails when the caller uses a different
    working directory than expected.

  - use a path relative to QCoreApplication::applicationDirPath();
    this fails when source tree != build tree (since testdata is not
    automatically copied into the build tree).

  - compile the files into the binary using the Qt resource system; this
    should work, but does not allow for testing of code which genuinely
    needs external files.

It seems that there is not a simple method for determining the testdata
path which can be reliably used in all circumstances, so various tests
have reinvented the testdata location method in different ways.
Therefore, this is a good candidate for an addition to the testlib API.

The current implementation of QFINDTESTDATA is able to find testdata
in all three of (build tree, install tree, source tree), in that order.

Change-Id: Ib2fed860723ccf437240da3b00db22dfe1a6b56c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-12-01 09:12:57 +01:00
Jiang Jiang
13eba9ddf4 engineData should be cached solely based on QFontDef
Each QFontPrivate points to a QFontEngineData instance, which is
essentially a mapping from different scripts to QFontEngines. Let's
say we have QFont("Waree") and trying to use that for one text in
Thai and another text in English, there should be only one
QFontEngineData: [ QUnicodeTables::Common -> QFontEngineMulti(1),
QUnicodeTables::Thai -> QFontEngineMulti(2) ]. If we cache
QFontEngineData using QFontCache::Key (which includes QFontDef,
script and screen) as the key, then we will create two
QFontEngineData: [ QUnicodeTables::Common -> QFontEngineMulti(1) ]
and [ QUnicodeTables::Thai -> QFontEngineMulti(2) ], so it will be
pointless to have QFontEngineData at all.

This bug was introduced in a 2005 refactoring (512f0e8c in history
repo).

Change-Id: I14677507e97682472cde9a0e1b594e903ec9e718
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-12-01 09:12:00 +01:00
Debao Zhang
7f64c3ddc8 Make QWinEventNotifier part of the public API
QWinEventNotifier is an essential class if you're using native Windows
Overlapped IO and need to convert it to Qt signals. However the header
is marked private.

Task-number: QTBUG-68

Change-Id: I22e9a84da97f969ddb82e9ba15e604a01abd80d0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-12-01 02:01:44 +01:00
Bradley T. Hughes
53a420a4d1 Merge QObject::tr*() and QCoreApplication::translate() overloads
These were marked as TODO items for Qt 5. Do them now. (The TODO item
was added when plural support was added back in the early Qt 4 days.)

Change-Id: I3be50bc657582db730401103d691234695784340
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-30 22:28:02 +01:00
Shane Kearns
49140efe2d Fix QHostAddress::operator==(QHostAddress::SpecialAddress)
QHostAddress(QHostAddress::Any) was not equal to QHostAddress::Any
because only one of the operator== overloads was handling this.

Task-number: QTBUG-22898
Change-Id: Ifd36947a50e8c36362b4e850fd8d5105ee0925ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-30 19:04:18 +01:00
Samuel Rødal
6468dd4179 Made more QScreen properties NOTIFY and added average DPI properties.
The physicalDotsPerInch() is the average of the horizontal and vertical
physical dots per inch, and likewise logicalDotsPerInch() is the average
of the horizontal and vertical logical dots per inch.

Change-Id: I18aa610dc9a63efe062f78c823ba29f90b2712f4
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-11-30 19:04:18 +01:00
Olivier Goffart
cc9c85ecd6 Support for up to 6 arguments in the new connection syntax
For compilations without variadic template support

Change-Id: I78af4f6022ad7a0923e5c5788a34eb7d834f50f3
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-11-30 17:19:07 +01:00
Jiang Jiang
a80a8b4703 Mac Core Text font database for QPA
Add Core Text fontdatabase for Mac and use it as default. It also
reenabled Core Text font engine for native font rendering on Mac,
though it's not used in declarative UI (by default declarative
will still use scenegraph, which will only use this font engine
for retrieving font metrics and outlines).

With the new fontdatabase it's now possible to load all the fonts
installed in the system as well as adding application fonts.

Change-Id: I0d2aa1420019adf6d0f70dd147a9d71b2684d3f1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2011-11-30 13:56:22 +01:00
Honglei Zhang
d34170aff2 Fix sqlite driver memory eating due to close failure
If an ongoing query is not finalized before close function is
called, sqlite driver still tries to close the connection to
sqlite. In this case, sqlite reports an error to sqlite driver
which is not reported to the client. The failure in close causes
connection to sqlite unclosed and memory is not freed. This
fix tries to finalize all queries before close function is called.
The close function should succeed.

Task-number: QTBUG-16967
Change-Id: I2f10a2a9017446a9d44b693b00464a89625e3602
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2011-11-30 13:53:24 +01:00
Zeno Albisser
5fb239e8a3 Include qglobal.h first in qnsview.mm compilation unit.
If cocoa headers are being included first, this messes up
the defines MAC_OS_X_VERSION_MAX_ALLOWED and MAC_OS_X_VERSION_MIN_REQUIRED
when compiling with clang.

Change-Id: I07177d07a0ac7c5f7e72b04f42d6343e689e0d33
Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2011-11-30 13:53:24 +01:00
Jan-Arve Saether
84e66f69ae Fix casting. Casting is now done through the virtual interface_cast.
Change interface_cast to return void* to avoid using virtual
inheritance.
Get rid of the magic Q_ACCESSIBLE_OBJECT macro.

Change-Id: I94b824aef53f2ba657d39d406b387c8681d47ee4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-11-30 12:12:08 +01:00
Olivier Goffart
55b974faa1 Fix Qt::QueuedConnection when signal has a return value
For queued connections, the args[0] is set to null as it make no sens to
forward the return value to the signal.
So we need to check in the operator, that the pointer is not null.
(container.data is args[0])

Change-Id: I80bde66f1ec19de0f4962c80e5b2797d2819075c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-11-30 01:04:12 +01:00
Jędrzej Nowacki
fa7f690178 Fix a deadlock in QMetaType.
QMetaType should unlock all mutexes guarding custom types data before
calling an user code.

Task-number: QTBUG-22930
Change-Id: I501d011d6cbd467d8f22402d668e84aa848061b8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-29 23:17:13 +01:00
Friedemann Kleint
8dca04f47f QByteArray: Fix MSVC warning.
Warning C4308: negative integral constant converted
to unsigned type.

Change-Id: Ibdb14ad2ceebd56715fda861151e92f6dc10f955
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-29 20:48:19 +01:00
Frederik Gladhorn
f80d71aceb Accessible debug stream: don't print details for invalid objects
Print "invalid" instead of the details.

Change-Id: I785a896b680fad9e9bb81769d9e3361542fbaafe
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-11-29 18:47:14 +01:00
Olivier Goffart
0dec6250f7 Support Qt::UniqueConnection in the new connection syntax
This commit also improves the related documentation a bit.

The test is copied from the test with the old syntax, but all the
connection statement are changed to use the new syntax

Change-Id: Ia5630ca4335b9f8ca6d724ae3c8750d6f0804d8e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-11-29 17:11:59 +01:00
Olivier Goffart
8350d91245 Reduce code dupplication in QObject::connect
Move from each implementation of QObject::connect to
QObjectPrivate::addConnection the code that adds the
QObjectPrivate::Connection* to the sender's list.

Change-Id: I665af016d5e6673eb0e9c06965e5deed50454b28
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-11-29 17:09:32 +01:00
Olivier Goffart
1c5db1aff3 Initialize the return value of signals
Before, the constructor was called for complex objects, but
POD were left unitinialized. Now, they are zero-initialized.

Also add test for return values

Change-Id: Iff9bf6687589d7b7395a71fb6f650ab8aa2b6bd1
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-11-29 17:08:39 +01:00
Olivier Goffart
ed0b262de9 QObject::disconnect with new syntax
This add an overload to disconnect which is symetrical to the new
syntax of connect.

It is possible to diconnect connection like this:

QObject::connect( sender, &Sender::valueChanged,
                  receiver, &Receiver::updateValue );
QObject::disconnect( sender, &Sender::valueChanged,
                     receiver, &Receiver::updateValue );

This overload only work with pointer to member function, and not static
functions or functors.

The test is copied from tst_QObject::disconnect(), just
changed the syntax of the connection and disconnection

Change-Id: Ia8f819100cb12098e32877522b97b732b1e676a8
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-11-29 17:08:39 +01:00
Stephen Kelly
a482487b9f Install CMake config files from Qt.
This includes a BSD licenced file Qt5CoreMacros.cmake which is
adapted from Qt4Macros.cmake in the CMake source tree.

Change-Id: I54326b808795535490a0489659b351a8da72cdbb
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-29 17:08:39 +01:00
Samuel Rødal
3aeeb53d73 Prevented Xlib sequence errors in xcb plugin.
Prevent Xlib errors of the form
"Xlib: sequence lost (0x2716a > 0x1717c) in reply type 0x11!" from
being printed. We know the cause of these is because we're manually
calling the XESetWireToEvent handlers since those are not handled by
XCB, and this confuses Xlib since it's then seeing events with old
sequence numbers. We simply set the sequence number to the latest
sequence number and the errors go away.

Change-Id: I2a9e7a7cfd0ba8692e43ce61f796a8189305e0d3
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
2011-11-29 14:00:01 +01:00
Johannes Zellner
6366a3186a Remove QPlatformPrinterSupport usage
QPlatformPrinterSupport seems to not exist anymore.

Change-Id: I142ce99877620e0b678fd6693bc72257ca230e4f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-29 14:00:01 +01:00
Samuel Rødal
4db95ffd7d Added screenChanged() signal and handle screen destruction in QWindow.
It can be useful to get a signal when the QScreen changes, for example
when having bindings to QScreen properties in QML.

Change-Id: I919dd12c656485b28b393aec5eedac4c01593afc
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-11-29 14:00:01 +01:00
Richard Moore
3d3fdcd3a5 Make the default ssloptions testable.
Centralise the specification of the default ssloptions to make the code
clearer and more testable.

Change-Id: I4f4bae72736dd063ee4cd64c6375e82d0600a105
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2011-11-29 14:00:01 +01:00
Jędrzej Nowacki
79923f5b32 Redefinition of QVariant::Type.
QVariant::Type is redundant, it copies QMetaType::Type enum. In long
term it might be removed completely, but it wouldn't be a source
compatible change.

Change-Id: Ibe79ca0ab43918b4cf767cd7a5040f865abbf03f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-29 14:00:01 +01:00
Friedemann Kleint
602cab9bb2 QtGui: Fix a crash in OpenGL on Windows.
Add missing WINAPI calling convention for QOpenGLFunctions.

Change-Id: I43827d801c5ecc3859d8d4ba0bb9bccc108880e7
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-29 12:27:38 +01:00
Friedemann Kleint
3ec60ca51b QtCore/IO: Fix some warnings on Windows (64bit).
- Warnings about conversion from size_t to int
- Unused variable.

Change-Id: I4a79fa6dc4b95551a64d282ae4307b0edff41201
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-29 08:52:59 +01:00
Kent Hansen
0f1d936998 V8/arm: Add relevant float defines
CAN_USE_VFP_INSTRUCTIONS implies arm7.
This is the only arm configuration we currently support.
These defines also ensure that a suitable snapshot is generated
when cross-compiling (i.e., when using the arm simulator).

Change-Id: I3a8a4224b9127a549b3987bcf5651ed1ffb8079a
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-29 08:52:59 +01:00
Bradley T. Hughes
82ffc353db Remove obsolete QMetaObject::activate() overloads.
The overloads taking a range were previously used for cloned signals
(ones that had default arguments). Commit
919b723088b8617b202b92d80b8d0983e4fd9500 changed how cloned signals are
handled, making the from,to overloads obsolete.

The 3 argument activate() overload that does not take a QMetaObject
argument was marked obsolete by the same commit, but considering that it
is used by our autotests, I've decided to keep it and not mark it as
obsolete anymore.

Change-Id: I631ce84dce156dec68cf26e10787cb35e3f50e18
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-29 07:22:59 +01:00
Toby Tomkins
e881f4f5fd Fixed Qtbase OSX specific namespace compilation.
Change-Id: Idacfa679df7aa6417f8017f80928907830d15df2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-29 03:44:58 +01:00
Jędrzej Nowacki
a291519e3e Fix a small memory leak in QXcbIntegration.
Prefer to use a smart pointer over a raw pointer.

Change-Id: If8b5cbef8767433eab2f82c14abaa9608b8e61d0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-29 01:53:38 +01:00
Jędrzej Nowacki
b36a40ac0d Fix documentation for QVariant::Type enum.
QPolygonF was missing. QPointArray doesn't exist anymore.

Change-Id: I764508f67d859c8519b44a6a1ee19d1f96ebe1cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-28 18:47:32 +01:00
Jędrzej Nowacki
50995e6936 Fix clang warning about bool to pointer conversion.
The operation is legal from C++ perspective but only for "false" as it
is guaranteed to be 0. Anyway returning 0 instead of "false" is
logical and it follows coding style used in the modified functions.

Change-Id: Ia09758e8d28599097f5c40eb24722890508afdbc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-28 18:47:32 +01:00
Friedemann Kleint
8b12b566db Fix linking of the QObject test under Windows.
Change-Id: Iced5a37893969f555f39d3f4683b32ca2a399365
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-28 16:59:09 +01:00
Friedemann Kleint
b8d330904b QtGui: Bring back HBITMAP/HICON conversion functions.
- Move the conversion functions from the Lighthouse plugin
  to QtGui as qt_pixmap/From/To/HBITMAP/HICON().
- Re-enable them in Widgets (QFileIconProvider, QWindowsStyle).
- Use them in QtPrintSupport.

Change-Id: I1436bc604160d94c78ef270ad2b31bf3b20b5c90
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-28 16:57:58 +01:00
Jørgen Lind
f6c107d799 Make input events work for widgets on wayland
Wayland windows does not know about their position

Change-Id: Ia37dd0fe6e33073eeeba22c88da9bd4bcad5421f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-28 16:57:58 +01:00
Friedemann Kleint
45aa0a219a Add comment to the obscure initialization of QOpenGLFunctions.
Change-Id: I9386c0e3b158a675e2dcbce34eecb57edf0ac27b
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-28 15:08:01 +01:00
Stephen Kelly
abbd35f9b9 Remove network module from widgets dependencies.
QtWidgets does not depend on QtNetwork.

Change-Id: I50958033fd93a44be24c78fb5a20d7006b262b82
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-11-28 15:08:01 +01:00
Kim Motoyoshi Kalland
f6de476552 Fixed QUnifiedTimer cleanup.
When destroying QUnifiedTimer's instance, its default animation
driver is destroyed as well. This patch avoids creating another
QUnifiedTimer instance when the animation driver's destructor
calls QUnifiedTimer::instance().

Change-Id: I9cf254a9d04d79447baa8f27625c3890c3645f08
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2011-11-28 06:46:32 +01:00
Stephen Kelly
27e4e91808 Fix style. 4 spaces not 2.
Change-Id: I0a595557ad0cdff6fbb43b6812c57525dbd29526
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-28 01:53:42 +01:00
Glenn Watson
de9d845441 Add support to moc for registering non-local enums via Q_ENUMS.
When using the Q_ENUMS macro to register an enumeration in a class
with moc, it's now possible to provide a scoped enumeration that
exists in another class. This adds the enum class scope to
a metaobject's list of related classes stored in the extradata
field.

This allows the declarative code to handle non-local enums in
signal and slot functions that are exposed to QML.

Task-number: QTBUG-20639
Change-Id: I94f5292818095fda75762bd1508ba5c69de19503
Reviewed-by: Martin Jones <martin.jones@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-11-27 22:51:39 +01:00
Stephen Kelly
ff049be072 Use Q_FOREACH in headers.
Downstreams must be able to use QT_NO_KEYWORDS.

Change-Id: Ica75b348c1c9461750b5ae2426557ed8b9e2a8a1
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-27 19:16:53 +01:00
Peter Hartmann
57c31045df SSL certificate blacklist: reformat serial numbers to hexadecimal
Since recently QSslCertificate::serialNumber() always returns the
hexadecimal format, so we need to adapt to that when checking the
serial numbers for the blacklisted certificates.

Change-Id: I43bdb1be77faad7ad79a835c896fc39477452e75
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2011-11-25 17:00:56 +01:00
Gunnar Sletta
ac188d9582 Introduce QWindowSystemInterface::handleSynchronousCloseEvent
And use it from the Cocoa backend.

In general, for threaded GL rendering to work, any function that
affect the surface must be synchronous, so the implementor (such as
QQuickCanvas) can pick it up and block until the GL context has
released the surface. Otherwise, we will crash.

Change-Id: Id8484dac7452fe96fa80ade4ea321145f32124b4
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-25 14:44:39 +01:00
Gunnar Sletta
32ce1172ba Fixed memory leak in windowing system event handling
processWindowSystemEvent does not delete the event, so
allocate it on the stack instead.

Change-Id: Iffda940ffc86ef1fabfbf101e08956fa07c49689
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-25 14:41:26 +01:00
Peter Hartmann
09404c072f SSL: fix build when compiled with -openssl-linked
... and only resolve the functions when the methods are available.
SSL 2 functionality is not always available in OpenSSL anymore.

Change-Id: Ia3178685b26c67ac55447476789e06710b596181
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2011-11-25 14:37:02 +01:00
Jan-Arve Saether
f4b6628083 Make QBasicAtomicPointer work with T=const (int|any type) on Windows
Change-Id: I2301ea3fa399bcc5d6d8c6b487a3fb78db19c67a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-25 14:37:02 +01:00
Stephen Kelly
c1007112c8 Be specific about what part of the model is being re-layouted.
Change-Id: I6b6fe98929543447f945a335c33960823c0d1a4a
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-25 14:37:02 +01:00
Bradley T. Hughes
f9e17f2a32 Remove the QApplicationBase define
Use QGuiApplication instead, since QApplicationBase was unconditionally
defined to QGuiApplication anyway.

Change-Id: I9d0c96835693e5ca6218c330b2d243579a5b0b38
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2011-11-25 13:04:42 +01:00
Jan-Arve Saether
53e4dfec7b Change default implementation of window() to just return 0
Instead move the traversal up to the ancestors to the bridge.
This simplifies the default implementation to just return 0

Change-Id: Ic3ec60851f378587f4a23363aec2039d0e8a08a1
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-11-25 11:29:11 +01:00
Friedemann Kleint
84a9b009e7 QMetaTypeInterface: Fix warning about multiple default Constructors
Change-Id: Ifc806d63a743c68ce830f44f14dd1434bbdbc40e
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2011-11-25 11:29:11 +01:00
Gunnar Sletta
7dabd65ff6 Make cocoa opengl backend threadsafe.
The current implementation on Mac OS X called update() inside
the cocoa plugin from the GUI thread, which breaks when trying
to use the GL context from another thread and the window gets
resized. We now only call it from makeCurrent()

Change-Id: I025aad3a3b140e85e729816bf3b68827337cc80d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-25 09:54:38 +01:00
Olivier Goffart
66b659c8a4 Add support for QueuedConnection when connecting using the new syntax
QMetaCallEvent now can handle a pointer to QSlotObjectBase

Change-Id: I94da1e68ce9bb1fd96a9ae013a389552eb625faa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-25 01:12:14 +01:00
Olivier Goffart
583c55b243 New QObject connection syntax
In addition to the old connection syntax, you can now connect using function pointers.

    connect(sender, &Sender::valueChanged,
            receiver, &Receiver::updateValue );

You can connect also to functor or C++11 lambdas

The connections are now type safe (no more problems with namespaces
or typedefs).  Implicit type conversion is also supported.

The new syntax forces us to change the meaning of signal form
protected to public, in order to be able to access the signal's
address everywhere

The way it works is by introducing new overload of QObject::connect
that take function pointer as parametter. Those new overload are template
function, that are implemented inline. The actual implementation is
in QObject::connectImpl which take a QObject::QSlotObject* as parametter
for the slot.  That slot object contains a virtual function which call
the slot which has to be implemented in the header as it depends on the
template parametter.  So the internals of QObjectPrivate::Connection
will store this QObjectSlot* in order to be able to make the call.

You can read a full description here:
http://developer.qt.nokia.com/wiki/New_Signal_Slot_Syntax

History of commits before it was imported on gerrit:
https://qt.gitorious.org/~ogoffart/qt/ogoffarts-qtbase/commits/qobject_connect_ptr

Thread on the mailing list:
http://lists.qt.nokia.com/pipermail/qt5-feedback/2011-August/000796.html
http://lists.qt.nokia.com/pipermail/qt5-feedback/2011-September/001248.html
(The discussions on the mailing list were about trying to find a
solution that do not need making signals public, but no user friendly
solution was found)

Note: support for QueuedConnection, and the symetric QObject::disconnect is
added in another commit.
Qt::UniqueConnection is not supported yet in the new overload.

Change-Id: I67d08436b0720e7f2992be9f7e34770960fa58fa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-25 01:12:14 +01:00
Olivier Goffart
79f675a1e0 Change the return value of QObject::connect
From a bool to a handle to to connection.

Also added a new overload of disconnect that disconnect a handle

This is required because with the new syntax taking lambda or functors,
it is the only way to disconnect a connection (as it is impossible to
compare functors)

The new return value is QMetaObject::Connection, it is a wrapper around
the internal QObjectPrivate::Connection.
QObjectPrivate::Connection is now reference counted.

tst_qglobal.cpp:
   This test set up an internal callback, and the callback do not set any
   proper connection handle (and tbh,  it would be hard for it to do so).
   So the returned QMetaObject::Connection is invalid, and ok is false
   (Internal callbacks are only used for jambi and should probably be removed)

Change-Id: I111626fb4f47efc4db5e2ea5bff9da15f08fea7b
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-25 01:12:14 +01:00
Frederik Gladhorn
cc37a8cf41 Fix navigate returning invalid pointer.
Navigate would return a random pointer here when asked for example for
not handled relations (label etc).

Change-Id: Iec4de94e6f76f14e89b43fe7327d98878aad58ee
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-11-24 20:26:52 +01:00
Jonas M. Gastal
c990f38a5d Removing unnecessary hidden property "_q_user-agent".
This property is no longer necessary because we can now set the user
agent directly on the proxy.

Task-number: QTBUG-17223
Change-Id: I27cb126dd401f02525290d2317650f55cae9f4ef
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2011-11-24 18:16:33 +01:00
Jonas M. Gastal
4cffc72023 Adds support for headers in QNetworkProxy.
The API is the same that is present on QNetworkRequest class. Since
these are HTTP headers, this only affects proxies of type HttpProxy and
HttpCachingProxy.

This was created as a general solution to the problem pointed out in
QTBUG-19569(some proxies only accept request with specific User Agents).
In the same way that there are cases where setting the User Agent is
desired there might be reasons to set other headers, hence the support
for any header.

Change-Id: Ifd04f34d29eedb6c2a3f0b50708244996b12a123
Task: QTBUG-19569
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
2011-11-24 18:16:33 +01:00
Stephen Kelly
8f1868e7c3 Add a parents parameter to layoutChange signals.
This allows for more focussed notification of what part of the
model has changed layout.

The slots in the proxy models can be more optimized later.

Change-Id: I1bd17465b4be6f8efdc107036db897c557fcb519
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-24 16:46:15 +01:00
Samuel Rødal
11bf824c03 Add a note in the QScreen documentation about logical vs physical DPI.
Change-Id: I1d536711cbbc0ea8a21c6917e5e0066c1ad4ccae
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
2011-11-24 16:46:15 +01:00
Kent Hansen
502b5b8178 Make v8 snapshots work in debug-and-release mode
Debug snapshots and release snapshots aren't compatible. Both a
debug version and release version of the mkv8snapshot tool must be
built, and the corresponding executable selected when building v8.

Adopt the library naming convention for naming the mkv8snapshot
executable ("mkv8snapshot" in release, "mkv8snapshot_debug" in debug
on Mac, "mkv8snapshotd" in debug on Windows).

Change-Id: I7a94b09e7db7ed8bbaa293637c092a1d1d1dbaba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-24 16:46:15 +01:00
Bradley T. Hughes
722cbfe738 Move QScopedLoopLevelCounter to qthread_p.h
... and use it in QCoreApplication::notifyInterna() instead of
"reinventing" the wheel there. The constructor and destructor for
QScopedLoopLevelCounter are inline, so the class does not need to be
exported.

Change-Id: I7af5a4ef0987f277bcc50c1057f3c74152f3d79d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-24 15:06:31 +01:00
Gunnar Sletta
90b67743d1 emit width/height changes for the new rect
Change-Id: I789a45bc60aaa949d18e9fb72a186a259548ec1d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-24 13:37:32 +01:00
Lars Knoll
290c4f8988 Don't forward declare types form openssl in public headers
There's no real reason for the typedef here, QtNetwork
will compile without it and it might conflict with
openssl.

Change-Id: Id352ccc98d84ca9ee9ea3c7b4a942382882173f1
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2011-11-24 13:37:32 +01:00
Holger Hans Peter Freyther
c420e1f101 directfb: Use the QPlatformWindow in the DirectFB Backingstore
Remove usage of QDirectFbConvenience::dfbDisplayLayer in the
QDirectFbBackingStore code and resolve the IDirectFBWindow through
the QPlatformWindow.

Change-Id: Ia7db8dedc91096648bc9de029d034002ba0d6a03
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-11-24 12:11:04 +01:00
Holger Hans Peter Freyther
426cda9089 directfb: Get the IDirectFBDisplayLayer through the QPlatformScreen
Change-Id: I1e8bacc2a5c39065f1c0667cda900730c5670066
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-11-24 12:11:04 +01:00
Holger Hans Peter Freyther
13505b53b6 directfb: Fix the typo in the parameter
Change-Id: I3d373872c533bc4b6f4f010f5cce4dbb41dbb561
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-11-24 12:11:04 +01:00
Holger Hans Peter Freyther
ab0e62205f directfb: Remove dfbDisplayLayer from QDirectFbInput
Change-Id: I2ae61c40c28b337448077cff5643a007b54a3d71
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-11-24 12:11:04 +01:00
Holger Hans Peter Freyther
a0e0359567 directfb: Pass the IDirectFBWindow to the QDirectFbInput methods
No need to go from IDirectFBWindow -> WindowID -> IDirectFBWindow
to attach the event buffer for the event system.

Change-Id: Ia5f7c20d06e8e1da5142f1bd99ca69906107adba
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-11-24 12:11:04 +01:00
Holger Hans Peter Freyther
7da24c14fd directfb: Use DirectFBErrorFatal for errors we don't handle well
In case we fail to initialize DirectFB, use the DirectFBErrorFatal
to quit as there is no way we can recover from this error and the
QPA backend has already been selected.

Change-Id: I8001bf32d0a14ba21c2ec13121748a6384b87c2b
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-11-24 12:11:04 +01:00
Jiang Jiang
6ef939455f Fix HarfBuzz Thai character SARA AM handling
This patch is contributed by Thanomsub Noppaburana from libthai. It
added a special thai shaping function to handle SARA AM character
for fonts without OpenType rules to support it, like Nokia Pure Text
AS.

With modification to logClusters assignment to make sure that
QTextLine::glyphRuns(int from, int length) returns correct glyphs.

Task-number: QTBUG-21206
Change-Id: I5a78ee1ab2b4c874c7d0df17d4ee6d264ed5a790
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-24 12:11:04 +01:00
Holger Hans Peter Freyther
6b22448fa3 directfb: Access the screen layer through QWindow::screen()
Instead of assuming which layer was assigned to Qt, resolve the to
be used layer via QWindow::screen()->handle(). Add a method to the
DirectFB QPlatformScreen to provide a pointer to the IDirectFBDisplayLayer

Change-Id: Iaea9466ca84daff752a4932deafbe38f48123715
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-11-24 08:31:02 +01:00
Holger Hans Peter Freyther
0948237d7f directfb: Move QDirectFbScreen into a separate file
The screen handling will get a bit more complex due the integration
of different ways to do OpenGL. Move to a new file.

Change-Id: Ibe3e397d13da1b270ec4afaf046d28be50e976f9
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2011-11-24 08:29:09 +01:00
Samuel Rødal
5116a25a55 Fixed regression in tst_qscreen.
The ScreenOrientation enum was changed so that the values are power of
twos, angleBetween() needed to be fixed in order to reflect this.

Task-number: QTBUG-22554
Change-Id: Ia45dd6643b40b14204abf967b00c0d04834736a3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-23 22:23:55 +01:00
Sami Rosendahl
b851c764a6 Fix stack overwrite in QDBusDemarshaller
QDBusArgument extraction operators and QDBusDemarshaller that implements
the extraction do not check the type of the extracted value.
Helper function template qIterGet in qdbusdemarshaller.cpp that is used
for extracting basic data types only reserves space from the stack for
the expected type as specified by client.
If the actual type in the DBus parameter is larger stack will be
overwritten in the helper function by at most 7 bytes (expected one byte,
received dbus_uint_64_t of size 8 bytes).

The fix always reserves space for the largest basic type dbus_uint64_t
readable by dbus_message_iter_get_basic API.

See also http://dbus.freedesktop.org/doc/api/html/group__DBusMessage.html#ga41c23a05e552d0574d04

Task-number: QTBUG-22735
Change-Id: I9aa25b279852ac8acc40199a39910ea4002042d7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-23 19:14:12 +01:00
Olivier Goffart
c3160c84af Fix QT_DEPRECATED_SINCE on windows.
Apparently, MSVC preprocessor do not understand correctly the defined()
in that macro (used in another #if)

Change-Id: I9bd102eb4e0cbaa65bea48db786a45d861491ad7
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-11-23 16:33:33 +01:00
Frederik Gladhorn
013a3ee5dc Improve docs for Accessibility.
While still lacking, at least try to reflect reality a bit.

Change-Id: I8fcd0bd540806f3d1e314c60d854d2a90f66c14e
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2011-11-23 16:30:26 +01:00
Frederik Gladhorn
beb72b2fbf Remove virtual child integers.
This makes the accessibility apis much
simpler and less error prone.

Disable the itemviews implementation that is in complex widgets.
The itemviews will use the new code from itemviews.h/cpp everywhere now.

QToolBox was broken before, now at least it simply exposes all its children.
The children are the buttons (tabs of the toolbox) and their contents.

Change-Id: I45e218f49f02aebbd678ddfe29f94c2a112a2125
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-11-23 14:54:01 +01:00
Friedemann Kleint
e739ca0071 Accessible widgets: Fix warning.
Change-Id: Iaf9b112db86a4238ef24f3c6341c83ab0f9ba217
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2011-11-23 11:08:51 +01:00
Honglei Zhang
1d3cfdbfa1 SQLite support only one statement at a time
SQLite driver support only one statement at a time. This fix makes the
exec and prepare call failed if more than one statements are given.
This is bug fix for QTBUG-21884. Also the behaviour is documented in
the API specification.

Task-number: QTBUG-21884
Change-Id: If1e25a0dd9f9ee38961ef478fc7909f6b05e360a
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
2011-11-23 08:36:14 +01:00
Rohan McGovern
9ffd7a339f Added build system support for installing tests.
Tests will install under $$[QT_INSTALL_TESTS].

TESTDATA may be used to install additional testdata required by the
test.

The default install rule may be disabled by
CONFIG+=no_testcase_installs.

Change-Id: I204de60c8e844775906ffd016ca50bffbb414142
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-23 00:13:46 +01:00
Jędrzej Nowacki
ce4343a52f Code cleanup in QVariant and QMetaType.
QMetaTypeGuiHelper was generalized and renamed to QMetaTypeInterface.
From now all types will have common interface which can be used for
basic operations.

Change-Id: I50d67f4a8081fa0f75c9d530a8211593ec37bc55
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-22 19:05:18 +01:00
Jiang Jiang
dae1df576f Remove explict debug message
Change-Id: I8159651d4894bb828416cddb402c946bbd1a535e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-11-22 15:17:15 +01:00
Kent Hansen
52ef2ee57f Add V8 snapshot support
A V8 snapshot is a serialized representation of the JavaScript heap.
Using a snapshot can vastly speed up V8 initialization.

This commit introduces a new tool, mkv8snapshot. mkv8snapshot is
automatically invoked as part of building QtV8, and generates a .cpp
file which is compiled into the QtV8 library.

Because mkv8snapshot itself needs to initialize the V8 environment
the non-snapshot way (i.e., by evaluating thousands of lines of
JavaScript), it needs to build all of V8. This means that V8 is
effectively built twice when snapshots are enabled.

When cross-compiling, only host=i386 and target=arm is supported,
since that's the only relevant case for which V8 currently
supports a simulator. mkv8snapshot is built and run as a host tool
(using the simulator), and generates a snapshot that will be used
on the target.

Task-number: QTBUG-21152
Change-Id: I9270652f129505508f78db8b0a39fbf57dc8b86d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-22 13:10:56 +01:00
Alan Alpert
ce829cbb85 Add some properties to QWindow
x,y,width,height,visible and orientation
Includes slot setters and notify signals for maximal QML compatibility.

Change-Id: I124399093c00f8ad1485d4fbae816dfbe3027eff
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-22 10:54:57 +01:00
Joona Petrell
0c8f471c96 Remove handlesInputPanelVisibility() deprecation mechanism
Task-number: QTBUG-21964
Change-Id: I508ba690c90369d31ca33390d3001064857fb62e
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-21 22:46:11 +01:00
Pekka Vuorela
bd8188ebd4 Support better committing preedit in QLineController
Similar as 7851568c65 for
QWidgetLineController

Change-Id: I7c1a1dc22e9b73515a5a72093866ac747a80896f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-21 22:45:41 +01:00
Pekka Vuorela
7a0c060268 Support input method tentative commit string in QLineControl
Implements similar behavior as 8bd40fef07
did for QLineEdit.

Change-Id: I55de1f9a6703aca629f2e84398e481636c96eeca
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-21 22:45:36 +01:00
Pekka Vuorela
9eba201a48 Fix QLineControl work properly with input method selection event
Same as what 1189ebff32 did for
QWidgetLineControl.

Change-Id: I0991c2a2af126cfd7203829adc33bb4e6d45a7f2
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-21 22:45:25 +01:00
hjk
47304c2c04 Add spaces for string concatenation to work around C++11 source incompatibility.
Change-Id: I6acb7dca20d3bfcb24ea798c7ecd1a12464af5a6
Reviewed-by: QTBUG-22847
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-21 20:14:31 +01:00
Peter Hartmann
ac22fa8a33 QNetworkProxy documentation: mention usage of "http_proxy" variable
This is done on systems other than Windows or Mac.

Change-Id: I631ea350cb9bc123edc6df33b6f661afa8f0778b
Reviewed-by: Arvid Picciani <arvid.picciani@nokia.com>
2011-11-21 17:23:42 +01:00
Lars Knoll
479f3c6b11 Pass all key events through the shortcutmap
This has to happen in QGuiApp, not QApp.

Change-Id: If8a6e81df3ae9b601733d077cce57d2d21572f74
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-21 15:53:16 +01:00
Frederik Gladhorn
6e7f08182e Accessibility: Clean up usage of navigate.
Prefer to use parent/child functions instead.

Change-Id: Ic92165b9439eb750c9d762ddf5dcd2a5ccf0277d
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-11-21 15:53:16 +01:00
Frederik Gladhorn
6f9fb98886 Add debug stream for QAccessibleInterface.
Change-Id: I68fddac5a09bbf092c1e38c411d49dfbf640f27d
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2011-11-21 15:53:16 +01:00
Simon Hausmann
24cfb9d748 Fix debug output in meego platform input context
Don't show debug output by default :)

Change-Id: I7df9264b3e0211e459cecb2cd9f389e017e9bca4
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-11-21 14:25:09 +01:00
Joona Petrell
dc0b588162 Get rid of unused inputMethodEvent function
In Qt5 input method events are meant to be sent directly to
QInputPanel::inputItem() instead of the focused QWindow.

Change-Id: Idc8fe458973f066b578f6374ca33ce6f950bf9cf
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-21 14:24:36 +01:00
Stephen Kelly
100908e400 Add a roles argument to the dataChanged signal.
This allows more granular reporting of what has changed.

This change is binary incompatible and source compatible.

Change-Id: I7c5beaee651a24780cc94e41383f7a80210bc603
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-21 14:24:36 +01:00
Friedemann Kleint
99b6ebeb59 V8: Fix linking with MinGW.
Change linker flags to work with MSVC (stub.lib) and MinGW
(stub.a).

Change-Id: I9319972a133e2d3abfe046e87e2b76590608044b
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-11-21 14:24:36 +01:00
Joona Petrell
249c4fc8e9 Add Q_ENUMS and Q_FLAGS to enumeration InputMethodQuery and flag InputMethodQueries
Change-Id: If6f535a28af06e7e1790d8876f99dcb9ab8a3b41
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-21 09:58:23 +01:00
Robert Knight
67106b169c Fix sporadic hang in QLocalServer::close() in OS X 10.7
There is a bug in CFSocket/CFRunLoopSource in OS X 10.7 which can lead to a deadlock
in CFRunLoopRemoveSource or CFRunLoopSourceInvalidate if the CFSocket manager thread
is concurrently calling CFSocketInvalidate as a result of the socket's file descriptor
having been closed.

QLocalServer::close() triggers this race by closing the socket fd before unregistering
the QSocketNotifier, which internally uses CFSocket.

This commit fixes the problem by changing the ordering in close() so that the socket notifier
is disabled before closing the file descriptor.  This change also makes QLocalServer::close()
perform operations in reverse order to QLocalServer::listen(), as would be expected.

Task-number: QTBUG-22789
Merge-request: 1470
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit a9c3f7169faf4621d39714f753d6e8b376c5d6e5)
Change-Id: Ia9c3f7169faf4621d39714f753d6e8b376c5d6e5
2011-11-18 20:25:53 +01:00
Kjell Rune Skaaraas
5ec3ddc0ec Give better error message when using unsupported lookbehinds in QRegExp
Merge-request: 1456
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit e0383c9b8bd6f4e3d445d69690f84209cad42bb5)
Change-Id: Ie0383c9b8bd6f4e3d445d69690f84209cad42bb5
2011-11-18 20:25:53 +01:00
xiechyong
6329cb8856 Fix QFile::copy() returning false but error() being NoError
Calling close() after setError() will unset the error.

Task-number: QTBUG-11982
Merge-request: 2712
Reviewed-by: ossi
(cherry picked from commit 16f67b49ae5232d4d0fb19e0333f5e2ef2a65449)
Change-Id: I16f67b49ae5232d4d0fb19e0333f5e2ef2a65449
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-18 20:25:53 +01:00
John Tapsell
d2cdfc950e Harfbuzz shaper: kerning adjustment does not need to be modified by RTL
Merge-request: 1435
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit 1b928f5e41888150c4d85ff4df8a9fcab9b06d90)
Change-Id: I1b928f5e41888150c4d85ff4df8a9fcab9b06d90
2011-11-18 20:25:53 +01:00
jaanttil
096f93341a Build fix for WINCE to qfilesystemengine_win.cpp
Merge-request: 2662
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit f4f1b712e1389987e045bb8f6ba654ea9e11d24e)
Change-Id: If4f1b712e1389987e045bb8f6ba654ea9e11d24e
2011-11-18 20:25:53 +01:00
shkim
58075cd96b QNetworkAccessBackend::start() is used although QT_NO_BEARERMANAGEMENT is defined.
Merge-request: 2690
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit 4245a82a3eed3ec21b6affc5836af5b2ad2d42e4)
Change-Id: I4245a82a3eed3ec21b6affc5836af5b2ad2d42e4
2011-11-18 20:25:53 +01:00
Iikka Eklund
ebf5f42edb Fix broken Solaris build (getpwnam_r usage)
Added ifdef inside qt_tildeExpansion function to use correct
version of getpwnam_r depending on _C_POSIX_SOURCE version
on Solaris platform.

Task-number: QTBUG-21451
Merge-request: 1380
Reviewed-by: ossi
(cherry picked from commit 48f64fc7ae9f0e9e8ab07ab60ccd55d3b053dfab)
Change-Id: I48f64fc7ae9f0e9e8ab07ab60ccd55d3b053dfab
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-18 20:25:53 +01:00
Thomas Hartmann
b2aac995b9 adding a getter cubicBezierSpline() to QEasingCurve
Change-Id: Ida722f013613d8633867a902660da30d28aeb918
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-11-18 18:47:19 +01:00
Friedemann Kleint
f6c61d13a3 Windows: Adapt mkspec for MinGW / gcc 4.6.
gcc 4.6 becomes the minimum required version in Qt 5.

See also d4150975af620e2889cc58bd476bac6b4d101db3
in Qt 4.8.

Change-Id: If66ce0be755263c20b0a4371523c6590592d962d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-11-18 14:53:08 +01:00
Joona Petrell
9cfd34c8d9 Document new input method hints introduced in Qt 5
Change-Id: Ic6aa77b410ed8189c2b100ca527a7019cdaf3b8b
Reviewed-by: Pekka Vuorela <pekka.ta.vuorela@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-18 12:11:44 +01:00
Rolland Dudemaine
8fd2801a1f Resolve a number of compilation issues with INTEGRITY
First, #ifdef'ed out getpwuid_r() and getpwgid_r() usage since users/groups support is not in in single-process Posix mode.
Also, correct a typo and add missing files to io.pri.
Update documentation to disable libtiff which won't compile until ibtiff itself is updated, and add back -no-exceptions in the sample command line. And add a line to compile host tools.
Add a dummy QT_OPEN_LARGEFILE definition in qplatformdefs.h since there is code that requires it.
Move definition of getGlyph() after the definition of qHash(GlyphAndSubPixelPosition).

Merge-request: 2686
Reviewed-by: ossi
(cherry picked from commit 8fe04a14b1f3688c9ce0933ebec0c28616595d93)
Change-Id: I8fe04a14b1f3688c9ce0933ebec0c28616595d93
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-18 12:11:44 +01:00
Oswald Buddenhagen
d645ff182b fix doc typo
(cherry picked from commit 9c86b3b0028d79cbca129afafa33d72d624d65c3)
Change-Id: I9c86b3b0028d79cbca129afafa33d72d624d65c3
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-18 12:11:44 +01:00
Oswald Buddenhagen
a5d2c48e6b Ensure that the corewlan plugin can be built with the Mac OS X 10.7 sdk
When the 10.7 SDK was specified explicitly then it would fail the check
inside the pro file.  So this ensures that this is accounted for.

Task-number: QTBUG-20516

Merge-request: 2657
Reviewed-by: ossi
(cherry picked from commit ce1a25fc692abcaa1c825f465d6a158efa953b06)
Change-Id: Ice1a25fc692abcaa1c825f465d6a158efa953b06
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-18 12:11:44 +01:00
Oswald Buddenhagen
54e8d660ad remove obsolete define
(cherry picked from commit 85cd78b01812d108f381e42b044abaa888c4146e)
Change-Id: I85cd78b01812d108f381e42b044abaa888c4146e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2011-11-18 12:11:44 +01:00
Jędrzej Nowacki
2aba4e12ba Fix a memory leak in QXcbConnection.
Change-Id: I2307bf434c53d9321c71609eeacc1f3883bbbb13
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-18 10:31:07 +01:00
Friedemann Kleint
abe5a0a432 qtbase: Warnings fixes.
Change-Id: Ie97e36bc168b3de3cae2d0eb615e777884529a06
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-11-18 10:31:07 +01:00
Rohan McGovern
fc3705cd04 Fixed crashes from tests using xcb plugin with -qtnamespace.
Use QT_BEGIN_NAMESPACE/QT_END_NAMESPACE consistently in xcb plugin.
Some, but not all, of the sources were already using QT_BEGIN_NAMESPACE.

Change-Id: I23b83cc88870fd4039437b733084ab86dd807356
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2011-11-18 03:18:48 +01:00
Kai Koehne
e8fd6f2fd1 Update V8
Change-Id: Ie6157e0baa55271707b3e00ed80b67ab79f4f570
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-11-17 17:40:06 +01:00
Kent Hansen
44b6bb3560 Call invalidateResource() on QOpenGLMultiGroupSharedResource-owned resources
Commit 202127f860 ensured that
QOpenGLMultiGroupSharedResource-owned resources are deleted,
but it was missing a call to invalidateResource().

Change-Id: I166ce8a7298772408081331fe1a91bd2cd88aebb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-17 17:40:06 +01:00
Olivier Goffart
fc6ba401d2 Fix tst_Moc::oldStyleCasts
This tests that the moc generated file produces no warnings with very
pedentic compilation flags.
In that case, there was a warning because of the use of the C casts

Change-Id: Ie79c6d053ff35c55276a07212c5d60f759f693ee
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2011-11-17 16:13:49 +01:00
Pierre Rossi
2a37fd0b85 Fix sliders style issues.
Due to their widget heritage,some styles' logic for drawing sliders
incorrectly assumed a rect with a top left point at (0,0).

Change-Id: I02d9c32d925650ccb36e2b917dd890e5d2bbf925
Reviewed-by: Jens Bache-Wiig
2011-11-17 14:48:20 +01:00
Jędrzej Nowacki
e70457fc4f Reimplement some QMetaType methods.
Methods of QMetaType; sizeOf, construct and destruct were reimplement
using QMetaTypeSwitcher. The change should have impact only on
maintenance (by removing 3 type switches).

Change-Id: Iac3eb52de75d46f12ac32f229a26aec5b5bc7af2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-17 14:48:20 +01:00
Jędrzej Nowacki
7c670aa88b Reimplement QMetaType::typeName.
New implementation is slightly faster (~30%) and it is not dependent
on order of definitions in QMetType::Type. Which means that we do not
have to maintain a separate type list.

Change-Id: I0ceb8c919c08afaa55146fbc3f021b78ffc2c063
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-17 14:48:20 +01:00
Richard Moore
bf7364f0aa Improve the testability of QSslOptions.
The handling of QSslOptions is complicated not only by the subject, but
also by the fact that some of the openssl directives are negatives. This
commit tries to separate the inherent complexity from the complexity of
the api by allowing us to test them independently.

Change-Id: Ieb9386c69dd9b0b49dc42e26b2878a301f26ded1
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-11-17 13:22:56 +01:00
Rohan McGovern
944b799944 Fixed compile of QtPlatformSupport with -qtnamespace.
Change-Id: Iba411d35abe85ecf29a44d99113954a0561ae286
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2011-11-17 11:49:10 +01:00
Rohan McGovern
a068e707af Fixed compile of QtGui with -qtnamespace.
GL headers should not be included inside of the Qt namespace.

Change-Id: Ib19cbd3ab7b071a96e0816798f8ebc3fd4e28448
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2011-11-17 11:48:09 +01:00
Friedemann Kleint
11e8138495 Fix compilation with -force-asserts.
Change-Id: I2f697ba9ab9a5a8393e778abad4da18c7f232d7f
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
2011-11-17 11:29:37 +01:00
Alberto Mardegan
45d3702295 Don't directly access QList contents
The existing code doesn't work on 64bit machines. We must first convert
the list into a QVector, which guarantees that elements are laid out
correctly as an array.

Merge-request: 1467
Reviewed-by: thiago
(cherry picked from commit 00020eed3fa948f69cfa776e92121edec6f975cc)
Change-Id: I00020eed3fa948f69cfa776e92121edec6f975cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-16 18:16:26 +01:00
Harald Fernengel
cd6bd7aa11 Revert logic when building with --force-asserts
This reverts commit f109f5b8a9.

Instead of disabling the asserts, rather enable the debug code
so the asserts actually trigger.

Change-Id: I6f62588d836de5c926294241e8d7196a963e4aac
Reviewed-by: Eckhart Koppen <eckhart.koppen@nokia.com>
2011-11-16 15:27:23 +01:00
Peter Hartmann
f1f95d7047 SSL: fix compilation warning with gcc 4.6.1
"qsslconfiguration.cpp:204:73: warning: suggest parentheses around
comparison in operand of ‘|’ [-Wparentheses]"

Change-Id: I887ffdf3ef8263c35a8f391b3fc97faee41b7dab
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-11-16 15:27:23 +01:00
aavit
041e32d6e1 Fixes: unwanted gcc export of symbols from bundled libpng
This removes a change to libpng that was only relevant for building
a certain Qt 4 tool in certain environements without system libpng.
This is no longer relevant, so this kludge should now be removed.

Change-Id: I9a04ab0224f9e84ccab3ec27762582be439fe3ef
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2011-11-16 14:03:02 +01:00
Toby Tomkins
91af333634 Fix Qt namespace compilation.
Change-Id: I259b5fde8e4d75d28def8650c4c9208accdf0bbe
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-16 11:56:48 +01:00
Peter Hartmann
4dc390e66f SSL namespace: rename TlsV1 to TlsV1_0
This is a source-incompatible change.

TlsV1 is ambiguous; what is actually meant is TLS version 1.0. There are
also TLS versions 1.1 and 1.2; we might want to add options for these
once OpenSSL supports them (apparently they will be with OpenSSL version
1.0.1).

Change-Id: I940d020b181b5fa528788ef0c3c47e8ef873796a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-16 10:32:10 +01:00
Jędrzej Nowacki
2f90c4e40e Make QTest::newRow a bit more verbose if a data tag is null.
Currently QTest::newRow function expects to have correct tag string for
each test data. This was enforced by a simple assert. By adding a
an assert with message we might simplify debugging of a test that
generates test cases.

Change-Id: I84ebb397264c99e7bb46d281fd38583dd2d6964c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-16 10:32:10 +01:00
Eckhart Koppen
f109f5b8a9 Fix Q_ASSERT usage in case -force-asserts is enabled
Certain Q_ASSERT usages are not compiling with -force-asserts since they
are checking for instance variables or other items which are not
available in release mode.

This fix guards the asserts to only be enabled in debug mode.

Change-Id: I2ed74e3d5118608361e8c924e93d8ff0efdc8eab
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-16 09:08:07 +01:00
Jørgen Lind
18affc8c0a Add correct event mask for Qt::WindowTransparentForInput in xcb plugin
Change-Id: I4c683c08876cc6fa934971399af7e48b160168fc
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-15 20:07:17 +01:00
Jørgen Lind
ef8da487a8 Adding a "helper assert" for when you can create QWindow
maybe if your trying to instansiate a QWindow before the QApplication has
been instansiated.

Change-Id: I68ed4ad1dbdfedc242a7cb27c1381d50a3d3dfa4
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-15 20:07:17 +01:00
Pasi Matilainen
31da70ff8e Fix QDockWidget titlebar button positioning on Mac OS X
Move the QDockWidget close and float buttons from the right end of the
dock widget title bar to the left end to avoid Mac App Store rejection.

Task-number: QTBUG-19493

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit 3b2bd144b7873daf2e7119248dbac7c0f0253993)
Change-Id: I3b2bd144b7873daf2e7119248dbac7c0f0253993
2011-11-15 18:33:58 +01:00
Tero Ahola
44e8b84cae Fixed memory leak in Windows Vista style widgets
The animations are now deleted in destruction of the Vista style.
With the previous implementation the animations were not deleted for
instance if you move mouse cursor off from a widget with hover
animation (like QPushButton).

Task-number: QTBUG-21532

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit 261bbb12003dab0e45b5814f85dd74aa64bcfb79)
Change-Id: I261bbb12003dab0e45b5814f85dd74aa64bcfb79
2011-11-15 18:33:58 +01:00
Jiang Jiang
3d063ecc5f Provide defaultFont with fontconfig db
So that it won't just return "Helvetica" that may not exist in
target system. Providing it seems to fix QTBUG-21833 as well,
thus we can remove the QEXPECT_FAIL statement in qlistview test.
'_' appears to reach the minimum right bearing in some fonts.

Task-number: QTBUG-21833
Change-Id: I2340af6ee736083ec4f6575e469840ebec4e545e
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-11-15 18:33:58 +01:00
Jędrzej Nowacki
5bc35276fb Hide QVariant helper classes in a namespace.
Moving these classes to an unnamed namespace reduced chances of
a name conflict and size of executable. GCC 4.6 in release mode produces
a 5kB smaller binary.

Change-Id: Ie1819a88180f9db1cd32cc59ea6fe268ecbd5813
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-15 18:33:58 +01:00
Kent Hansen
202127f860 Ensure that QOpenGLMultiGroupSharedResources are cleaned up
When a GL context group is destroyed, all multi-group shared
resources associated with the group should be cleaned up.
Otherwise we could get a double deletion in the resource's
destructor, because it still retained a pointer to the
deleted group.

The missing cleanup resulted in a crash when the global
static qt_gl_functions_resource was destroyed, first seen
in the tst_examples autotest in qtdeclarative. It possibly
didn't manifest before because it's event loop-dependent
(the contexts are deleted via deleteLater()).

Change-Id: I6b1e0bfdfbbb2bff8e795f545e680fcdfa094768
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-15 17:09:35 +01:00
Kent Hansen
7b3bb6759b Make V8 build on Windows again
Forgot to add a Windows-specific source file to the project
when the new V8 version was imported.

Change-Id: Id20dcba132bf2609338845e8a769fcc8c1cbc562
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-11-15 13:33:08 +01:00
Richard Moore
75b2a4960b Add the ability to do unsafe SSL renegotiation as a fallback.
This commit adds the ability to perform legacy SSL renegotiation as
a fallback via QSsl::SslOptions. This is something that used to work,
but has been disabled by default in newer versions of openssl. The
need for this has been reported by users (eg. in QTBUG-14983).

Change-Id: I5b80f3ffd07e0c5faddc469f6a8f857bac5740f7
Reviewed-by: Corentin Chary <corentin.chary@gmail.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-11-15 11:53:44 +01:00
Olivier Goffart
e1ca68077a moc: Remove code that generate QMetaObject.
This code is totally outdated, and has never been used in Qt4 AFAIK

Change-Id: I775fe87532807e77fc94fe661e4b659c11bfd8be
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-11-15 11:53:44 +01:00
Olivier Goffart
9924a637cc moc: fix Q_INVOKABLE returning references
The moc generated code would not compile otherwise

Keep Moc::parseFunction and Moc::parseMaybeFunction in sync
(the first is used for signals and slots, and the second for normal
 functions such as Q_INVOKABLE)
Last patch that introduced function pointer updated parseFunction
but not parseMaybeFunction

When a slot return a reference, moc generate code that make the
MetaObject system think it is a void, so qt_metacall and invokeMethod
do not mess with the return value.
But when we want to take the function signature, in the IndexOfMethod
call, we need to have the exact return type.

Change-Id: I4661218d7ce367ad3934e73929e7d04f0a6dbc09
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-11-15 11:53:44 +01:00
Richard Moore
6f115edd74 Always use the hex format for certificate serial numbers.
In Qt 4.x the serial number is reported by a mixture of the hex value
and the number, The hex is what is used by other tools, and we should do
the same.

Change-Id: Ia0361d43fb5b920d053c95e932e0c8a012436e5e
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-11-15 10:16:12 +01:00
Olivier Goffart
6f4bdf3b64 QEventDispatcherQPA: processEvents should only be called once
This caused a "deadlock" in tst_qobject::moveToThread

The problem was that QEventLoop::quit was called from the first
prcessed event in that loop, put calling process event a second time
deadlock because there is no more event to process

(In practice, some event can come from the window manager or the
inputs, but they may as well not come)

Change-Id: Ia469110eb9c9de57669e80cf19e933f410e469a4
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-11-15 10:16:12 +01:00
Sven Anderson
2b7d98ef8f Allow to create a custom event dispatcher for specific QThreads.
QAbstractEventDispatcher() does no longer install itself into the current
thread.  Instead the new methods QThread::setEventDispatcher() and
QCoreApplication::setEventDispatcher() allow to install a custom event
dispatcher into any QThread as long as there is no default event dispatcher
created yet.  That is, before the thread has been started with
QThread::start() or, in case of the main thread, before QCoreApplication has
been instantiated.

Change-Id: I7367e13d8d8aebed5a5651260bb69b8818eb1b90
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-11-15 10:16:12 +01:00
Rohan McGovern
4e014ace45 Integrate testcocoon support into Qt build system.
To instrument a Qt application or library with the TestCocoon coverage
tool, do `CONFIG+=testcocoon' in the application .pro file.

To instrument Qt itself with testcocoon, use the `-testcocoon' configure
option.

Change-Id: Ie77109a078d11ea51f7a073621e0df9c752c44ae
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-15 07:21:48 +01:00
Charles Yin
b4d23e61ed Make QTest::qWait() handle DeferredDelete event
The QTest::qWait() function does not handle DeferredDelete, in this case
all deleteLater() calls before the qWait() won't be processed during the
wait. Add an explicit sendPostedEvents(0, QEvent::DeferredDelete) to fix
this problem.

Task-number:QTBUG-22633
Change-Id: I2c5574b4e7d3c070fad6382dc36ddfd1dfac50d6
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-15 04:32:20 +01:00
Jiang Jiang
1916460015 Do not add QPF fonts to basic font db
QPlatformFontDatabase::populateFontDatabase() routine uses a different
usrPtr format which is not compatible with the one basic font db uses
(FontFile *). We shouldn't mix them together.

Task-number: QTBUG-22713
Change-Id: I239ea085e14261f6b9ba66b03710a590a44378f9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
2011-11-15 01:05:49 +01:00
Laszlo Agocs
fc659979e6 Properly handle position in non-synthetic ConfigureNotify with xcb
The received window position cannot be trusted blindly, e.g. in case
of resizing a window via the mouse or calling showMaximized() the
position is bogus (for our purposes). Instead, it needs to be queried.

Before 37f338e5ed an incomplete
workaround was in place however it got removed in that commit,
resulting in weird off-by-a-certain-amount mouse position issues in
certain use cases. This patch aims to fix the issue similarly to how
it was done in Qt4.

Change-Id: I2d2a69b81a2782117b700fe366fae4c102aca1f4
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-15 01:05:49 +01:00
Pekka Vuorela
f5b9982805 Document QPlatformInputContext
Change-Id: I8f7599ed1f03d29a11713c7a11ed5b61a17e3dfe
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
2011-11-15 01:05:49 +01:00
Mikko Knuutila
33f66acb36 Fix for the button size calculation in qmessagebox.cpp
Actually use the calculated size for needed space instead of just
ignoring the return value.

Task-number: QTBUG-16315

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit 0792215fa8d227617a2080af9f12fd7f486b87d6)
Change-Id: I0792215fa8d227617a2080af9f12fd7f486b87d6
2011-11-14 23:42:17 +01:00
Bradley T. Hughes
a2ece6e626 Disable qmacstyle test on Mac OS X
The QMacStyle is not built as part of QtWidgets at the moment (see the
TODO in src/widgets/styles/styles.pri), so disable the test for now.

I've included a comment in styles.pri to re-enable the test once the
style is done.

Change-Id: Ia6ea130135586f107ba257bf2c6c2c7187a830b6
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2011-11-14 23:42:17 +01:00
Peter Hartmann
20f80d06f7 HTTP: blacklist server for pipelining
that server was found out not to support HTTP pipelining.

tested manually; for more information see the task.

Change-Id: I9120e8be1a9a05f39f99752d6426c92fa3d093f2
(cherry picked from commit ec6d7694f72498d1b156bb0ae8d305e01931f7b2)
Reviewed-by: Markus Goetz
Task-number: QTBUG-21369
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-14 18:41:17 +01:00
Rick Stockton
a329fc574b Support 31 mouse buttons (with platform plugins xcb and xlib).
This commit includes changes for mouse button support within the XCB
and XLIB platform plugins. Support in other platform plugins will be
added in the future. The namespace update is prerequisite to compile
the the Plugins, and the update in qguiapplication.cpp is required for
the enhancements to actually work.

Task-number: QTBUG-22642
Change-Id: Ie18fca3b9c86d0b6abbf2103a4f8582e6ce83e7d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-14 18:41:17 +01:00
Peter Hartmann
4329030b77 network: remove Symbian specific code
removes several files and cleans up the code, removing all Symbian
specific #ifdef's etc.

Change-Id: Ie457e54cb4b3a992f251383320d47822259c38f1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-14 18:41:17 +01:00
Olivier Goffart
49bd825a96 moc: support mapping pointers to member functions to indexes
This change adds QMetaObject::IndexOfMethod as a parameter to
the qt_static_metacall function.
It lets the moc generated code return the index of a signal or slot
given its pointer to member function

This is required to support the new connection syntax

Change-Id: I39198c6699b5aa3599d3d282f7ac79b1e3684d33
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-14 15:52:26 +01:00
Jiang Jiang
e9c7edddb5 Remove unused Mac code
Change-Id: I226ff0928cdeb70bb7f71ccace5066a430c3b05c
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2011-11-14 10:53:48 +01:00
Richard Moore
e66d3d9899 Deprecate QSslCertificate::isValid() replace with isBlacklisted()
Currently isValid wrongly gives the impression it checks a certificate
for validity - it doesn't. It merely checks if the certificate dates
are valid and if the certificate is blacklisted. Since it's already
easy for users to check the dates, let's just give them access to the
ability to check for blacklisting.

Change-Id: I25be3bde6a01063034702a9574b28469bf4882cd
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-11-14 10:39:47 +01:00
jahonkon
fd3d7429b2 Fix QPlainTextEdit when using Qt::TextSelectableByKeyboard flag
It is not possible to select text with keyboard when specifying only
Qt::TextSelectableByKeyboard flag.

Task-number: QTBUG-18952

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit 054fa68b6ae852e84f2d44a73260b4282286f5ab)
Change-Id: I054fa68b6ae852e84f2d44a73260b4282286f5ab
2011-11-14 10:35:11 +01:00
Tero Ahola
61fae7e551 Mac: Fix the color of check marks in menus with stylesheet
Task-number: QTBUG-16989

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Morten Johan Sorvig <morten.sorvig@nokia.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
(cherry picked from commit 22c7a2f69e833789e9b5613f809ea43561624482)
Change-Id: I22c7a2f69e833789e9b5613f809ea43561624482
2011-11-14 10:34:55 +01:00
Mikko Knuutila
2b8c3ff0f0 Added base 10 to be used with QIntValidator.
Fixes an error in QIntValidator, which occurred because
locale.toInt() was missing a parameter for base value and this
led it to presume wrongly that a base 8 is in use.

Task-number: QTBUG-21602

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit ee3f763f3642d1a098e6293fbc586b34a3e6e8be)
Change-Id: Iee3f763f3642d1a098e6293fbc586b34a3e6e8be
2011-11-14 10:34:41 +01:00
Markku Heikkila
d7695e82ac Fixed wrong QGroupBox check state
Handle mouserelease only if mouse is pressed in QGroupBox.

Task-number: QTBUG-19170

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit df819cfe17f6dfd089096063524932fc4975804f)
Change-Id: Idf819cfe17f6dfd089096063524932fc4975804f
2011-11-14 10:34:24 +01:00
jahonkon
ad20e965d7 Fix QDateEdit calendar pop-up having wrong date
When the calendar pops up it moves the date to maximum instead of
keeping the current date. Problem was caused by QCalendarPopup
signalling date change to QDateTimeEdit during internal date
synchronization from QDateTimeEdit to QCalendarPopup.

Task-number: QTBUG-11422

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@nokia.com>
(cherry picked from commit b0c09896a239197411027e773214a2635744695c)
Change-Id: Ib0c09896a239197411027e773214a2635744695c
2011-11-14 10:28:19 +01:00