Commit Graph

3594 Commits

Author SHA1 Message Date
Joerg Bornemann
c85121989f qmake: fix /MP option for VS 2010
Setting QMAKE_CFLAGS+=/MP in a project file did not work for VS 2010.

Task-number: QTBUG-23490

Change-Id: I39c349bf8dc2a4add2f32a430a245a20cc54147e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-08 18:20:54 +01:00
Samuel Rødal
0ba89ed91f Detect autoreapeat in xcb plugin.
Until now QKeyEvent::isAutoRepeat() would always return false.

Change-Id: I7771bc7a7ec848ef280f99bada0a26eda188604e
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
2012-01-07 20:09:43 +01:00
Pekka Vuorela
a98741516c Move keyboard locale and input direction to QInputPanel
Deprecated QGuiApplication::keyboardInputLocale() and
keyboardInputDirection(), introduced QInputPanel::locale()
and inputDirection().

Change-Id: Ic48c77f10821a949751c73c73f22bd78e2192b9c
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-07 17:25:59 +01:00
Pekka Vuorela
a2fd2f90ec Introduced input method hints for latin
On many cases especially latin input is wanted. Hint for these may,
e.g., help virtual keyboards on changing the layout to a western one.
Added a hint for requiring and another for preferring latin based
input.

Change-Id: I0ea79643665e25d9f916c3b8d0b7d7352843c2dc
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-07 17:25:45 +01:00
Yuchen Deng
0277f14f48 Avoiding crash when insert preEditString
We will insert an preEditString by QInputMethodEvent
See:
Task-number: QTCREATORBUG-5633
Task-number: QTCREATORBUG-6082

Change-Id: I8cfc7ab2543455dfdff8ec3df983d384513453e0
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-07 17:25:00 +01:00
Jonas M. Gastal
b3ce4470ae 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>
2012-01-06 23:07:26 +01:00
Jan-Arve Saether
7dca461620 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>
2012-01-06 19:24:23 +01:00
Shane Kearns
ca5072fb18 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>
2012-01-06 19:24:23 +01:00
Thiago Macieira
c87bf2e8e6 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>
2012-01-06 19:24:23 +01:00
Friedemann Kleint
50e18de516 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>
2012-01-06 19:24:23 +01:00
Friedemann Kleint
1ff1288c04 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>
2012-01-06 19:24:23 +01:00
Stephen Kelly
054a4aa7dd 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>
2012-01-06 17:21:39 +01:00
Stephen Kelly
9eacf32de9 Move the qitemmodel test to the itemmodels directory.
Change-Id: I67e1008bea0d94ffbc52aad453a29645261e109e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-06 17:21:25 +01:00
Stephen Kelly
9ddd2c0f35 Remove documentation reference to non-existant class.
Change-Id: Idaaf16a9482edaa43e5b2389adc82cad701b1407
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-06 17:21:16 +01:00
Joerg Bornemann
d0bb97c327 split qprocess_win.cpp into Windows and WinCE parts
Change-Id: I7f2cf2c42dd24ca162238e6dc6408ac39dfcd790
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-06 14:44:41 +01:00
Bradley T. Hughes
156d160c56 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>
2012-01-06 14:40:57 +01:00
Kim Motoyoshi Kalland
fc6c050b40 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>
2012-01-06 14:33:56 +01:00
Frederik Gladhorn
ce5c8743e9 Constify more accessibility interface functions.
Change-Id: Iff8da09eef5288de92ccea753a8a5fda03e214b0
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-06 14:26:12 +01:00
Frederik Gladhorn
4f94c73d6b Image interface functions should be const.
Change-Id: I9c6ecd140abc4f4d5c28ad2228e1241d3891b5ad
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-06 14:24:07 +01:00
Robin Burchell
b08daaedd4 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>
2012-01-06 14:11:14 +01:00
Frederik Gladhorn
514ef34d1f Fix documentation.
Change-Id: Id54263f408e29ed3b9d06712e39759485a42b869
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-06 13:42:40 +01:00
Frederik Gladhorn
7e46af4a41 Remove qdoc for code that no longer exists.
Change-Id: I82d4ba930335a03181aa20c9e4cb060ca8b35b9a
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-06 13:42:37 +01:00
Frederik Gladhorn
f03099cee3 Remove docs for functions that no longer exist.
Change-Id: Id79d3eeab85b156348054c727ea1897ac3e5842b
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-06 13:42:34 +01:00
Frederik Gladhorn
05efb2e1c8 Fix documentation: missing const
Change-Id: Ie90afada6ffe3198314481dd6fc68bce67605efd
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-06 13:42:29 +01:00
Simon Hausmann
09ab5e60d1 Fix crashing data urls
Commit 231369eb04 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>
2012-01-06 13:41:46 +01:00
Robin Burchell
b44c6bef50 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>
2012-01-06 11:19:23 +01:00
Martin Petersson
5bdd20a085 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>
2012-01-06 11:19:23 +01:00
Richard Moore
b328e36e41 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>
2012-01-06 11:19:23 +01:00
Friedemann Kleint
c25d147c43 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>
2012-01-06 11:19:23 +01:00
Sergio Ahumada
c9ee64d8b7 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>
2012-01-06 09:38:31 +01:00
Frederik Gladhorn
41af951eef 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>
2012-01-06 09:38:31 +01:00
Frederik Gladhorn
dfa6ac160f Update docs.
Change-Id: Icd8cbcde6893cc0ee5e7df18b219513cdbc0b2da
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-06 09:38:31 +01:00
Samuel Rødal
d0f74e5dd9 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>
2012-01-06 09:38:31 +01:00
Jason McDonald
db0361e9b1 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>
2012-01-06 07:50:21 +01:00
Sami Rosendahl
e6b9382ae2 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>
2012-01-06 04:43:05 +01:00
Sami Rosendahl
d55cdcd59f 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>
2012-01-06 02:59:59 +01:00
Sami Rosendahl
1bc31fa43d 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>
2012-01-06 02:59:55 +01:00
Stephen Kelly
17cc46a9a7 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>
2012-01-06 00:46:18 +01:00
Bradley T. Hughes
7023bb1d35 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>
2012-01-05 22:15:25 +01:00
Bradley T. Hughes
c46654b3a5 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>
2012-01-05 22:15:25 +01:00
Albert Astals Cid
c355c300d9 Use clipboard_timeout instead of hardcoded 5000 (since its the same value)
Change-Id: Ia0edf04e36c8d30394a2bc9a691ab9aa78831f78
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-05 20:40:13 +01:00
Jonas M. Gastal
bf7f170607 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>
2012-01-05 15:07:51 +01:00
Bradley T. Hughes
eb0ce0d5c1 Use explicit Qt::TimerTypes when starting animation timers.
Similar to commit 4e1ad49998, 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>
2012-01-05 15:03:30 +01:00
David Faure
9498f1aa54 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>
2012-01-05 15:02:56 +01:00
Albert Astals Cid
ec104d7a54 Free the replies
Change-Id: I719bd95d94f3bfd41eeb09a49ac3e2701a516619
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-05 14:59:19 +01:00
Albert Astals Cid
689c4009fb 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>
2012-01-05 14:59:12 +01:00
Robin Burchell
848f53a268 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>
2012-01-05 14:35:59 +01:00
Pekka Vuorela
8ad583b7f9 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>
2012-01-05 11:40:08 +01:00
Pekka Vuorela
ad22c0c7cf 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>
2012-01-05 11:40:08 +01:00
Robin Burchell
55a0b33994 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>
2012-01-05 11:40:08 +01:00