Commit Graph

3003 Commits

Author SHA1 Message Date
Rohan McGovern
ae4c28d8dc Fixed crashes from tests using xcb plugin with -qtnamespace.
Use QT_BEGIN_NAMESPACE/QT_END_NAMESPACE consistently in xcb plugin.
Some, but not all, of the sources were already using QT_BEGIN_NAMESPACE.

Change-Id: I23b83cc88870fd4039437b733084ab86dd807356
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2011-11-18 04:51:04 +01:00
Rohan McGovern
fc3705cd04 Fixed crashes from tests using xcb plugin with -qtnamespace.
Use QT_BEGIN_NAMESPACE/QT_END_NAMESPACE consistently in xcb plugin.
Some, but not all, of the sources were already using QT_BEGIN_NAMESPACE.

Change-Id: I23b83cc88870fd4039437b733084ab86dd807356
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2011-11-18 03:18:48 +01:00
Jason McDonald
2194255329 Don't depend on moc to disable test functions.
The moc tool is not aware of all defines (particularly those that are
compiler builtins) and does not correctly evaluate others that depend
on compiler builtins, such as Q_OS_FOO.

This commit reverts parts of the following commits, but is not a
complete fix as there were many instances of this problem in the tests
prior to those commits:
    924d810dbd
    8aaff67510
    338d3f1197
    a55034062b
    253497b744
    7cfad460c5
    9d2ff58f36
    0cf6baa2d6

Change-Id: I947d797fe3ec76139ba1b55561cea569895662c5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-18 03:18:45 +01:00
Rohan McGovern
f641d9f0ca configure: clean up whitespace, comments.
Make the indentation sensible.

Remove comments which merely repeat the name of a variable on the next
line.

Change-Id: Ic3ecaaaba61795aeee10299ee44523eb725ecad9
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-18 03:18:42 +01:00
Rohan McGovern
481775cf86 configure: clean up whitespace, comments.
Make the indentation sensible.

Remove comments which merely repeat the name of a variable on the next
line.

Change-Id: Ic3ecaaaba61795aeee10299ee44523eb725ecad9
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-18 01:51:57 +01:00
Jason McDonald
a8fd0c3654 Don't depend on moc to disable test functions.
The moc tool is not aware of all defines (particularly those that are
compiler builtins) and does not correctly evaluate others that depend
on compiler builtins, such as Q_OS_FOO.

This commit reverts parts of the following commits, but is not a
complete fix as there were many instances of this problem in the tests
prior to those commits:
    924d810dbd
    8aaff67510
    338d3f1197
    a55034062b
    253497b744
    7cfad460c5
    9d2ff58f36
    0cf6baa2d6

Change-Id: I947d797fe3ec76139ba1b55561cea569895662c5
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-18 01:51:57 +01:00
Rohan McGovern
d90d57bb8b Fixed compile of autotests with -qtnamespace.
Make sure to use the Qt namespace for qGlobalPostedEventsCount.

Change-Id: I558a0b0fba1e22a2edd96f9499a2bab82046c4a4
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2011-11-18 01:51:53 +01:00
Rohan McGovern
70d91b5c46 Fixed compile of autotests with -qtnamespace.
Make sure to use the Qt namespace for qGlobalPostedEventsCount.

Change-Id: I558a0b0fba1e22a2edd96f9499a2bab82046c4a4
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
2011-11-18 00:07:51 +01:00
Kent Hansen
e9478a1e8a Call invalidateResource() on QOpenGLMultiGroupSharedResource-owned resources
Commit 202127f860 ensured that
QOpenGLMultiGroupSharedResource-owned resources are deleted,
but it was missing a call to invalidateResource().

Change-Id: I166ce8a7298772408081331fe1a91bd2cd88aebb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-17 19:07:52 +01:00
Kai Koehne
3ecd319467 Update V8
Change-Id: Ie6157e0baa55271707b3e00ed80b67ab79f4f570
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-11-17 19:07:50 +01:00
Kai Koehne
e8fd6f2fd1 Update V8
Change-Id: Ie6157e0baa55271707b3e00ed80b67ab79f4f570
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
2011-11-17 17:40:06 +01:00
Kent Hansen
44b6bb3560 Call invalidateResource() on QOpenGLMultiGroupSharedResource-owned resources
Commit 202127f860 ensured that
QOpenGLMultiGroupSharedResource-owned resources are deleted,
but it was missing a call to invalidateResource().

Change-Id: I166ce8a7298772408081331fe1a91bd2cd88aebb
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-17 17:40:06 +01:00
Olivier Goffart
1b681bbd0f Fix tst_Moc::oldStyleCasts
This tests that the moc generated file produces no warnings with very
pedentic compilation flags.
In that case, there was a warning because of the use of the C casts

Change-Id: Ie79c6d053ff35c55276a07212c5d60f759f693ee
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2011-11-17 17:40:02 +01:00
Olivier Goffart
fc6ba401d2 Fix tst_Moc::oldStyleCasts
This tests that the moc generated file produces no warnings with very
pedentic compilation flags.
In that case, there was a warning because of the use of the C casts

Change-Id: Ie79c6d053ff35c55276a07212c5d60f759f693ee
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@nokia.com>
2011-11-17 16:13:49 +01:00
Jędrzej Nowacki
585b5e95e3 Reimplement QMetaType::typeName.
New implementation is slightly faster (~30%) and it is not dependent
on order of definitions in QMetType::Type. Which means that we do not
have to maintain a separate type list.

Change-Id: I0ceb8c919c08afaa55146fbc3f021b78ffc2c063
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-17 16:13:46 +01:00
Jędrzej Nowacki
e0e5a66198 Reimplement some QMetaType methods.
Methods of QMetaType; sizeOf, construct and destruct were reimplement
using QMetaTypeSwitcher. The change should have impact only on
maintenance (by removing 3 type switches).

Change-Id: Iac3eb52de75d46f12ac32f229a26aec5b5bc7af2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-17 16:13:43 +01:00
Pierre Rossi
7dbfa9e67f Fix sliders style issues.
Due to their widget heritage,some styles' logic for drawing sliders
incorrectly assumed a rect with a top left point at (0,0).

Change-Id: I02d9c32d925650ccb36e2b917dd890e5d2bbf925
Reviewed-by: Jens Bache-Wiig
2011-11-17 16:13:41 +01:00
Pierre Rossi
2a37fd0b85 Fix sliders style issues.
Due to their widget heritage,some styles' logic for drawing sliders
incorrectly assumed a rect with a top left point at (0,0).

Change-Id: I02d9c32d925650ccb36e2b917dd890e5d2bbf925
Reviewed-by: Jens Bache-Wiig
2011-11-17 14:48:20 +01:00
Jędrzej Nowacki
e70457fc4f Reimplement some QMetaType methods.
Methods of QMetaType; sizeOf, construct and destruct were reimplement
using QMetaTypeSwitcher. The change should have impact only on
maintenance (by removing 3 type switches).

Change-Id: Iac3eb52de75d46f12ac32f229a26aec5b5bc7af2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-17 14:48:20 +01:00
Jędrzej Nowacki
7c670aa88b Reimplement QMetaType::typeName.
New implementation is slightly faster (~30%) and it is not dependent
on order of definitions in QMetType::Type. Which means that we do not
have to maintain a separate type list.

Change-Id: I0ceb8c919c08afaa55146fbc3f021b78ffc2c063
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-17 14:48:20 +01:00
Richard Moore
1fcb5b850e Improve the testability of QSslOptions.
The handling of QSslOptions is complicated not only by the subject, but
also by the fact that some of the openssl directives are negatives. This
commit tries to separate the inherent complexity from the complexity of
the api by allowing us to test them independently.

Change-Id: Ieb9386c69dd9b0b49dc42e26b2878a301f26ded1
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-11-17 14:48:16 +01:00
Richard Moore
bf7364f0aa Improve the testability of QSslOptions.
The handling of QSslOptions is complicated not only by the subject, but
also by the fact that some of the openssl directives are negatives. This
commit tries to separate the inherent complexity from the complexity of
the api by allowing us to test them independently.

Change-Id: Ieb9386c69dd9b0b49dc42e26b2878a301f26ded1
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-11-17 13:22:56 +01:00
Rohan McGovern
944b799944 Fixed compile of QtPlatformSupport with -qtnamespace.
Change-Id: Iba411d35abe85ecf29a44d99113954a0561ae286
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2011-11-17 11:49:10 +01:00
Rohan McGovern
a068e707af Fixed compile of QtGui with -qtnamespace.
GL headers should not be included inside of the Qt namespace.

Change-Id: Ib19cbd3ab7b071a96e0816798f8ebc3fd4e28448
Reviewed-by: Toby Tomkins <toby.tomkins@nokia.com>
Reviewed-by: hjk <qthjk@ovi.com>
2011-11-17 11:48:09 +01:00
Friedemann Kleint
11e8138495 Fix compilation with -force-asserts.
Change-Id: I2f697ba9ab9a5a8393e778abad4da18c7f232d7f
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
2011-11-17 11:29:37 +01:00
Friedemann Kleint
5d3385431d Windows: Rebuild configure with support for V8 and -force-asserts.
Change-Id: I52f4c842f0604d14a0fed8ebdc7a33938d977ec4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-11-17 11:29:37 +01:00
Friedemann Kleint
8351906ad1 Windows: Add -force-asserts to configure.exe
Change-Id: I678011f0e60d74a1b2d63a18570778e1f686f123
Reviewed-by: Harald Fernengel <harald.fernengel@nokia.com>
2011-11-17 11:29:37 +01:00
Jason McDonald
6382d27abd Remove commented code from QBuffer autotest.
The removed code was commented-out before the tests were imported into
the Qt repository in June 2006.  This code is no longer valid as the
warning messages it relates to are not produced by any code in qtbase.

Change-Id: Iac63b27387b51a71c567386ca61faf5fb00c3364
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-17 07:21:11 +01:00
Jason McDonald
2b883dc9bb Improve Q_FUNC_INFO autotest.
The availableWithoutDebug() test was trying to force QT_NO_DEBUG to be
defined, but was actually doing the opposite.  While I'm not satisfied
with the way this test works (it would be better to test with
QT_NO_DEBUG already defined when Q_FUNC_INFO is included). at least this
test now does what it says it does.

Additionally, the test has been improved by checking that Q_FUNC_INFO
returns a non-empty string, as opposed to just compiling.

Change-Id: I9175e3a7406152b6250b507a61b5062e3cfabeb8
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-17 07:21:03 +01:00
Bradley T. Hughes
577feb71ca Build all tests on Mac OS X, but do not run them yet.
Previously, autotests and benchmarks were disabled on Mac OS X. This is
wrong, and needs to be corrected. The 'make check' target is disabled
for the autotests on Mac OS X for now, but all tests will now be built.
The check target does not actually run the benchmarks, so this can be
safely re-enabled without breaking the CI system.

There will be commits to follow which re-enable the 'make check' target
on Mac OS X for each module.

Change-Id: I1347da46e3688b48e8cc5d933ee5188ea3723639
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-17 01:20:39 +01:00
Alberto Mardegan
45d3702295 Don't directly access QList contents
The existing code doesn't work on 64bit machines. We must first convert
the list into a QVector, which guarantees that elements are laid out
correctly as an array.

Merge-request: 1467
Reviewed-by: thiago
(cherry picked from commit 00020eed3fa948f69cfa776e92121edec6f975cc)
Change-Id: I00020eed3fa948f69cfa776e92121edec6f975cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2011-11-16 18:16:26 +01:00
Tor Arne Vestbø
280f8829b6 Allow overriding the output dir when running syncqt
This feature is only available to advanced qmake clients who have their
own defaults_pre.prf, where QMAKE_SYNCQT_OUTDIR is set before loading
Qt's own default_pre.

This is useful to be able to put the sync.profile file in a different
level in the source tree than where you want the output in the build
tree.

An alternate/complimenting solution would be to allow the output path
to be overriden from within the sync.profile file.

Change-Id: I3cdef82dbe492877507e269e18571456beeb2b7d
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
2011-11-16 16:52:26 +01:00
Harald Fernengel
cd6bd7aa11 Revert logic when building with --force-asserts
This reverts commit f109f5b8a9.

Instead of disabling the asserts, rather enable the debug code
so the asserts actually trigger.

Change-Id: I6f62588d836de5c926294241e8d7196a963e4aac
Reviewed-by: Eckhart Koppen <eckhart.koppen@nokia.com>
2011-11-16 15:27:23 +01:00
Peter Hartmann
f1f95d7047 SSL: fix compilation warning with gcc 4.6.1
"qsslconfiguration.cpp:204:73: warning: suggest parentheses around
comparison in operand of ‘|’ [-Wparentheses]"

Change-Id: I887ffdf3ef8263c35a8f391b3fc97faee41b7dab
Reviewed-by: Martin Petersson <Martin.Petersson@nokia.com>
2011-11-16 15:27:23 +01:00
aavit
041e32d6e1 Fixes: unwanted gcc export of symbols from bundled libpng
This removes a change to libpng that was only relevant for building
a certain Qt 4 tool in certain environements without system libpng.
This is no longer relevant, so this kludge should now be removed.

Change-Id: I9a04ab0224f9e84ccab3ec27762582be439fe3ef
Reviewed-by: Kim M. Kalland <kim.kalland@nokia.com>
2011-11-16 14:03:02 +01:00
Toby Tomkins
91af333634 Fix Qt namespace compilation.
Change-Id: I259b5fde8e4d75d28def8650c4c9208accdf0bbe
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
2011-11-16 11:56:48 +01:00
Peter Hartmann
4dc390e66f SSL namespace: rename TlsV1 to TlsV1_0
This is a source-incompatible change.

TlsV1 is ambiguous; what is actually meant is TLS version 1.0. There are
also TLS versions 1.1 and 1.2; we might want to add options for these
once OpenSSL supports them (apparently they will be with OpenSSL version
1.0.1).

Change-Id: I940d020b181b5fa528788ef0c3c47e8ef873796a
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-16 10:32:10 +01:00
Bradley T. Hughes
e2628ef943 Make it possible to disable the 'check' target
If subdir.CONFIG contains no_check_target, we do not recurse into
that subdir when generating the 'check' target.

This will be used to selectively disable crashing tests on Mac OS X.
Currently, all autotests are disabled on Mac OS X. The goal is to re-
enable them, but not all at once.  This approach allows us to get each
change through the CI system individually.

The first step is get all tests to build, but not run, then we will
re-enable the tests for each module, possibly disabling individual
tests at the same time.

Change-Id: I69f62c238f381ae0315d414cd71d76bc88b088dd
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
2011-11-16 10:32:10 +01:00
Bradley T. Hughes
6fcfae99d3 Remove warnings from deprecated atomic operators in autotests
Use QAtomic*::load() and ::store() instead of the deprecated
cast, assignment, and comparison operators. These will be removed
in the near future.

The tests for these particular operators have not been changed,
though, as the change to remove the operators will also remove
the respective tests.

Change-Id: I2f24d18992af0c6e0f487d707218e4e84f4bdd12
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
2011-11-16 10:32:10 +01:00
Jędrzej Nowacki
2f90c4e40e Make QTest::newRow a bit more verbose if a data tag is null.
Currently QTest::newRow function expects to have correct tag string for
each test data. This was enforced by a simple assert. By adding a
an assert with message we might simplify debugging of a test that
generates test cases.

Change-Id: I84ebb397264c99e7bb46d281fd38583dd2d6964c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
2011-11-16 10:32:10 +01:00
Eckhart Koppen
f109f5b8a9 Fix Q_ASSERT usage in case -force-asserts is enabled
Certain Q_ASSERT usages are not compiling with -force-asserts since they
are checking for instance variables or other items which are not
available in release mode.

This fix guards the asserts to only be enabled in debug mode.

Change-Id: I2ed74e3d5118608361e8c924e93d8ff0efdc8eab
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
2011-11-16 09:08:07 +01:00
Jørgen Lind
18affc8c0a Add correct event mask for Qt::WindowTransparentForInput in xcb plugin
Change-Id: I4c683c08876cc6fa934971399af7e48b160168fc
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-15 20:07:17 +01:00
Jørgen Lind
ef8da487a8 Adding a "helper assert" for when you can create QWindow
maybe if your trying to instansiate a QWindow before the QApplication has
been instansiated.

Change-Id: I68ed4ad1dbdfedc242a7cb27c1381d50a3d3dfa4
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-15 20:07:17 +01:00
Pasi Matilainen
31da70ff8e Fix QDockWidget titlebar button positioning on Mac OS X
Move the QDockWidget close and float buttons from the right end of the
dock widget title bar to the left end to avoid Mac App Store rejection.

Task-number: QTBUG-19493

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit 3b2bd144b7873daf2e7119248dbac7c0f0253993)
Change-Id: I3b2bd144b7873daf2e7119248dbac7c0f0253993
2011-11-15 18:33:58 +01:00
Tero Ahola
44e8b84cae Fixed memory leak in Windows Vista style widgets
The animations are now deleted in destruction of the Vista style.
With the previous implementation the animations were not deleted for
instance if you move mouse cursor off from a widget with hover
animation (like QPushButton).

Task-number: QTBUG-21532

Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
(cherry picked from commit 261bbb12003dab0e45b5814f85dd74aa64bcfb79)
Change-Id: I261bbb12003dab0e45b5814f85dd74aa64bcfb79
2011-11-15 18:33:58 +01:00
Jiang Jiang
3d063ecc5f Provide defaultFont with fontconfig db
So that it won't just return "Helvetica" that may not exist in
target system. Providing it seems to fix QTBUG-21833 as well,
thus we can remove the QEXPECT_FAIL statement in qlistview test.
'_' appears to reach the minimum right bearing in some fonts.

Task-number: QTBUG-21833
Change-Id: I2340af6ee736083ec4f6575e469840ebec4e545e
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
2011-11-15 18:33:58 +01:00
Jędrzej Nowacki
5bc35276fb Hide QVariant helper classes in a namespace.
Moving these classes to an unnamed namespace reduced chances of
a name conflict and size of executable. GCC 4.6 in release mode produces
a 5kB smaller binary.

Change-Id: Ie1819a88180f9db1cd32cc59ea6fe268ecbd5813
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2011-11-15 18:33:58 +01:00
Kent Hansen
202127f860 Ensure that QOpenGLMultiGroupSharedResources are cleaned up
When a GL context group is destroyed, all multi-group shared
resources associated with the group should be cleaned up.
Otherwise we could get a double deletion in the resource's
destructor, because it still retained a pointer to the
deleted group.

The missing cleanup resulted in a crash when the global
static qt_gl_functions_resource was destroyed, first seen
in the tst_examples autotest in qtdeclarative. It possibly
didn't manifest before because it's event loop-dependent
(the contexts are deleted via deleteLater()).

Change-Id: I6b1e0bfdfbbb2bff8e795f545e680fcdfa094768
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
2011-11-15 17:09:35 +01:00
Kent Hansen
7b3bb6759b Make V8 build on Windows again
Forgot to add a Windows-specific source file to the project
when the new V8 version was imported.

Change-Id: Id20dcba132bf2609338845e8a769fcc8c1cbc562
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
2011-11-15 13:33:08 +01:00
Richard Moore
75b2a4960b Add the ability to do unsafe SSL renegotiation as a fallback.
This commit adds the ability to perform legacy SSL renegotiation as
a fallback via QSsl::SslOptions. This is something that used to work,
but has been disabled by default in newer versions of openssl. The
need for this has been reported by users (eg. in QTBUG-14983).

Change-Id: I5b80f3ffd07e0c5faddc469f6a8f857bac5740f7
Reviewed-by: Corentin Chary <corentin.chary@gmail.com>
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
2011-11-15 11:53:44 +01:00