profile/ivi/qtbase.git
12 years agoRemoving QHttp class, its tests and its usage in examples.
Jonas M. Gastal [Thu, 22 Dec 2011 19:42:49 +0000 (17:42 -0200)]
Removing QHttp class, its tests and its usage in examples.

Task-number: QTBUG-22750
Change-Id: I161fad772bfb26797e6ee9d69da925b6747c371f
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove all references to QAccessible:: {Child|Ancestor|Sibling}
Jan-Arve Saether [Thu, 5 Jan 2012 08:51:20 +0000 (09:51 +0100)]
Remove all references to QAccessible:: {Child|Ancestor|Sibling}

These are deprecated in favor of
QAccessibleInterface::child() and QAccessibleInterface::parent()

QAccessible::Sibling can be done with a combination of those two.
This is handled by the bridges, if required.

Change-Id: I2e2a6eb2a982e7c9001a393d69f0c5f1ae9c0970
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
12 years agoFix renewed SSL certificates being incorrectly reported as expired
Shane Kearns [Fri, 6 Jan 2012 16:29:43 +0000 (16:29 +0000)]
Fix renewed SSL certificates being incorrectly reported as expired

OpenSSL tries certificates in the order they are added to the store.
There was logic to add the expired certificates after the valid ones
to ensure the valid certificate is checked first if the OS cert store
contains both the expired and renewed version of the same cert (e.g.
the verisign class 3 cert on windows)

However due to a coding error, the ordering was reversed, ensuring the
problem is always encountered instead of always avoided.

Task-number: QTBUG-20012
Change-Id: I7c8dba8a09842540a22b44d33c7dcb22bbbc6a58
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoCopy qbasicatomic.h to qoldbasicatomic.h
Thiago Macieira [Sun, 31 Jul 2011 20:20:09 +0000 (17:20 -0300)]
Copy qbasicatomic.h to qoldbasicatomic.h

Change-Id: I15df58f9dc29189419f8cbc0ce47bf11e9f17cf4
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoWindows: Run on Windows XP.
Friedemann Kleint [Tue, 3 Jan 2012 09:40:32 +0000 (10:40 +0100)]
Windows: Run on Windows XP.

Replace Q_ASSERT() on missing functions from User32.dll by
qFatal() with error message. Do not check "UpdateLayeredWindowIndirect"
as it was introduced with Windows Vista.

Task-number: QTBUG-23351

Change-Id: I0064611351c687f0c3c6e13156dd534b9f7a5d75
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoMake QUuid a class.
Friedemann Kleint [Fri, 6 Jan 2012 12:18:35 +0000 (13:18 +0100)]
Make QUuid a class.

Silence MSVC warnings about forward-declarations as class
in the metatype system.

Change-Id: I676662e5919585e98c87413fd8360d6f41f73631
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
12 years agoAdd roles to the dataChanged slots in views.
Stephen Kelly [Thu, 15 Dec 2011 15:31:21 +0000 (16:31 +0100)]
Add roles to the dataChanged slots in views.

This is a source incompatible change.

This is for consistency with the signal for the lifetime of Qt5. I could
imagine people trying to override a virtual function (in a new class while
using the Qt5 library) with the arguments of
the signal and have that fail due to the arguments not being correct.

It also allows ignoring dataChange events when they are known not to be for roles
which are relevant to particular views or delegates.

Change-Id: Ica191835125c1c8fdaf665debb62d635e81700dc
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMove the qitemmodel test to the itemmodels directory.
Stephen Kelly [Tue, 3 Jan 2012 20:38:41 +0000 (21:38 +0100)]
Move the qitemmodel test to the itemmodels directory.

Change-Id: I67e1008bea0d94ffbc52aad453a29645261e109e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove documentation reference to non-existant class.
Stephen Kelly [Fri, 6 Jan 2012 06:42:36 +0000 (07:42 +0100)]
Remove documentation reference to non-existant class.

Change-Id: Idaaf16a9482edaa43e5b2389adc82cad701b1407
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agosplit qprocess_win.cpp into Windows and WinCE parts
Joerg Bornemann [Thu, 8 Dec 2011 10:04:24 +0000 (11:04 +0100)]
split qprocess_win.cpp into Windows and WinCE parts

Change-Id: I7f2cf2c42dd24ca162238e6dc6408ac39dfcd790
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoQTimerInfo::expected is only needed for debugging
Bradley T. Hughes [Thu, 5 Jan 2012 12:56:01 +0000 (13:56 +0100)]
QTimerInfo::expected is only needed for debugging

The code for calculating the expected time is only useful for debugging
purposes. Don't compile this into the library unless QTIMERINFO_DEBUG is
defined.

Change-Id: I6530e6a70410a12544410ef286225df98ceddcee
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoLimit Bezier curve subdivision to maximum 512 line segments.
Kim Motoyoshi Kalland [Fri, 6 Jan 2012 13:11:55 +0000 (14:11 +0100)]
Limit Bezier curve subdivision to maximum 512 line segments.

Avoid running out of time and memory for extreme cases.

Task-number: QTBUG-23443
Change-Id: Iac7799097d61295bb7395a2efe48b3e7d9257919
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoConstify more accessibility interface functions.
Frederik Gladhorn [Thu, 5 Jan 2012 21:42:23 +0000 (22:42 +0100)]
Constify more accessibility interface functions.

Change-Id: Iff8da09eef5288de92ccea753a8a5fda03e214b0
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoImage interface functions should be const.
Frederik Gladhorn [Thu, 5 Jan 2012 21:10:20 +0000 (22:10 +0100)]
Image interface functions should be const.

Change-Id: I9c6ecd140abc4f4d5c28ad2228e1241d3891b5ad
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoRemove all non-inline of qMalloc/qFree/qRealloc.
Robin Burchell [Tue, 20 Dec 2011 20:39:12 +0000 (21:39 +0100)]
Remove all non-inline of qMalloc/qFree/qRealloc.

We're trying to deprecate these, so don't use them anymore.

The inline uses of these have been left intact, for the moment. Inline code will
need to create their own non-inline allocation methods (for future-proofing to
allow alterations in how e.g. individual containers allocate)

Change-Id: I1071a487c25e95b7bb81a3327b20c5481fb5ed22
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix documentation.
Frederik Gladhorn [Thu, 5 Jan 2012 21:25:29 +0000 (22:25 +0100)]
Fix documentation.

Change-Id: Id54263f408e29ed3b9d06712e39759485a42b869
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoRemove qdoc for code that no longer exists.
Frederik Gladhorn [Thu, 5 Jan 2012 20:59:04 +0000 (21:59 +0100)]
Remove qdoc for code that no longer exists.

Change-Id: I82d4ba930335a03181aa20c9e4cb060ca8b35b9a
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoRemove docs for functions that no longer exist.
Frederik Gladhorn [Thu, 5 Jan 2012 17:51:52 +0000 (18:51 +0100)]
Remove docs for functions that no longer exist.

Change-Id: Id79d3eeab85b156348054c727ea1897ac3e5842b
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoFix documentation: missing const
Frederik Gladhorn [Thu, 5 Jan 2012 17:29:34 +0000 (18:29 +0100)]
Fix documentation: missing const

Change-Id: Ie90afada6ffe3198314481dd6fc68bce67605efd
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
12 years agoFix crashing data urls
Simon Hausmann [Fri, 6 Jan 2012 12:22:13 +0000 (13:22 +0100)]
Fix crashing data urls

Commit 231369eb043e9c5221da1a4f2a724643a3f380f3 introduced the use of
QBuffer::setBuffer with a QByteArray that is allocated on the stack,
causing plenty of memory corruption.

This patch replaces the use of setBuffer with setData, which correctly
assigns the QBuffer's buffer instead of just relying on the pointer
passed to setBuffer.

Spotted by Rohan in http://codereview.qt-project.org/#change,11859

Change-Id: I7cdf43d438a2a7864de7c35841b42421c1c60e68
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoRemove duplicate fnctl() call.
Robin Burchell [Thu, 5 Jan 2012 17:49:12 +0000 (18:49 +0100)]
Remove duplicate fnctl() call.

QInotifyFileSystemWatcherEngine's constructor calls this, there's no need to do
it twice.

Change-Id: Ic19e758a3f87f2e3a885e5b834f59a5a0fe13f4b
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoQNetworkAccessManager: check if networksession is set
Martin Petersson [Fri, 6 Jan 2012 08:51:53 +0000 (09:51 +0100)]
QNetworkAccessManager: check if networksession is set

Need to check that the networkSession has been set so we don't
crash when bearermanagement is enabled.

Task-number: QTBUG-23484
Change-Id: Ifdb71350ba5b4ddbdbd17a8d87189c78c524783e
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
12 years agoAdd a new QT_NO_SSL feature macro.
Richard Moore [Tue, 3 Jan 2012 14:08:03 +0000 (14:08 +0000)]
Add a new QT_NO_SSL feature macro.

At the moment users of Qt must detect if it was compiled with SSL
support by testing for QT_NO_OPENSSL. This means that any code that is
conditionally compiled this way is tied to the presence of the openssl
backend. This commit makes it possible to implement new SSL backends
during the Qt5 lifetime without breaking this code. People can still
test for QT_NO_OPENSSL if they really need openssl, but if they simply
want to know if there's SSL support at all they should use this define
instead.

In addition, this commit changes the public API headers to use the new
define.

Change-Id: Ib57a71aa65836ac9351f120a487bfeb8009d9515
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
12 years agoWindows: Fix compiler warnings in accessibility.
Friedemann Kleint [Fri, 6 Jan 2012 09:02:46 +0000 (10:02 +0100)]
Windows: Fix compiler warnings in accessibility.

Change-Id: Id9ffe1069116f25b89df85337a75dae54b5beec5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Andriy Golovnya <andriy.golovnya@googlemail.com>
12 years agoRemove qttest_p4.prf file
Sergio Ahumada [Wed, 4 Jan 2012 21:21:48 +0000 (22:21 +0100)]
Remove qttest_p4.prf file

qttest_p4.prf was added as a convenience for Qt's own autotests in Qt4.
It enables various crufty undocumented magic, of dubious value.
Stop using it, and explicitly enable the things from it which we want.

Most autotest .pro files should look like this:

  CONFIG += testcase
  TARGET = tst_something
  QT = core testlib
  SOURCES = tst_something.cpp

Change-Id: I051b230c5c4fd56dc6eae2b9b7bdff6c033248fd
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoRemove Cursor functions from invokeMethod.
Frederik Gladhorn [Thu, 1 Dec 2011 19:14:48 +0000 (20:14 +0100)]
Remove Cursor functions from invokeMethod.

Cursor position is handled by the text interface.
This was a binary compatibility hack in Qt 4.

Change-Id: I45520e6942a490834f6e9346a4c173300a9bf7a9
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoUpdate docs.
Frederik Gladhorn [Thu, 5 Jan 2012 21:01:38 +0000 (22:01 +0100)]
Update docs.

Change-Id: Icd8cbcde6893cc0ee5e7df18b219513cdbc0b2da
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoAdded xrender as a dependency to build glxconvenience.
Samuel Rødal [Wed, 4 Jan 2012 13:57:38 +0000 (14:57 +0100)]
Added xrender as a dependency to build glxconvenience.

Prevents build errors when xrender is not present.

Change-Id: Ib80d52109dd0bcd63ba865c5f6e143961f3c20e6
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoRemove redundant class from QStringMatcher test.
Jason McDonald [Fri, 6 Jan 2012 05:44:02 +0000 (15:44 +1000)]
Remove redundant class from QStringMatcher test.

The removed class was evidently attempting to promote protected members
of its base class to public, but the way this was done doesn't work and
doing so wasn't actually necessary for the test.

Change-Id: I15e0c31891da08cacee1054e15596a79a058b466
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAdd regression test for QTBUG-22660
Sami Rosendahl [Thu, 5 Jan 2012 13:48:12 +0000 (15:48 +0200)]
Add regression test for QTBUG-22660

QHttpNetworkReply crashed in Qt4.7 and 4.8 if a HTTP server responded with
gzip-encoded empty content without defining Content-Length in the response
header. This commit adds the test for the problem as a regression test to
Qt5.

Change-Id: Iddfb970a31d92a66fd1dd524811cf54bb06e5157
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
12 years agoFix memory leak in QDomDocument DTD entity declaration handler
Sami Rosendahl [Thu, 5 Jan 2012 11:56:53 +0000 (13:56 +0200)]
Fix memory leak in QDomDocument DTD entity declaration handler

The created entity node's reference count needs to be decremented to 0
before it is added as a child, because appendChild will increment the
reference count to correct value of 1. Also added autotest DTDEntityDecl
to tst_qdom to expose the leak when executed under valgrind memcheck.
There was no previous direct test case for unparsed entity declarations in
DTD, only indirect coverage via regression test cloneDTD_QTBUG8398.

Task-number: QTBUG-22587
Change-Id: I394ae9fc32d5b84e4ca287c5db4dd7effde6128b
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoFix memory leak in QDomDocument DTD notation declaration handler
Sami Rosendahl [Thu, 5 Jan 2012 11:52:39 +0000 (13:52 +0200)]
Fix memory leak in QDomDocument DTD notation declaration handler

The created notation node's reference count needs to be decremented to 0
before it is added as a child, because appendChild will increment the
reference count to correct value of 1. Also added autotest DTDNotationDecl
to tst_qdom to expose the leak when executed under valgrind memcheck.
There was no previous test coverage for the notation declarations in DTD.

Task-number: QTBUG-22588
Change-Id: I876186d1277ceb4414f803b58b62f51cc1474367
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoAdd the roles to the dataChanged slot.
Stephen Kelly [Mon, 2 Jan 2012 16:26:31 +0000 (17:26 +0100)]
Add the roles to the dataChanged slot.

This will allow the possibility of ignoring dataChange signals for roles
which are not interesting to particular widgets.

Change-Id: Ia7dcebd875f7b9fa90aa5e9bff7ef5ca9f381d55
Reviewed-by: David Faure <faure@kde.org>
12 years agoDo not always compile in QTimerInfoList::repairTimers()
Bradley T. Hughes [Thu, 5 Jan 2012 12:45:36 +0000 (13:45 +0100)]
Do not always compile in QTimerInfoList::repairTimers()

This function is never called on systems that are guaranteed to have
a monotonic click (like Mac OS X). Remove the dead code from the
library.

Change-Id: I95852c8dffaa3a9747367f0abe4a4c62e4f86421
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoUse Qt::TimerType on UNIX when scheduling timers
Bradley T. Hughes [Wed, 21 Dec 2011 10:34:07 +0000 (11:34 +0100)]
Use Qt::TimerType on UNIX when scheduling timers

As stated in the documentation for Qt::TimerType, we allow for up to
5% error for CoarseTimers (the default timer type). PreciseTimers are
not adjusted at all, and VeryCoarseTimers fire with one-second accuracy.
The objective is to make most timers wake up at the same time, thereby
reducing CPU wakeups.

Note that this changes makes it possible for timers to fire early, which
may be unexpected for some applications. Such applications should use
PreciseTimers explicitly.

Author: Thiago Macieira <thiago.macieira@nokia.com>
Change-Id: Iaa70314c39a446adbc6dbb6fdfa7bafcd98a7283
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoUse clipboard_timeout instead of hardcoded 5000 (since its the same value)
Albert Astals Cid [Thu, 5 Jan 2012 16:09:57 +0000 (17:09 +0100)]
Use clipboard_timeout instead of hardcoded 5000 (since its the same value)

Change-Id: Ia0edf04e36c8d30394a2bc9a691ab9aa78831f78
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoMake socket descriptors qintptr.
Jonas M. Gastal [Thu, 5 Jan 2012 12:38:39 +0000 (10:38 -0200)]
Make socket descriptors qintptr.

Windows x64 uses 64 bits integer for sockets, to ensure compatibility we
should use ptr sized integers for our socket descriptors.

Task-number: QTBUG-19004
Change-Id: I4b56023874a4f1bad107c66c054fecfedde33d88
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
12 years agoUse explicit Qt::TimerTypes when starting animation timers.
Bradley T. Hughes [Mon, 2 Jan 2012 11:47:15 +0000 (12:47 +0100)]
Use explicit Qt::TimerTypes when starting animation timers.

Similar to commit 4e1ad49998cf782ccc88e7e80fbd05c722658a16, we know that
CoarseTimers are worst in their first firing, so we prefer a
PreciseTimer for short pause animations to avoid inaccuracies. If the
timeout is too big, we use a CoarseTimer anyway (current threshold is
2000ms).

The timer that drives the QDefaultAnimationDriver is always a
PreciseTimer.

Change-Id: I0939357d768b804f9f9bab3adf5ed1d0f7e012e7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoFix compile error with qWarning() << myDateTime and QT_NO_DEBUG_OUTPUT
David Faure [Thu, 22 Dec 2011 12:46:15 +0000 (13:46 +0100)]
Fix compile error with qWarning() << myDateTime and QT_NO_DEBUG_OUTPUT

All QDebug operator << in custom classes were disabled by
QT_NO_DEBUG_STREAM, which was set by QT_NO_DEBUG_OUTPUT.

Now QT_NO_DEBUG_STREAM is never set automatically, but remains available
for reducing the feature set altogether (qconfig.h).

Remove check on QT_NO_TEXTSTREAM: this define is meaningless, it
doesn't even undefine QTextStream, and this is unrelated to QDebug
streaming anyway.

Change-Id: I5eeed0144fa684d0e790e9dfd9a4aeb956218c39
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoFree the replies
Albert Astals Cid [Thu, 5 Jan 2012 12:15:47 +0000 (13:15 +0100)]
Free the replies

Change-Id: I719bd95d94f3bfd41eeb09a49ac3e2701a516619
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoCheck for the clipboard manager when looping due to app quiting
Albert Astals Cid [Thu, 5 Jan 2012 10:11:27 +0000 (11:11 +0100)]
Check for the clipboard manager when looping due to app quiting

One can be extremely unlucky and on session logout get this:
 * All apps are going down
 * A Qt app checks if the clipboard manager is there to yield its clipboard contents
   * The clipboard manager is still there
 * Then just after that check, the clipboard manager finishes because of the session end
 * This means the Qt app will loop for 5 seconds trying to yield its clipboard contents
   to a clipboard manager that is not there anymore

Change-Id: Ia89670d4deb72f12e660a0d7aa5b2d212955d6fe
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove OS X FSEvents watcher.
Robin Burchell [Tue, 3 Jan 2012 20:31:08 +0000 (21:31 +0100)]
Remove OS X FSEvents watcher.

Per QTBUG-9249, this backend is buggy, and not recommended for use by Apple.

Change-Id: I72ce88006a4badbbfdd825717020078778d16a36
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
12 years agoRemoved QApplication::setInputContext()
Pekka Vuorela [Mon, 2 Jan 2012 15:42:00 +0000 (17:42 +0200)]
Removed QApplication::setInputContext()

Obsoleted by platform input context. Setting a custom QInputContext
wouldn't work properly anymore.

Change-Id: I966573a82fdd7530544878513a655eae7b3ad67b
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoRemoved Qt::ImhMultiLine
Pekka Vuorela [Mon, 2 Jan 2012 14:21:48 +0000 (16:21 +0200)]
Removed Qt::ImhMultiLine

Multi line information does not really work that well as
input method hint. Application developer is the one setting
value for the hint, and thus would be responsible for
always having right value for multi line.

Change-Id: I6102be95549f6f6d4da40845f52d5c873cd46a47
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoAvoid redefining the lastWindowClosed() signal.
Robin Burchell [Thu, 5 Jan 2012 06:34:55 +0000 (07:34 +0100)]
Avoid redefining the lastWindowClosed() signal.

This prevents things like the following (from qmlviewer):
QMetaObject::indexOfSignal: signal lastWindowClosed() from QGuiApplication redefined in QApplication

Change-Id: I4b30235e379aedaa913ea30f05daac7079f285e9
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoQCocoaEventDispatcherPrivate members should not be static
Bradley T. Hughes [Wed, 4 Jan 2012 10:34:02 +0000 (11:34 +0100)]
QCocoaEventDispatcherPrivate members should not be static

Keep the Cocoa event dispatcher's private data as normal members of
QCocoaEventDispatcherPrivate. This removes the global initializers for
the macTimerHash and cocoaModalSessionStask as well.

To keep timers working, we pass a pointer to the timer's MacTimerInfo
struct to the callback, instead of just the timer id. The MacTimerInfo
needs to keep a pointer back to the QCocoaEventDispatcherPrivate to get
access to the private's members.

Change-Id: Ic3a61e5e1d1d82030735de73cf0b0c70a13c21a4
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
12 years agoCodeCoverage: Remove releaseCoverageTool() function.
Caroline Chao [Tue, 3 Jan 2012 09:26:32 +0000 (10:26 +0100)]
CodeCoverage: Remove releaseCoverageTool() function.

QLibraryPrivate::release() can be called multiple times and it is not
appropriate to unregister and save the executed data for a library there.
The library may still be used when it is released and it seems safer to save
its data only once and probably when the application ends.

Not calling __coveragescanner_unregister_library does not affect the
coverage data. Calling __coveragescanner_register_library at load time
without calling __coveragescanner_unregister_library means the plugin will
stay loaded until the application ends. Removing the call to
releaseCoverageTool() is so acceptable since the data will be saved
when the application exits.

Task-number: QTQAINFRA-416.

Change-Id: I3135d2e203ecacfeff4a5b8ffdcd4d62fbc1db33
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoDocument that QBasicTimer::start(int, QObject*) uses Qt::CoarseTimer
Bradley T. Hughes [Wed, 4 Jan 2012 11:25:36 +0000 (12:25 +0100)]
Document that QBasicTimer::start(int, QObject*) uses Qt::CoarseTimer

Change-Id: I553b33ac7adffb0a4fcdfc14d6e34b4e7a494c4d
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoWarn when using QBasicTimer::start() incorrectly
Bradley T. Hughes [Wed, 4 Jan 2012 11:22:33 +0000 (12:22 +0100)]
Warn when using QBasicTimer::start() incorrectly

Previously, QObject::startTimer() would warn when called from
QBasicTimer::start() if there was no event dispatcher for the object's
thread. QBasicTimer::start() should output a similar warning when there
is no event dispatcher for the current thread.

Change-Id: I1152f73216c3551c252a7a6995defebc9e1506c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoUpdate copyright year in license headers.
Jason McDonald [Thu, 5 Jan 2012 04:03:39 +0000 (14:03 +1000)]
Update copyright year in license headers.

Change-Id: I02f2c620296fcd91d4967d58767ea33fc4e1e7dc
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoFix memory leak in QAbstractItemModel autotest.
Jason McDonald [Wed, 4 Jan 2012 03:29:42 +0000 (13:29 +1000)]
Fix memory leak in QAbstractItemModel autotest.

The test was allocating a new model on the heap each time init() was
invoked, but none of these models were deleted.

Change-Id: Ibe107b2dbc949a5f72940f67c08f4b0f46256c09
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoPrevent QFileInfo test from leaving temporary files behind.
Jason McDonald [Tue, 3 Jan 2012 04:02:47 +0000 (14:02 +1000)]
Prevent QFileInfo test from leaving temporary files behind.

Use a small helper class to ensure that the files created during the
test are removed afterwards, even if the test fails. Also, verify
creation of the files in the body of the test function, not in the
helper, as verifying in the helper won't terminate the test on failure.

Change-Id: I76eff20e54ef6a1ed71d9bbb31e00f41f3d14c38
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoChanged tests: qmake,selftest and lancelot to use QFINDTESTDATA.
Kurt Korbatits [Wed, 4 Jan 2012 02:28:20 +0000 (12:28 +1000)]
Changed tests: qmake,selftest and lancelot to use QFINDTESTDATA.

Changed these tests to use QFINDTESTDATA macro to detect location of testdata.
Checking for a specific file contained in the testdata so as not to be confused by empty directories
created during configure.

Change-Id: Iac2ac6304b6b9ac79e00886025b93ec0af5a8507
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoAdded flag operators for Qt::InputMethodQueries
Pekka Vuorela [Wed, 4 Jan 2012 10:51:30 +0000 (12:51 +0200)]
Added flag operators for Qt::InputMethodQueries

Change-Id: I9e65e81c0a5a9854e28e24315a021371c9170f3f
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoRegistered QUuid in the metatype system as a builtin type.
Denis Dzyubenko [Mon, 2 Jan 2012 15:25:17 +0000 (16:25 +0100)]
Registered QUuid in the metatype system as a builtin type.

Change-Id: I6be6129d9f6bf468ba8a5805cfa0f6f79199afb3
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
12 years agoQTextLayout::lineAt() to return invalid line if index is out of bounds
Pekka Vuorela [Tue, 3 Jan 2012 13:07:13 +0000 (15:07 +0200)]
QTextLayout::lineAt() to return invalid line if index is out of bounds

Change-Id: I1f93789c96f3b2335b02897ff5fc8385964d1641
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoSupport RTL text with merge font engines
Jiang Jiang [Tue, 3 Jan 2012 14:35:32 +0000 (15:35 +0100)]
Support RTL text with merge font engines

Text like Urdu use mixed RTL scripts from Persian, Arabic and so on.
In RTL, sub glyph runs for individual font engines must be added from
end to start, so that the positions can still be calculated in a left
to right manner.

Task-number: QTBUG-23404
Change-Id: I7e55e4b7b858b3abbe94e352c93d36de6226ff58
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoIntroduced QOpenGLContext::aboutToBeDestroyed() signal.
Samuel Rødal [Wed, 4 Jan 2012 13:17:45 +0000 (14:17 +0100)]
Introduced QOpenGLContext::aboutToBeDestroyed() signal.

This signal can be used to clean up OpenGL resources in a safe way
before the context is destroyed.

Task-number: QTBUG-20083
Change-Id: I45a4be01b06af4ee7196fa502116f099d50afeab
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
12 years agoFix compiler warnings in QtNetwork.
Friedemann Kleint [Wed, 4 Jan 2012 08:42:07 +0000 (09:42 +0100)]
Fix compiler warnings in QtNetwork.

- Initialization order in QHttpNetworkConnectionChannel
- Potential use of uninitialized value in QNetworkReplyDataImpl

Change-Id: Ia405147ef81a3f1509149349d6b5b01bb078f853
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoQApplication: Remove unused variable causing a compiler warning.
Friedemann Kleint [Wed, 4 Jan 2012 14:20:18 +0000 (15:20 +0100)]
QApplication: Remove unused variable causing a compiler warning.

Change-Id: I418ac16a2b3e119569512e38d3f00fb493b769d1
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemoved obsolete function QUuid::operator QString()
Denis Dzyubenko [Mon, 2 Jan 2012 15:47:59 +0000 (16:47 +0100)]
Removed obsolete function QUuid::operator QString()

It is a source incompatible change, but I believe it is safe to say that it is
a small change, which doesn't affect many people.

Change-Id: Iad11befe4cca60484cf4e04cd3049c93a4ea5faf
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoRemove old accessible itemviews code.
Frederik Gladhorn [Thu, 1 Dec 2011 18:49:35 +0000 (19:49 +0100)]
Remove old accessible itemviews code.

We are moving to use IAccessible2.
This code is dead.

Change-Id: Ib1687faeafbec84cfa3b123d6f6398998033d342
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoSplit polling watcher out to its own seperate files.
Robin Burchell [Wed, 4 Jan 2012 20:44:35 +0000 (21:44 +0100)]
Split polling watcher out to its own seperate files.

Just helps maintain sanity and clarity a bit.

Change-Id: Iaf00f9ecf2d959afcd8fe18bbca71a403cf9818d
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoFix QPainter::drawText with complex brushes
Simon Hausmann [Wed, 4 Jan 2012 15:32:55 +0000 (16:32 +0100)]
Fix QPainter::drawText with complex brushes

Commit d52fd497f60a3c4456994f4f10e9451d611c9ea4 introduced a call path to
QPaintEngineEx::drawStaticTextItem, which has a bug in using the pen's color
instead of the entire brush.

This patch replaces the use of the color with the pen's brush().

Task-number: QTBUG-23450
Change-Id: Ieb3bf352c840ff0d3fb4ac678caf7b13f4f9a8f1
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
12 years agoPass notification of failure of watches onto the caller.
Robin Burchell [Tue, 27 Dec 2011 21:30:05 +0000 (22:30 +0100)]
Pass notification of failure of watches onto the caller.

This is particularly useful for situations where the user might really want to
be notified about a failure, for instance, in a backup application.

Empty paths are not treated as an error in calling, as the user code cannot
really do anything sensible to handle this error, but empty paths should not be
used.

Change-Id: Iddb44fd39f4e3fac5c3f9f60fb7999e1833280a8
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoEmit error if trying to connect while socket is connected or connecting.
Jonas M. Gastal [Tue, 27 Dec 2011 20:00:18 +0000 (18:00 -0200)]
Emit error if trying to connect while socket is connected or connecting.

This applies to both local and abstract sockets.

Task-number: QTBUG-22450
Change-Id: I5c58d68da95ffb6bcde5be510853359b288e5984
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
12 years agoDon't release timer ids in event dispatcher code
Bradley T. Hughes [Tue, 20 Dec 2011 10:38:35 +0000 (11:38 +0100)]
Don't release timer ids in event dispatcher code

3rdparty event dispatchers are impossible to write without using the
internal API QAbstractEventDispatcherPrivate::releaseTimerId(). Fix
this by having each QObject keep track of its own timer ids, and
release them when they are no longer used. As a side effect, this
makes the QObjectData::pendTimer bit unnecessary.

This also removes the QObjectData::inThreadChangeEvent hack that the
event dispatchers used to avoid releasing timer ids when moving timers
to a new thread.

QBasicTimer becomes even more low-level. It cannot use
QObject::startTimer() anymore, since we do not have a way to call
QObject::killTimer() from QBasicTimer::stop(). QBasicTimer uses the
QAbstractEventDispatcher interface directly, and releases the timer id
explicitly as well when stopping the timer.

This change also fixes some rare timer id "leaks" when destroying or
stopping timers after a thread has exited and destroyed its event
dispatcher (the timer ids would never be released when no dispatcher
exists).

Globally destructed QObjects that have running timers may try to release
their timer ids after the timer id freelist has been destroyed. This
commit accomodates such objects by avoiding the null dereference in
QAbstractEventDispatcherPrivate::releaseTimerId().

Change-Id: I2d7cd8221fae441f3cf02b6c0b4bc16063834d00
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoFix rare crashes in fontconfig fontdb due to uninitialized variable
Simon Hausmann [Wed, 4 Jan 2012 12:04:58 +0000 (13:04 +0100)]
Fix rare crashes in fontconfig fontdb due to uninitialized variable

Initialize the out variable passed to FcPatternGetString to protect
against the "failure" case. Otherwise the subsequent QString::fromUtf8
is called with an uninitialized pointer.

Change-Id: I31b8b4c366f673609b26eca162334fd8bc9f25d2
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoRefactor QVariant handlers.
Jędrzej Nowacki [Tue, 29 Nov 2011 14:42:33 +0000 (15:42 +0100)]
Refactor QVariant handlers.

QVariant implementation is based on delegation to a handler. The handler
has rather simple construction, it is a set of function that implements
a switch statement over known types and redirects calls to a right
method of an encapsulated types instance. Unfortunately after qt
modularization project, it is not easy to use types directly from
different modules, as they can be undefined or completely unaccessible.
Which means that each module has to implement own handler to cooperate
correctly with QVariant. We can suspect that list of modules known to
QVariant will grow and it is not limited to GUI, Widgets and Core,
therefore it would be nice to have an unified, from performance and
source code point of view, way of working with handlers.

This patch is an attempt to cleanup handlers. Keynotes:
- Each handler is working only on types defined in the same module
- Core handler implements handling of primitive types too
- Custom types have an own handler
- Each handler is independent which means that dispatch between handlers
  is done on QVariant level
- Handlers might be registered / unregistered using same interface

Change-Id: Ib096df65e2c4ce464bc7a684aade5af7d1264c24
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoconfigure: Remove -nokia-developer option
Kai Koehne [Tue, 3 Jan 2012 15:01:40 +0000 (16:01 +0100)]
configure: Remove -nokia-developer option

There's no good reason to still differentiate between 'Nokia' developers,
and Qt developers outside of Nokia, inside configure. Just use
-developer-build -opensource -confirm-license.

Change-Id: I8726947dae0c70412eb52bf9d88eda4aa061ef26
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoExport QOpenGLTextureCache
Jørgen [Mon, 2 Jan 2012 09:20:14 +0000 (10:20 +0100)]
Export QOpenGLTextureCache

because it can be useful outside QtGui. The function
QOpenGLTextureCache::bindTexture gives a very convenient way to get a
texture from an image.

Change-Id: I2e22c0a3a8f1f307d0b558280043f726e3d8093a
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agofix invalid connection in tst_QProcess::lockupsInStartDetached
Joerg Bornemann [Mon, 2 Jan 2012 10:43:48 +0000 (11:43 +0100)]
fix invalid connection in tst_QProcess::lockupsInStartDetached

Change-Id: I06f2d56f5c45c13bbe08707e6baad4f2aece39b8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
12 years agoDeinlined QLocale::operator==
Denis Dzyubenko [Mon, 2 Jan 2012 21:34:50 +0000 (22:34 +0100)]
Deinlined QLocale::operator==

Some time ago this was a blocker that didn't allow to refactor QLocale
implementation due without making binary incompatible changes. Deinlining those
functions for Qt5, it shouldn't be performance critical code path.

Change-Id: I6cb19e32188a2df223d04be0c613a6176ad8d118
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
12 years agoMarked QUuid as Q_MOVABLE_TYPE in the metatype system.
Denis Dzyubenko [Mon, 2 Jan 2012 16:16:04 +0000 (17:16 +0100)]
Marked QUuid as Q_MOVABLE_TYPE in the metatype system.

Change-Id: I3d343b71294ad5640636694d1a079ea9dcca6348
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Prasanth Ullattil <prasanth.ullattil@nokia.com>
12 years agoAvoid QCOMPARE outside test function in QSettings test.
Jason McDonald [Tue, 3 Jan 2012 05:16:14 +0000 (15:16 +1000)]
Avoid QCOMPARE outside test function in QSettings test.

QCOMPARE and friends should only be called in a test function.  Instead
of calling QCOMPARE elsewhere, keep a count of the number of errors and
QCOMPARE that count with zero in the test function.

Change-Id: I9a264e91169a98c30980fdc04a3e45bfb0ca8063
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoRemove redundant debug code from QFileSystemWatcher test.
Jason McDonald [Tue, 3 Jan 2012 04:33:44 +0000 (14:33 +1000)]
Remove redundant debug code from QFileSystemWatcher test.

There is no need to print out the name of the backend used by each test
run of a test function as every message output by the test function will
have the name of the current data row included.

Change-Id: Ie69881d2ecedce728ea67b5aae1c1196776552a5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
12 years agoAdd virtual destructors to accessible interfaces.
Frederik Gladhorn [Tue, 3 Jan 2012 16:50:02 +0000 (17:50 +0100)]
Add virtual destructors to accessible interfaces.

Change-Id: I60a6033911757f86c70f06c2d8d4240d2332b4cf
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Reviewed-by: Alban Crequy <alban.crequy@collabora.co.uk>
12 years agoAccessibility: extend listview unit test.
Frederik Gladhorn [Thu, 8 Dec 2011 13:10:46 +0000 (14:10 +0100)]
Accessibility: extend listview unit test.

Test more functions from Table Cell.

Change-Id: I43b8766138350ece781bdaba7ab10fde8542aa4f
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoFixed static assert in qvariant template magic
Denis Dzyubenko [Tue, 3 Jan 2012 16:05:49 +0000 (17:05 +0100)]
Fixed static assert in qvariant template magic

CallConstructor<T, /* CanUseInternalSpace = */ false> is called when we need to
construct an object that couldn't be fit in qvariantdata, meaning either it is
not a POD type (Q_PRIMITIVE_TYPE), or it is simply too large to fit there.

Change-Id: Ied122b4a6f600e14312a8d515f5b3e91214a94f1
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
12 years agoMake QCocoaEventDispatcher inherit from QAbstractEventDispatcher
Bradley T. Hughes [Mon, 2 Jan 2012 08:23:49 +0000 (09:23 +0100)]
Make QCocoaEventDispatcher inherit from QAbstractEventDispatcher

... instead of QEventDispatcherUNIX. The Cocoa dispatcher does not use
any of the facilities of the UNIX dispatcher, and it reimplements every
virtual method already (with the exception of flush(), which just needs
an empty implementation).

Change-Id: I24aefd169888946afac7800192a0f96770787718
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
12 years agoUse meta object to get string rep of QAccessible::Role.
Frederik Gladhorn [Fri, 9 Dec 2011 10:06:28 +0000 (11:06 +0100)]
Use meta object to get string rep of QAccessible::Role.

Change-Id: I69320b69ea13ebc594575277e39d30a066df61fd
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
12 years agoAlways load the openssl configuration.
Richard Moore [Tue, 27 Dec 2011 16:09:59 +0000 (16:09 +0000)]
Always load the openssl configuration.

This change makes Qt load the default openssl config always, not just
when compiled with OPENSSL_LOAD_CONF. This means that facilities like
openssl engines (and their configuration) are usable. An alternative
would be to call OPENSSL_config(NULL) ourselves, but that's exactly
what the OPENSSL_add_all_algorithms_conf does for us.

Task-number: QTBUG-16018
Change-Id: I4cda701f82627e0541b6225009f4e1249aec9d47
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQStandardPaths: add GenericCacheLocation.
David Faure [Mon, 2 Jan 2012 22:36:05 +0000 (23:36 +0100)]
QStandardPaths: add GenericCacheLocation.

Much like DataLocation = GenericDataLocation + domain + appname,
this makes CacheLocation = GenericCacheLocation + domain + appname.
This way a framework library can have an application-independent cache
(like ksycoca).

Change-Id: I6a8c47ff85b7d5c68b594cc8b071a752d96b029d
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoQLineEdit to use Qt::ImhSensitiveData input hint on password echo modes
Pekka Vuorela [Mon, 2 Jan 2012 14:34:19 +0000 (16:34 +0200)]
QLineEdit to use Qt::ImhSensitiveData input hint on password echo modes

Change-Id: I6922e41e7e57563f1190f46e0890b71e5c4b7ef4
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
12 years agoMake sure tst_QThreadStorage finds its subprocess
Bradley T. Hughes [Mon, 2 Jan 2012 11:38:45 +0000 (12:38 +0100)]
Make sure tst_QThreadStorage finds its subprocess

On Mac, the application's dir is in the bundle, so we need to "escape"
the bundle when looking for the an executable relative to the
application's dir path.

Change-Id: I5c01f7d816ec8cc30f5277202f4eefb0c49a2bc3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agodirectfb: Refer to the right class in the error message
Holger Hans Peter Freyther [Mon, 2 Jan 2012 16:14:38 +0000 (17:14 +0100)]
directfb: Refer to the right class in the error message

Change-Id: I41d0b95092d16bc3a643fca903c68be82813dad6
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
12 years agoBuild fix if using '-no-stl' configure option
Yuchen Deng [Fri, 30 Dec 2011 13:02:17 +0000 (21:02 +0800)]
Build fix if using '-no-stl' configure option

MSVC2010SP1:
error C3861: 'wmemcpy': identifier not found

Change-Id: Ib28edb5e38d691635c56dac846134e1c88c3f312
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
12 years agoUse true and false in preference to TRUE and FALSE in tests.
Jason McDonald [Fri, 30 Dec 2011 05:51:05 +0000 (15:51 +1000)]
Use true and false in preference to TRUE and FALSE in tests.

Use the C++ boolean constants true and false instead of the C macros
TRUE and FALSE (which are actually integers), and use QVERIFY instead of
QCOMPARE for verifying simple boolean expressions.

Change-Id: Ie76dfcab6722df6b93b3fa62b0f3437901482932
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
12 years agoClose bracket in documentation.
Stephen Kelly [Mon, 2 Jan 2012 14:14:48 +0000 (15:14 +0100)]
Close bracket in documentation.

Change-Id: Iabc7c6a9f5554450e766dc63f518595871a3abb7
Reviewed-by: Richard J. Moore <rich@kde.org>
12 years agoRemove support for dnotify QFileSystemWatcher.
Robin Burchell [Tue, 27 Dec 2011 17:24:57 +0000 (18:24 +0100)]
Remove support for dnotify QFileSystemWatcher.

Inotify has been available in Linux for some ~6 years now, 7 when Qt 5 will
actually be released, so I'd say it's safe to remove this fallback path now,
particularly as the autotest notes that it's broken.

Change-Id: I49dbb161d4765d63e92f512a6375323c7d37ccbe
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoMerge integrity support into unix.
Robin Burchell [Tue, 27 Dec 2011 17:28:21 +0000 (18:28 +0100)]
Merge integrity support into unix.

Similarly to ec9ea7f3e819cb0c2da8c8977f9cc44688c9b6f6, the code in unix
(non-Linux/OS X) is actually the same as for integrity, so merge the
conditionals together to save duplication.

This should have the side-effect of unbreaking Qt 5 on integrity wrt
the new QStandardPaths introduction, which was not added to the integrity
block.

Change-Id: Ib512fa781f5ceb240069888ce6958c9af2990d37
Reviewed-by: Rolland Dudemaine <rolland@ghs.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoFix crash in positionInLigature
Jiang Jiang [Fri, 16 Dec 2011 13:21:49 +0000 (14:21 +0100)]
Fix crash in positionInLigature

Check boundary of pos before accessing attributes.

Task-number: QTBUG-23104
Change-Id: I0bc93dbe320badc65acc75bb59b27f481e69b93e
Reviewed-by: Eskil
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
12 years agoChange the default value of QSortFilterProxyModel::dynamicSortFilter
Stephen Kelly [Tue, 20 Dec 2011 11:56:01 +0000 (12:56 +0100)]
Change the default value of QSortFilterProxyModel::dynamicSortFilter

The value is changed to true. It is a common bug that developers expect
this proxy model to reflect the source model when the source changes.
That requires setDynamicSortFilter(true), so we change the default to
optimize for the common case.

Change-Id: I9bf7efdbda10309fa77aed9391c33054aaae4a29
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoSend ApplicationActivate and ApplicationDeactivate from QtGui.
Samuel Rødal [Fri, 9 Dec 2011 16:29:25 +0000 (17:29 +0100)]
Send ApplicationActivate and ApplicationDeactivate from QtGui.

Instead of only from QApplication in QtWidgets, as we need these events
for example in QDeclarativeApplication.

Task-number: QTBUG-21573
Task-number: QTBUG-23331
Change-Id: I0c960bd1c7911d306d274a6e9a1838f158235ed0
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@nokia.com>
12 years agocorelib: Introduce Q_ALLOC_SIZE and use it on qMalloc and friends
Holger Hans Peter Freyther [Mon, 2 Jan 2012 12:31:46 +0000 (13:31 +0100)]
corelib: Introduce Q_ALLOC_SIZE and use it on qMalloc and friends

GCC 4.3 introduced the alloc_size attribute to hint the compiler
that allocated memory will be returned, inform the compiler which
parameter holds the size of the allocation.

Change-Id: I8734868f6bd19e201abdacd0a1b0fb80a27883c0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
12 years agoImplement (and unit test) simple QVarLengthArray::first()/last().
Robin Burchell [Wed, 14 Dec 2011 16:49:35 +0000 (17:49 +0100)]
Implement (and unit test) simple QVarLengthArray::first()/last().

Pure syntactical sugar, to match up with what the other container
classes offer.

Change-Id: I0f97de011923d9d204cca0fa906b059dc5054a89
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
12 years agoRemove Symbian support from src/corelib/io/.
Robin Burchell [Tue, 27 Dec 2011 17:11:08 +0000 (18:11 +0100)]
Remove Symbian support from src/corelib/io/.

Change-Id: I52c2a58396e03f29ca478de34c914535c7ae1012
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
12 years agoDo not unconditionally define QT_BEGIN_MOC_NAMESPACE
Denis Dzyubenko [Fri, 30 Dec 2011 13:18:28 +0000 (14:18 +0100)]
Do not unconditionally define QT_BEGIN_MOC_NAMESPACE

Qt5 modules are supposed to be in a namespace, but if the namespace definition
is hidden in a macro, then moc doesn't know about it and generates invalid
moc_xx.cpp that cannot be compiled due to usage of classes outside of their
namespaces - e.g. in qtjsondb we have QtAddOn::JsonDb::Foo class, but the
moc_foo.cpp expects to find that class in the global namespace instead.

Fixed it in QtJsonDb to define QT_BEGIN_MOC_NAMESPACE="QT_USE_NAMESPACE
QT_ADDON_JSONDB_USE_NAMESPACE", however we need to ensure qglobal.h doesn't
re-define that macro back.

Change-Id: Ic8407f50c11d2d787167ad2f92457aa3ec126d45
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
12 years agoInline some methods in qgrayraster.
Robin Burchell [Sat, 17 Dec 2011 22:33:51 +0000 (23:33 +0100)]
Inline some methods in qgrayraster.

gray_conic_to, gray_cubic_to and gray_line_to were all single line wrappers
around their equivilent gray_render counterparts, with an additional lie of
error handling that never actually happened.

Since this doesn't really do anything except confuse the reader, let's ... not
do it :)

Change-Id: Id5d86c49174acb92514b628a70bd32d6c6640a5d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
12 years agoRemove env var to enable accessibility on linux.
Frederik Gladhorn [Fri, 30 Dec 2011 11:45:52 +0000 (12:45 +0100)]
Remove env var to enable accessibility on linux.

Usually we don't have a plugin for this on linux anyway.
But if we do, we should actually allow it to interface with the
system.
When using AT-SPI the plugin can detect if it should be active.
Other plugins can fall back to using an env var if really needed.

Change-Id: Ic9dcfa305e7cdafbf4a93bcc2dc9a0fcd9b9a7a2
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>