Commit Graph

3818 Commits

Author SHA1 Message Date
João Abecasis
3224002273 Don't use RefCount int operators
The previous patch missed this, which was hidden inside #ifdefs.

Change-Id: Iba1417d4191b6931afb549022768f3e3a2cf727d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-24 14:10:17 +01:00
João Abecasis
3249aab539 Don't use RefCount int operators
, as those are going away.

The comment in QString/QByteArray::squeeze  about shared_null was updated as it
also affects other static data, such as that generated by QStringLiteral and
QByteArrayLiteral.

Change-Id: I26a757d29db62b1e3566a1f7c8d4030918ed8a89
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-23 17:40:18 +01:00
João Abecasis
cc568ec342 Remove obsolete function
QVectorData::allocate is able to handle higher alignment that
QVectorData::malloc didn't.

This was kept for BC issues in the 4.x series, we can drop it now.

Change-Id: I7782bd2910de6b9c8dee3e63e621629dc3889d33
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-19 11:50:04 +01:00
João Abecasis
66f192e294 Move Q_CHECK_PTR to inline code
The behavior of Q_CHECK_PTR is user-configurable. It may throw and
exception, output a warning or be a no-op. As such, its best used in
inline code that gets compiled into the user application.

Moving it out of the QArrayData API also enables this to be used in code
that must handle out-of-memory errors without crashing or otherwise
issuing warnings.

Putting in QArrayDataPointer gives good convenience coverage for those
who are implementing containers on top of the QArrayData stack, and
covers its use in the SimpleVector test case. It intentionally leaves
out the use of allocate to access the (hidden) shared-empties which
don't really allocate, anyway (in QArrayDataPointer::clear and
setSharable).

The autotest is not updated and will have to make do without the
Q_CHECK_PTR "protection". I think that is ok.

Change-Id: Idcad909903a9807866bf23ace89f1bf1edc53c3b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-18 22:08:05 +01:00
João Abecasis
e465a8c58c Don't use qMalloc/qFree in non-inline code
This propagates changes in b08daaedd4 to
this branch.

Change-Id: I3b72f53c7b24d27075ea8593c347b504bfd8f581
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-17 17:59:29 +01:00
João Abecasis
9e9f7a482a Don't use RefCount int operations
, as those are going away.

This cleans use of those operations in the QArrayData stack.

Change-Id: I67705fe0a2f8d99ea13739b675021356a5736f83
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: hjk <qthjk@ovi.com>
2012-01-17 15:37:47 +01:00
João Abecasis
301f7b780c Don't check reference count in QLinkedList<T>::free
This is a private function that was always* called after d->ref.deref()
returned false to free the linked list. Still, it needlessly verified
the reference count to be zero.

The check is thus replaced with a Q_ASSERT to check the invariant on
debug builds.

*This commit also fixes an issue where free would be called on a block
that hadn't been deref'ed, thus leaking the nodes. Since this was in an
exception handling block, and happens before any code has a chance to
reference the block the explicit deref is skipped in that case.

Change-Id: Ie73c174d0a1b84f297bf5531e45f829e66a46346
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-17 10:17:01 +01:00
João Abecasis
b3a4d3e328 Rename QArrayData::AllocateOption to AllocationOption
Change-Id: Id3e7c748b4b40d703ad1785c903c96bdd968390e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-16 20:40:16 +01:00
João Abecasis
f4c1e2c40f Enable QArrayData to reference external array data
By default, QTypedArrayData::fromRawData provides the same semantics as
already exist in QByteArray and QString (immutable, sharable data), but
more combinations are possible. In particular, immutable-unsharable
leaves the data owner in control of its lifetime by forcing deep copies.

As part of this, a new isMutable property is introduced in QArrayData.
This could be taken to be implicit in statics that are initialized with
a proper size but with alloc set to 0. QStringLiteral and QByteLiteral
already did this, forcing re-allocations on resize even before the
(static, thus shared) ref-count is considered.

The isMutable property detaches data mutability and shared status, which
are orthogonal concepts (at least in the unshared state). For the time
being, there is no API to explicitly (re)set mutability, but statics and
RawData mark data immutable.

Change-Id: I33a995a35e1c3d7a12391b1d7c36095aa28e221a
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-01-16 18:10:58 +01:00
João Abecasis
5b250d497f Merge remote-tracking branch 'gerrit/master' into containers
Change-Id: I2d358b912f1055ee6021d13de2f66fd459aaa355
2012-01-16 17:53:41 +01:00
Frederik Gladhorn
7a0099183a Accessibility plugin is for widgets.
Change-Id: Ifbfe1a7ec62979097ad82343b20be823579d99b9
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-16 15:27:50 +01:00
Jan-Arve Saether
56c80382c6 Remove all reimplementations of relationTo() returning Unrelated.
QAccessibleInterface::relationTo() already return
QAccessible::Unrelated by default. No need to duplicate that code.

Change-Id: I40e6758b946c43ca8773cdb2d28407edf99aad49
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-01-16 15:27:50 +01:00
Morten Johan Sorvig
1f7aa83661 Remove Qt4 Mac accessibility backend files.
Change-Id: I2c41050b5965756ae4c2ecfe73ba5926880ed98d
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-16 13:48:30 +01:00
Lars Knoll
d6fb349751 Remove a ###
Change-Id: Ibc92317b07f3746c7978e571cae105535c01e1d6
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Richard J. Moore <rich@kde.org>
2012-01-16 13:48:30 +01:00
Lars Knoll
1d7db25bd6 Merge the makeEncoder/Decoder overloads.
Change-Id: I9fdeeafe08dd70c0ab9ce26a2fce3b8d803ca280
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-16 13:48:30 +01:00
Lars Knoll
6bf72a98ac Remove unused variable
Change-Id: Ib8725e89e40d6e12172b1da687da2e4d559444f3
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-16 13:48:30 +01:00
Lars Knoll
3b973971fb Fix ###'es in qrect.h
Change-Id: Id9635b6faeaf12ba2f7a0f70055b0df01cd16587
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-16 13:48:30 +01:00
Lars Knoll
bb5ae21c41 Fix ### comments in QSet
Change-Id: I302be7dc4cd7a9c2b9e35e8142ca100d6f86da7c
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-01-16 13:48:30 +01:00
Samuel Rødal
e469323407 Use QFunctionPointer in QOpenGLContext as well.
Change-Id: I7192e6aea721c75257bfbd1d205d5ce7764d915f
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-01-16 13:48:30 +01:00
Bradley T. Hughes
802c3580e0 Cleanup properly when destroying QCocoaWindow
[NSNotificationCenter addObserver]'s documentation clearly states that
removeObserver needs to be called before releasing the object being
observed. The m_contentView we create was never released either, so be
sure to release that as well.

Change-Id: Ia54eb1c5c751f4cb0edb21ad559b261cb8f24208
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
2012-01-16 13:48:30 +01:00
Samuel Rødal
9702400e2d Fixed QGLContext::getProcAddress() to return a function pointer.
Task-number: QTBUG-5729
Change-Id: I57e71f89a2c5ca7f74f73c66adcbf4a6cc073813
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2012-01-16 11:47:32 +01:00
Xizhi Zhu
5b1aa4c75d Fixed build break when bearer is disabled.
Change-Id: I29e88b046f6502c84acc9c6f566ecc328cf24e38
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2012-01-16 11:29:04 +01:00
Uli Schlachter
23a372ab8d xcb: Obey maximum request length when uploading images
When connecting to an X11 server, the server tells the client what its
maximum allowed request size is. Larger requests are not permitted.
Thus, libxcb verifies that all requests which are sent are smaller than
this size limit and possibly kills the connection (without any good
error message).

Thus, when uploading an image, we could be trying to send more pixel
data than fit into a single request. If this would be the case, the
code will now use multiple requests where each request only sends a
part of the allowed rows.

In case all the data fits into a single request, this commit shouldn't
change any behavior.

Change-Id: I84a4ebfcdb6de7e206015c37e3e33cba3bd309b1
Signed-off-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-16 11:01:09 +01:00
Frederik Gladhorn
ba888bb8c8 Clean up and extend QAccessible::State.
The state should contain useful and clear information.
Some of the old enum/bitfield members were not really clear.
Make them follow Qt terminology and shift the burden of interpreting
them to the bridge.

Apart from the previous commit changing from enum to bitfield, these
flags have changed names:

unavailable -> disabled
mixed -> checkStateMixed
protected -> passwordEdit (in the last commit)

floating is completely removed, even MSAA documentation states it is unsupported.

Some new states have been added.
Documentation added.

Change-Id: I152256e77a061f28ee5780f527524c80a2c7e333
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-16 08:55:37 +01:00
Toby Tomkins
169b9cac64 Flag tst_qmenubar tests as unstable.
Task-number: QTBUG-4965
Task-number: QTBUG-11823

Change-Id: Ie8b5093867cf177197e405fdcf3205d4436c110a
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 08:52:05 +01:00
Toby Tomkins
6b99b97556 Flag tst_QDoubleSpinBox::task255471_decimalsValidation test as unstable.
Task-number: QTBUG-23641

Change-Id: Iaa44ab20d2e50cd6fb0a1327efef35c1036f9e4c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 08:52:02 +01:00
Toby Tomkins
a2e5f36552 Flag tst_QComboBox tests as unstable.
tst_QComboBox::keyBoardNavigationWithMouse and
task_QTBUG_1071_changingFocusEmitsActivated tests are unstable.

Task-number: QTBUG-23639

Change-Id: Ib8363505213117c581ea2921ebc58d4c2ec4cf8c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 08:52:00 +01:00
Frederik Gladhorn
15598b46c1 Accessible docs - editable text interface.
Change-Id: Id8b64ff9674b7cd4ac8551528239e8ab97563764
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
2012-01-16 08:49:15 +01:00
Rohan McGovern
e08453f31a xcb: abort (rather than segfault) when X is not available
Be more user-friendly (e.g. when logging into a machine by ssh and
forgetting to export DISPLAY).

Change-Id: I9d07b0af9c5b4841827826053bb27b507801ae61
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-01-16 08:26:16 +01:00
Toby Tomkins
db549f90fa Flag tst_QTreeView::styleOptionViewItem test as unstable.
Task-number: QTBUG-23638

Change-Id: I8c07976001aeec5ba796d4b3e9ee421e32ba1360
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 05:30:36 +01:00
Toby Tomkins
5341880105 Flag tst_QItemDelegate::task257859_finalizeEdit test as unstable.
Task-number: QTBUG-23637

Change-Id: Ib08431ab1752c354f62646b3c207d9c24ac5eae5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 05:30:36 +01:00
Toby Tomkins
d4d14e28e6 Modify SSL Socket test exceptions on Ubuntu 11.10 x64.
Modified exceptions as most tests are now passing correctly. Three exceptions
still remain, two serverSideMode tests (ssl3-any, tls1.0-any) and a
verifyMode test.

Task-number: QTBUG-23575

Change-Id: I847e8c2e3484050b8d07ede9aec955c30f7ef5a1
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 05:30:36 +01:00
Olivier Goffart
24a72c4efa qglobal: Remove symbian specific features
Change-Id: Ie0480b0c80b68a86e77bf3552546f494cdaf66c1
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-01-16 03:52:32 +01:00
Olivier Goffart
a03b4e4417 Improve the documentation of QStringLiteral
Change-Id: I4bbe18ecc342f034fbc8e9fd14b700ee5272076f
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
2012-01-16 03:51:14 +01:00
Jason McDonald
51cb2dd00a Remove unused QTestResult::allDataPassed().
The removed function was private API and was not used anywhere in Qt.

Change-Id: Ia262d119ebba30f6968cb7145043475bf88ffa39
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 01:57:23 +01:00
Jason McDonald
1066d185a6 Rename QTestLog::addIgnoreMessage to QTestLog::ignoreMessage.
Change-Id: I4cfcd00d444d0812c58afab6ffd43dee37db1340
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 01:56:51 +01:00
Kurt Korbatits
d9a50fc1dc Moved largefile unittest to same level as qfile.
- Moved largefile from out of qfile unittest directory to be on
  same level as qfile.

Change-Id: I479b0b33594812759f8a6a7be61f8340f64234e9
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 01:55:31 +01:00
Kurt Korbatits
7940521fd9 Changed qrawfont unittest to work from installation directory.
- uses QFINDTESTDATA instead of SRCDIR
- Added check to test if fonts are present and generate one skip instead
  of 1200+ on platforms were no fonts are available for testing.
- fail if unittest fonts not found.

Change-Id: I9c051cf8cef6cd355f16647c614c86771dcf6150
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-16 01:55:26 +01:00
Kurt Korbatits
990e890b9e Changed unittests in corelib to use specific headers instead of super-headers.
Modified unittests to use specific class headers instead of
using super-headers like QtCore that pull in all the headers for
the module.
- Decreasing build time.

Change-Id: I9c3fd0767be15205893bb406f609c8283a2a3a5a
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 01:55:22 +01:00
Kurt Korbatits
f1da37e989 Changed qprocess unittest to work from installation directory.
- All subprograms installed as part of test instead of separate installs
  using installTestHelperApp() from testcase.prf
- Removed use of app_bundle for subprograms

Change-Id: I0a3de021800d36bd48479f63588b09fc7e60f32f
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-16 01:55:18 +01:00
Toby Tomkins
2087db0b20 Flag tst_QGraphicsWidget::updateFocusChainWhenChildDie test as unstable.
Task-number: QTBUG-23616

Change-Id: I664c77b16ac6b2ecd89d362a2c3c3028bd3246c0
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 01:42:26 +01:00
Toby Tomkins
e575e2316a Flag tst_qcalendarwidget::buttonClickCheck test as unstable.
Task-number: QTBUG-23615

Change-Id: I4ce9e415c29167ef9fdc584ac3543aa5f109bcf2
Reviewed-by: Kalle Lehtonen <kalle.ju.lehtonen@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-01-16 01:42:22 +01:00
Rohan McGovern
78f1dd251a Fixed failure of tst_qhostinfo since ~15 Jan 2012
This test hardcodes IP address / hostname pairs to be used for forward
and reverse lookups.

The reverse DNS entry for 62.70.27.69 has recently disappeared.  Replace
it with an IP / name pair which is (hopefully) much less likely to
disappear.

Change-Id: I03f589e1c0f4bde0b1a14e94b3c1047eeb81246e
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-01-16 01:38:36 +01:00
Liang Qi
e1ddac9b20 Remove references to openvgversion.h
Because OpenVG was removed from qtbase.

Change-Id: Id92ac98a6dee7679248bc3c82554e92386e7ef61
Reviewed-by: Liang Qi <liang.qi@nokia.com>
2012-01-14 14:48:16 +01:00
Olivier Goffart
d057065cbb Document Q_DECL_CONSTEXPR
Change-Id: I61f4017186e8c7b943855723d7c677a01f7a7bf7
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
2012-01-14 10:27:35 +01:00
Kurt Korbatits
0d128aded5 qmake wasn't handling spaces in names when dealing with extra installs.
When installing extra binaries the paths where not being escaped,
causing stripping and deleting to fail when dealing with filenames
that contained one or more spaces.

Change-Id: Iba4517b1110f6af30f7e2662cb86024a8b7b81f7
Reviewed-by: Kurt Korbatits  <kurt.korbatits@nokia.com>
Reviewed-by: Lincoln Ramsay <lincoln.ramsay@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-01-14 05:36:54 +01:00
Morten Johan Sorvig
e97d77d5bc Clean up QCocoaIntegration destruction.
Fix memory leak - delete the font database. Remove
the NAApplication delegate.

Change-Id: I7c69eb4df01c8450c0abde360f77fbb318b20c83
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-01-14 05:36:12 +01:00
Martin Smith
e58e1abbd9 qdoc3: Don't put \relates in class member functions.
This removes two uses of \relates that were unnecessary.

Task-number:  QTBUG-23599
Change-Id: I3e10375159f6535f56622f9d24e16151938c63c3
Reviewed-by: Martin Smith <martin.smith@nokia.com>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
2012-01-14 03:55:26 +01:00
Janne Anttila
106bab644a Fix qsystemerror for WinCE
Windows CE does not have strerror(_r), so lets use string formatting
provided by windowsErrorString function.

In order to use windowsErrorString it was moved before
standardLibraryErrorString function.

Task-number: QTBUG-22498
Change-Id: Ifa20c4ac314ac8a26de6b0c5b67ced96b262c2b4
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
2012-01-14 03:55:03 +01:00
Mark Brand
f0841fe4cf remove symbian support vestiges from text codecs
Change-Id: I7b577d360cb9c7225da108ee56fd927a91a04dee
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-01-14 03:54:41 +01:00