Commit Graph

4724 Commits

Author SHA1 Message Date
Kent Hansen
81dc01d43f Bump the moc output revision
Commit aee1f6cc41 changed the values of
some built-in meta-type ids. Since the ids of built-in types are
directly encoded -- not as the symbolic QMetaType::Type name, but as
a raw integer -- in the flags for meta-properties, the moc output
prior to that change is incompatible with the current output.

Change-Id: I970484825137a4f19c80726cfe2024e741e3e879
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
(cherry picked from commit ca028e1fe0)
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-02-24 13:11:14 +01:00
Kent Hansen
57aba47cde Port badxml autotest to QMetaObjectBuilder
The meta-object format is going to change for Qt5. Use QMOB to
insulate the badxml test from such changes.

(It just so happens that the QFAIL("a failure") statement is still on
line 109 after the refactoring, so the expected_badxml.* files'
location tags did not have to be changed.)

Change-Id: I04421d13c4df71c8004fa71cafc4823a59079a41
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
(cherry picked from commit 12520e8300)
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-02-24 13:11:00 +01:00
João Abecasis
91e20fff87 SimpleVector: don't assert when reserving on empty
Change-Id: I09ac235085e645c8149c153653377252fef6fa3d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-22 21:18:11 +01:00
João Abecasis
a1621d235d Change QVector's in-memory data layout
The new layout matches that of QByteArrayData and QStringData, except
for offset which is measured from the beginning of QVectorData, whereas
in those classes it (still?) references the end of the header data.

The new layout uses an extra member for storing an offset into the data,
which will allow introducing QVector::fromRawData, similar to the same
functionality already existing in QString and QByteArray.

By not using an actual array to index array members, we also steer clear
of GCC bug #43247:

    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43247

Change-Id: I408915aacadf616b4633bbbf5cae1fc19e415087
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-22 17:37:29 +01:00
João Abecasis
a5233b6b22 Change meaning of offset in QStringData
It used to be an index into the first element in 'd' that came after
'offset'. It is now the byte offset from the beginning of the
QStringData structure.

By no longer using an actual array to access characters, we also steer
clear of GCC bug #43247:

    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43247

This aligns this data structure with QArrayData. The intention is to
have QVector, QString and QByteArray share the same memory layout and
possibly code.

Change-Id: I4850813e1bd47c3cb670c50c9a8ccc1bff2e8597
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-22 09:34:26 +01:00
João Abecasis
3fe1eed053 Workaround compiler issue
I can't figure this one out, but it seems to be a clang compiler bug
that is triggered in association with -DQT_NO_DEBUG. Changing the
test from QVERIFY to QCOMPARE keeps the intent and the check, but makes
the failure go away.

It can't hurt...

Change-Id: Ib34e5e850e5b731d729e417430dec55e372805ac
Reviewed-by: Chris Adams <christopher.adams@nokia.com>
2012-02-22 01:53:21 +01:00
João Abecasis
558049e972 Fix warnings on shadowing data members with arguments
Example emitted by GCC 4.2.1:

    warning: declaration of ‘iter’ shadows a member of 'this'

Change-Id: I288da01c511a1404bf41881a6c96a5f3cd00d0a7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2012-02-22 01:53:15 +01:00
João Abecasis
31a0358afb Merge remote-tracking branch 'gerrit/master' into containers
Conflicts:
	src/corelib/tools/qbytearray.h

Change-Id: I03b1f3e05c9b7a45130887c522fcd9b7aa387129
2012-02-21 14:58:57 +01:00
Friedemann Kleint
69da8588d4 Fix qlogging test.
Build app sub-process first.

Change-Id: I87a11f7fd5d8a82584e496722f79e236191b0fb3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-21 08:39:44 +01:00
Jason McDonald
4eb54f7f36 Improve tst_QPrinterInfo::testForDefaultPrinter().
Be explicit about skipping the test when no default printer is present.

Change-Id: If69b275eb0f490411471ec42798d8aefcc57fd83
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-21 06:10:43 +01:00
Jason McDonald
f8c3074faa Allow printer names to contain hyphens in QPrinterInfo test.
Change-Id: I473627413d2f1cd5637704f2948eb07a264be49e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-21 06:10:39 +01:00
Jason McDonald
7d44f45fb7 Fix warning about unregistered metatype in QWindow autotest.
Change-Id: If9d8d7e1cd52815ef7231294e4890dfafcd28ec8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-21 06:10:34 +01:00
Toby Tomkins
a30f42ddb3 Flag two tests (Win+A, Simon+G) in parseString as expect fail on OSX.
Remove previously defined insignificant test flag as the number of
tests failing has been reduced.

Task-number: QTBUG-24406
Task-number: QTBUG-23058

Change-Id: I01b41f30469cf7a440e21195e105cb30a8db76e2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-21 04:17:51 +01:00
Jason McDonald
ca1aa0da03 Make the QApplication autotest work for shadow builds.
Use QFINDTESTDATA to locate the helper applications.

Change-Id: I604d10e37c9367f2e95225864edf5bf705f1d961
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-21 02:27:23 +01:00
Rohan McGovern
8a182591be tst_qapplication: mark expected failure on mac
The tab key behavior in Qt5 no longer respects the "Text boxes and lists
only" tab navigation option in OSX, which is the default.  This is a
regression since Qt4.

Task-number: QTBUG-24372
Change-Id: I54c1663f8fb259dd847083432102a0bfad7dd69c
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2012-02-21 02:27:23 +01:00
Kurt Korbatits
4c56db58a2 Changed qnetworksession unittest to work from installation dir
- Made test depend on subprogram
- added install of subprogram

Change-Id: Ib263e9e75ed3c900b52fb1c9b6d319e71d19bdbb
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-21 01:01:52 +01:00
João Abecasis
4c8a4058c3 Change meaning of offset in QByteArrayData
It used to be an index into the first element in 'd' that came after
'offset'. It is now the byte offset from the beginning of the
QByteArrayData structure.

By no longer using an actual array to access characters, we also steer
clear of GCC bug #43247:

    http://gcc.gnu.org/bugzilla/show_bug.cgi?id=43247

This aligns this data structure with QArrayData. The intention is to
have QVector, QString and QByteArray share the same memory layout and
possibly code.

Change-Id: I8546e5f51cd2161ba09bd4ada174b7f5e6f09db7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-21 00:37:58 +01:00
Rohan McGovern
e88f9a92b7 Stabilize tst_qdbusabstractinterface and make it XFAIL
This test was written incorrectly in a way which happened to allow it to
pass most of the time (but not all the time).

Reset the state of test objects between each test function, and mark the
broken functions with QEXPECT_FAIL and a link to a task.

Replace the unusual WaitForPinger construct with the usual
QTRY_VERIFY/QTRY_COMPARE method of verifying asynchronous operations.

Task-number: QTBUG-24262
Change-Id: I82d09002307c0b500bf60cd5b583674321b37609
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-20 23:34:35 +01:00
Richard Moore
4dabe78387 Remove many unneeded virtuals.
Cleanup a ### Qt 5 TODO.

Change-Id: I384e868ecc3ca4d80e4e71bb54d402f4ec1337a8
Reviewed-by: David Faure <faure@kde.org>
2012-02-20 22:06:50 +01:00
Richard Moore
83176f27a4 convert length functions in QDom from uint to int.
Fixes a ### Qt 5

Change-Id: I7a385f2b704d38ae626094f27b06a918d4a9bc48
Reviewed-by: David Faure <faure@kde.org>
2012-02-20 22:06:36 +01:00
Richard Moore
4c05bc811c Merge overloads.
Fix a ### Qt 5 by merging the overloads.

Change-Id: If33e7592191c81b32caa6d68c73dbf2282437886
Reviewed-by: David Faure <faure@kde.org>
2012-02-20 22:06:24 +01:00
Andreas Holzammer
451bc47407 Include qt_windows.h for Windows CE.
The include is needed for OutputDebugString,
as it is defined in winbase.h. To include
use the centralized header.

Change-Id: I486da20d7b054cee352be085e65a0ede1394653d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-20 19:52:57 +01:00
Kent Hansen
a0587f79e5 Silence warnings/debug output from qobject tests
They create noise in the test results.

Change-Id: I40e7239ba7cd41bec577fe8220c86476553a6502
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2012-02-20 19:51:41 +01:00
Xizhi Zhu
2b50e20578 Merges several overloaded functions in QCoreApplication.
The source compatibility is kept.

Change-Id: If66053b271d65062b3c0ce6ec66c8394a37b4e3e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-20 19:51:41 +01:00
Oswald Buddenhagen
2597d61175 don't attempt to build host tools which are gone from qtbase
Change-Id: If9a3fb9792fc5d90496ff834b2c3adc177e1311e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2012-02-20 19:51:41 +01:00
Shane Kearns
4bb020f50b Windows - fix connecting to a socket using IPv4 mapped IPv6
Connecting to an IPv4 mapped IPv6 address (e.g. ::FFFF:127.0.0.1)
requires the IPV6_V6ONLY socket option to be cleared.
This was causing tst_qtcpserver::ipv6ServerMapped autotest to fail.
The same change is not required on MacOS X - the test passes there.

Task-number: QTBUG-24351
Change-Id: I6c08b19f0daa12765da2d44792ffb17299322695
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-20 18:20:20 +01:00
João Abecasis
ebeebe2126 Have QVectorData::grow, take size of header w/ padding
This includes padding necessary to align the data array, but excludes the first
element as was done before. Size of header is the interesting piece of
information, anyway.

This simplifies calculations in a couple of places, harmonizes code with the
QRawVector fork and paves the way for further changes in QVector, namely the
memory layout.

When Q_ALIGNOF is not available, default to pointer-size alignment. This
should be honoured by malloc and won't trigger use of more expensive
aligned allocation.

Change-Id: I504022ac7595f69089cafd96e47a91b874d5771e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-20 17:52:27 +01:00
Friedemann Kleint
054114a459 Remove QPlatformIntegration/QPlatformTheme from QGuiAppPrivate.
Forward-declare instead.

Change-Id: I3851994e8bc05b389e94e948478339ba33d521c1
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-02-20 16:52:59 +01:00
Friedemann Kleint
ed9b608684 Fix warning about converting false to pointer value.
Change-Id: I70c324e6fcfd2bba3ab44837c5ce2c007de8896f
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2012-02-20 16:52:59 +01:00
Jørgen Lind
846f2859b5 Make sure that we pick up xcb from pkg-config
and run the configure checks with the values

Change-Id: Ie8e0072c686c6a7dce1d02e25a9c1abce4679d34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-20 15:17:08 +01:00
Morten Johan Sorvig
1baa8d6472 Remove Native Client special casing from configure.
Change-Id: I20f044b267b6c18e5a3050de22710c45e7573cc3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-20 15:17:08 +01:00
Jan-Arve Saether
d1dd2b2441 Remove QAccessibleInterface::relationTo().
QAccessibleInterface::relations() replaces both relatedTo() and
some of the RelationFlags that navigate() handled before.

Change-Id: I4b9d2c28ba3d753efe7cc9bfa0ad68bed3ee02fd
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-02-20 15:17:08 +01:00
Jan-Arve Saether
06ebe5bc80 Updated for accessibility
Change-Id: I13b5c2f293e9c1c238c7b7c6aae9d26f5c150f24
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-02-20 15:17:08 +01:00
Kent Hansen
bdc7756617 Port QDBusAdaptorConnector meta-object to revision 6
We want to drop support for old revisions in Qt 5.

This commit brings the QDBusAdaptorConnector meta-object in sync with
current moc output.

The QtDBus implementation was assuming that the relaySlot() slot
would be created at index methodOffset() in the meta-object, but
since revision 4 that's no longer the case (signals always come
first). Made the code more robust by actually querying the
meta-object what the index is.

Change-Id: Ie0791680cc2e9e5fb1472c4462c391f92ea22ea6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-20 15:17:08 +01:00
Kent Hansen
441f89befa Remove unused QtDBus meta-object extensions
The inputSignature and outputSignature fields were not being used
anymore.

All tests still pass.

Change-Id: Icbc8fdcd5179a2b1b4843d58b90af925f6bef133
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-20 15:17:08 +01:00
Marc Mutz
f9327fecc1 QPoint/QPointF: inline manhattanLength(); QLineF: inline isNull()
There's no reason for them not to be, and it's a prerequisite
for making these functions constexpr.

Change-Id: I03c9965147b51014c7af60a4c2d7f25a3f6e21a7
Reviewed-by: David Faure <faure@kde.org>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
2012-02-20 15:17:08 +01:00
Bradley T. Hughes
3c21a62cbe Move QTypeInfo out of qglobal.h and into a separate header
qtypeinfo.h is still included from qglobal.h, and defines QTypeInfo
as well as all the specializations for built-in and default Qt types.

Change-Id: I24116174de288a730cbb7aa2f80d346d2b2f9408
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-02-20 15:17:08 +01:00
Samuel Rødal
b0a803213e Added note in QPlatformWindow::setGeometry() docs about position policy.
Change-Id: I0ac76b7aac1aa717592c34f414b1dd8fbee92be2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-20 15:17:08 +01:00
Marc Mutz
49b08f96e8 uic: use QStringLiteral() instead of QString::fromUtf8() where applicable
Many (most?) strings written aren't in fact UTF-8, and we can check at
compile-time which are and which aren't, so don't hard-code fromUtf8()
but use the much more efficient QStringLiteral() where applicable.

This is low-hanging fruit. This patch only optimises US-ASCII string
literals, not those that are latin-1 or even UTF-8, because that would
require more extensive changes to the original fixString() function.

Likewise, there are also other calls to QString::fromUtf8() being
generated (e.g. in the pixmap code) that could benefit from being
turned into QStringLiterals, but their code paths are more involved
than those this patch fixes.

This patch at least suffices in turning all the setObjectName()
arguments into QStringLiterals, which was the main goal.

The autotest baseline has been updated with the new expected results.

Change-Id: Ic1ef67f500f9ff92d36164d515f4e004ef2a10bc
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-20 15:17:08 +01:00
Harald Fernengel
ac16892454 Fix LSB mkspec
Use the standard g++ specs, just override the compiler name

Change-Id: I4adacd7204d3880155bdfc3405e20f322ad593ea
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-20 13:49:58 +01:00
Joerg Bornemann
f8d6a164de fix QProcess for Windows XP
CreateNamedPipe supports the flag PIPE_REJECT_REMOTE_CLIENTS since
Windows Vista. On earlier Windows versions the system call would fail
with ERROR_INVALID_PARAMETER.

This does not open a security hole on Windows XP as there can be only
one pipe instance.

Change-Id: I5a1c7fdf756678009857317c7b563c884afeef2c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-20 13:28:34 +01:00
Matthew Vogt
4816c42115 Ensure the directory exists to receive a deprecated header.
When creating a deprecated header, create the directory it will be
located in, if it does not yet exist.

Change-Id: Id0ac7327e7dfe5b3e34b431c7bc3844b72251a3d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-20 13:25:46 +01:00
Jan-Arve Saether
d2f1901807 Remove QAccessibleInterface::navigate()
This is replaced by parent(), child() and relations()

Change-Id: Iabff6ec56176a1ca8465d6480860f6e0174fd134
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
2012-02-20 11:46:16 +01:00
Harald Fernengel
46bfd84fdc Use standard unix mutexes on LSB
LSB doesn't allow syscalls, so fall back to the normal _unix
implementation

Change-Id: I8aba6147da8b46e3f85b0454cf9aca219811c9fe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-20 11:45:01 +01:00
Kent Hansen
4a0565b443 Move QMetaMethod::parameterTypes() implementation to helper function
Because of an upcoming change to the meta-object data format, the
ability to extract parameter types from a signature will be needed by
meta-object builders (such as QMetaObjectBuilder) soon.

Change-Id: I1f21b2be41761a5db2f1a05976fad29eb3aebb03
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-20 11:29:54 +01:00
Kent Hansen
f83724a0f2 Port QSignalEventGenerator meta-object to revision 6
We want to drop support for old revisions in Qt 5.

This commit brings the QSignalEventGenerator meta-object in sync with
current moc output.

Change-Id: Id5f4954b08cf49169850bd77543b2a7ab8274c18
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-20 11:29:42 +01:00
Kent Hansen
989670737f Use QMetaMethod::isValid() to check method validity
The signature() method will soon be replaced by a function that
returns a QByteArray rather than a pointer, and calling it will be
more expensive than calling isValid(). Plus, isValid() looks nicer.

Change-Id: I6844988c84dcadf876fc86bc71c8b310a21f88de
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
2012-02-20 11:29:03 +01:00
Kent Hansen
5640b0b443 Add QMetaMethod::isValid() function
This function provides a proper way of determining whether a function
returned by QMetaObject::method() is valid. (Checking whether
signature() returns a 0 pointer, which e.g. testlib does, is not an
ideal API -- especially given that signature() will soon be removed
and replaced by a function that returns a QByteArray.)

Change-Id: I644f476b09904925f2042945f5d0ad744482b682
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2012-02-20 11:28:38 +01:00
Kent Hansen
9c1680a7ed Fix typo in QByteArray(QConstByteArrayData) constructor
There is no "str" member in QConstByteArrayData, it should be "ba".

Change-Id: Ife76460e9332733480c1ceded21e78388656092d
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
2012-02-20 11:28:28 +01:00
Kent Hansen
3d2c8d76ec Don't call metaObject() several times
It's sufficient to call it once per invokeMethod.

Change-Id: I1db826027eca87c799f216d65e27c801a23e64e2
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-20 11:28:18 +01:00