Commit Graph

4658 Commits

Author SHA1 Message Date
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
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
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
Kent Hansen
44ab16f93d Small moc cleanup: Pass lists by const reference
generateFunctions() shouldn't (and doesn't) modify the list of
functions, so the list should be passed by const reference.

Change-Id: If5ff810e5623e734816c3089eb8b3fd4f54f2345
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-20 11:28:10 +01:00
Kent Hansen
fec37f0e9a moc: Get rid of implicit conversions to const char *
moc mostly operates on QByteArrays. When an actual const char * is
needed, it should be explicit.

Change-Id: I0b3e262830128306688f4512a4b59ce8966c2579
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-20 11:28:04 +01:00
Kent Hansen
cbe21c59a0 Minuscule moc cleanup: Don't declare i in function scope
This is not C.
Furthermore, the function-level i was already shadowed in several
places by "for (int i = 0; ..." blocks later in the function.

Change-Id: Ic1777f78d9838bc2921d68337be05de454bbeabe
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2012-02-20 11:27:55 +01:00
Morten Johan Sorvig
d00db53a12 Don't force CFG_ENDIAN to "auto" on Mac.
We no longer support universal ppc/x86 builds.

Change-Id: I8c4a1d087d02da1ad80d91a7a04147b37e81d74f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-20 09:42:47 +01:00
Morten Johan Sorvig
5af7e089f7 Don't use -rpath-link when building on Mac.
The logic here was wrong: test if the
target linker supports -rpath-link, and then set
it for both host and target via mkspecs/qmodule.pri.

Change-Id: Ie4da7ed2e06e784f9edb65a27290913ab838a8c2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-02-20 09:42:04 +01:00
Jonathan Liu
7d8f5777be Fix compilation with MinGW-w64
This fixes a "cast from 'void*' to 'int' loses precision" error and adds
a missing argument to qWarning.

Change-Id: I38544c4e317a3f6d1ecf26ebb3e35c66b1878d24
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2012-02-20 09:37:24 +01:00
Bradley T. Hughes
3cb078a23c Rename Q_PROCESSOR_POWERPC to Q_PROCESSOR_POWER
IBM's POWER and the PowerPC architecture have been merged into a single
ISA, the Power ISA (see http://www.power.org). Use this unified name in
Qt.

Change-Id: Ia41492b0031d890843e43c5f7ecd1e60c65bb75b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2012-02-20 09:36:51 +01:00
Holger Hans Peter Freyther
52072a8c8a qwidget_p.h: Remove DontSetCompositionMode from the internal flags
This flag was used by QWS to set or not set the composition mode
when filling the background. E.g. this was used by 'transparent'
windows to set the alpha bits. QPA didn't have this enabled in 4.8,
the code paths are gone in Qt5 and it is the responsibility of the
QPlatformBackingStore to initialize the alpha bits properly.

Change-Id: I4011d842b718d6a40b19922b5f75c597e63079c8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-02-20 09:36:51 +01:00
Holger Hans Peter Freyther
3ad9896361 qpa: Verify that the platform returns a WId that is not WId(0)
This is motivated by visiting a customer that re-implemented the
::winId method and returned WId(0) that resulted in a crash. Currently
there is only a comment inside the implementation of the ::winId
default implementation. Add a note to the API documentation, add
a Q_ASSERT to check if our assumption holds true.

Change-Id: I8607a4efc4f561f7849c976cd2454f6fbcb20eaa
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-02-20 09:36:51 +01:00
Richard Moore
ad1a013878 Remove dead method.
Fix Qt 5 TODO

Change-Id: I9a12cc07ebc7c039bbeb53922b0539f177b226f8
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2012-02-20 09:36:51 +01:00
Kurt Korbatits
c66bb51a75 Changed qabstractnetworkcache unittest to use TESTDATA
- Changed qabstractnetworkcache to install testdata

Change-Id: I8f2ae6103214755ee7898dbc0ee50c0e4d7d45ab
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-20 09:36:51 +01:00
Toby Tomkins
853e9ac787 Modify helper functions to remove embedded QSKIP call and return status.
The helper functions contained QSKIP macros which do not also skip their
parent function. These QSKIP function were removed and replaced with a
return success value.

Change-Id: I533f57842fc95beaeb1fcde5235678e9807db056
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-20 08:06:19 +01:00
Toby Tomkins
2465143f24 Set tst_qtoolbutton triggered function skipped.
This autotest seems to be caught in an event loop preventing further
correct signalling. Mark test function skipped with QSKIP.

Task-number: QTBUG-24374

Change-Id: Ic943a33b71fa87d0873278cb7b7b134c22602be3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-20 08:06:14 +01:00
Jason McDonald
7fbe7fd7b5 Make QLocale autotest pass for shadow builds.
For shadow builds where "make install" had not been run, the
tst_QLocale::emptyCtor test function would fail to find its helper
application because QFINDTESTDATA was not searching for it in the build
directory due to the test not instantiating QCoreApplication.

This commit fixes the test by instantiating a QCoreApplication using the
QTEST_MAIN macro, which also allows some special case code for Windows
CE to be removed.

Change-Id: Ic81d4699da2538c24b36b3d6bd52c4a02ad417f4
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-20 08:06:04 +01:00
Jason McDonald
eb52d78e90 testlib: Report one test result per benchmark test.
Prior to this commit, a benchmark test could report 0..n passes and 0..m
fails or skips, where n is the number of accumulation iterations used to
collect benchmark data and m is the number of times the test function
was invoked.  Depending on the type of benchmark measurer being used,
this could result in a very large volume of test output and inconsistent
pass, fail and skip counts between test runs.

This commit changes the behaviour so that each benchmark test reports
one pass, fail or skip, regardless of the number of iterations used to
collect benchmark data.

This commit also prevents benchmark data being reported in the test
output if the benchmark test failed or skipped, as any benchmark data is
of dubious value in such cases.

The latter change in behaviour requires a minor modification to the
badxml selftest, which now tests quoting of literal strings in xml test
output for both passing and failing benchmarks.

Finally, this commit also adds a new selftest specifically for verifying
correct behaviour for benchmarks that fail or skip.

Task-number: QTBUG-24313
Change-Id: I3426dc659a7511b62fd183a031c7235bc753f497
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-20 08:05:58 +01:00
Kurt Korbatits
4cb09aea6a Fixed qobject unittest to work from installation directory
- Made test depend on subprogram to make sure it was there when
  test ran.
- install signalbug subprogram

Change-Id: Ie0a19e52d131adcd17c97b263389aecffb81520e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2012-02-20 03:27:02 +01:00
Jason McDonald
88c903f6a3 testlib: Add selftests for XPASS and XFAIL involving QCOMPARE.
Change-Id: I4f897b411aaa51ff453208eda50e12665489074b
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2012-02-20 03:27:02 +01:00