Jason McDonald [Mon, 5 Dec 2011 05:00:51 +0000 (15:00 +1000)]
Fixing naming of selftests.
Make the test object names correspond to the test program names, so that
it is easier to see which test produced each block of test output.
Change-Id: Ib19a955938b549f27cdcaac83bfa9150285b396d
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Jason McDonald [Mon, 5 Dec 2011 04:10:01 +0000 (14:10 +1000)]
Don't set graphics system at start of test.
QApplication::setGraphicsSystem() is a no-op, and even if it wasn't it
would be unwise to force a graphics system that isn't guaranteed to be
included in the Qt build, without including any logic to skip the test
if setting the graphics system failed.
Change-Id: Id9a0a87586872088625de7840b5032d0c3cc48a1
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Rohan McGovern [Mon, 5 Dec 2011 04:08:22 +0000 (14:08 +1000)]
Fixed tst_selftests findtestdata subtest for shadow builds.
This test uses qt.conf to enforce a predictable tests install location.
This was not working in the shadow build case, as qt.conf was only
present in the source tree; embed it as a resource at :/qt/etc/qt.conf
so it works in the shadow build case too.
Change-Id: Iec708d9686c29a1fc5ff0020dc11a93a593d20c5
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Jiang Jiang [Thu, 1 Dec 2011 10:30:35 +0000 (11:30 +0100)]
Remove unused Mac specific font code in widgets
Change-Id: If7a81b8b59aedcc0ba54c735787a220bab9ca535
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Jiang Jiang [Thu, 1 Dec 2011 10:26:53 +0000 (11:26 +0100)]
Remove QCoreTextFontEngineMulti
It's not used anymore since we have switch to HarfBuzz on Mac.
Change-Id: I68252fbe3021f54dacac5a901184c3f3e541a6b7
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Jiang Jiang [Thu, 1 Dec 2011 10:21:28 +0000 (11:21 +0100)]
Enable subpixel rendering for raster on Mac
Change-Id: I06e6465e03c17776974d361254abf5b750736080
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Stephen Kelly [Sat, 3 Dec 2011 21:50:18 +0000 (22:50 +0100)]
Move the metatype declaration for QGraphicsScene.
From where it is forward declared to where it is fully defined.
Change-Id: Ie2240ffef6d1edbbbd5b193f9528ef94ef412d82
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Frederik Gladhorn [Thu, 1 Dec 2011 18:21:26 +0000 (19:21 +0100)]
Remove unused enum values.
These were used for foreground/background color.
Since we have proper functions for these two now,
the hack with invoke_method is no longer needed.
Change-Id: I66eb645124caa838adb1ceb41383a2724a45f553
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Stephen Kelly [Fri, 2 Dec 2011 12:56:36 +0000 (13:56 +0100)]
Quote the path in CMake so that spaces in paths work.
Change-Id: Ie73a4b242ab0bf90e6f292be9a7b7913ae4273a5
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
David Faure [Wed, 30 Nov 2011 17:00:12 +0000 (18:00 +0100)]
New class QTemporaryDir.
As discussed on qt5-feedback / development lists.
Change-Id: If1733369d12daa29054776ec2cbd78e63679768e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Honglei Zhang [Fri, 2 Dec 2011 13:48:29 +0000 (15:48 +0200)]
Fix tst_qsql crashes on Mac OS X
In tst_qsql, there are function calls to QApplication(argc, 0, false), where
argc is zero. According to the documentation, argc must be greater than
zero and argv must contain at least one valid character string. The
misuse of this API has no problem on any platform other than Mac OS. This
commit has fixed the crash by passing valid dummy parameters.
Task-number: QTBUG-22811
Change-Id: I42b26d66f0becb7a942896e6ddcaea52ff720a48
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Bradley T. Hughes [Tue, 29 Nov 2011 09:59:48 +0000 (10:59 +0100)]
Remove QInternal callbacks and internal functions
After commit
79f675a1e0f628bbc25345ebc1eb1f5809166c6b, the connect and
disconnect callback API effectively becomes useless. Now that these
callbacks cannot/do not, it makes little sense to keep the backdoors
added for Qt Jambi support.
Remove them for now. Should the Qt Jambi team want/need to port to Qt 5,
we can re-add them, possibly designing a better API for doing so as
well.
Change-Id: I6209a1d647d683c979d5294b632b8c12c0f9f91c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Kent Hansen [Fri, 25 Nov 2011 11:13:16 +0000 (12:13 +0100)]
Automatically add QtQuick module if only QtDeclarative is specified
QtQuick and related APIs (QQuickItem, SceneGraph, et al), which
used to live in the QtDeclarative module, have moved to a new
module, QtQuick.
Existing projects that use QtQuick-specific APIs should add "quick"
to their project's QT variable, and update their include statements.
E.g.,
QT += declarative
should be changed to
QT += declarative quick
and
#include <QtDeclarative/qquickitem.h>
should be changed to
#include <QtQuick/qquickitem.h>
and similarly for the other QtQuick classes.
In order to give existing projects a chance to migrate smoothly, we
should issue a warning and automatically add the QtQuick module if
only the QtDeclarative module was specified. (If a project doesn't
use any QtQuick APIs, the warning can be ignored -- but there is no
way to disable it.)
This change, along with the compatibility headers in QtDeclarative,
make it possible to build existing projects without any modifications
on the project's side.
This change will be removed at a later time; when that happens,
existing projects that did not port to the QtQuick module will no
longer build.
Change-Id: I56abcadc1e5c74490527fc03646310d801bfc084
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
David Faure [Fri, 2 Dec 2011 09:39:19 +0000 (10:39 +0100)]
Implement QDir::removeRecursively
Task-number: QTBUG-4592
Change-Id: I363e2c24d1c0ada975b8b927d7c6e776b8aae579
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Honglei Zhang [Thu, 1 Dec 2011 07:57:40 +0000 (09:57 +0200)]
QSqlRelationalTableModel doesn't follow relations on the first column
QSqlRelationalTableModel doesn't follow relations on the first column
of a table. The DisplayRole and the EditRole for indexes on column 0
are always the same. The bug is found in QSqlRelationalTableModel::data.
Task-number: QTBUG-20038
Change-Id: Ie1e98b5f46ffc171113f2d51b9b19ff5febb1c3c
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Gunnar Sletta [Fri, 2 Dec 2011 09:55:14 +0000 (10:55 +0100)]
Added minimal class docs for QWindow to make it visible.
Change-Id: Ibed2279ba5454547fb4060005e805a11221b3732
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Stephen Kelly [Thu, 1 Dec 2011 01:48:15 +0000 (02:48 +0100)]
Make the Qt5 part of the target name namespace style.
As it was in Qt4 and discussed on the cmake list.
Change-Id: Ide77c2525a261a5d658d7cb661010a67d3386341
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Bradley T. Hughes [Thu, 29 Sep 2011 09:52:33 +0000 (11:52 +0200)]
Remove cast and assignment operators from QAtomicInt and QAtomicPointer
This is a source incompatible change. There is concern that the
convenience of the implicit cast and assignment operators can lead to
misuse. Several commits have already been done that remove excess use
of the implicit cast, which is a *volatile* read every time it's used.
Users of the QAtomic* API should have to think about when they are
loading the value, and if they do or don't need the acquire memory
barrier on load. The code that people would write using this API is
meant to be multi-threaded, concurrent, and correct. The API should not
allow them to inadvertently, possibly unknowingly, shoot themselves
in the foot.
SC-break-rubber-stamped-by: Lars Knoll
Change-Id: I88fbc26d9db7b5ec80a58ad6271ffa13bbfd191f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Morten Johan Sorvig [Thu, 1 Dec 2011 08:39:25 +0000 (09:39 +0100)]
Cocoa: Handle accessible interface children.
Implement AccessIbleChildrenAttribute and
accessiblityHitTest.
Change-Id: Ia9fa80e3015edbb969d173a2587cb53b9c69852e
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Jan-Arve Saether [Fri, 2 Dec 2011 07:38:40 +0000 (08:38 +0100)]
Don't inherit QAccessible from QWindowsAccessible
Qualify all references to QAccessible members with QAccessible::
Change-Id: Ia78d8482bbab3d77c9e258a52bc74f8e7c0c7e10
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Friedemann Kleint [Thu, 1 Dec 2011 11:01:02 +0000 (12:01 +0100)]
Windows: Stabilize qpauseanimation test.
Change-Id: I93b470d89009d4573cbe3ec5018cddc40f4a4623
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Jason McDonald [Fri, 2 Dec 2011 01:45:12 +0000 (11:45 +1000)]
Update documentation for QTest::qExec()
Update the documentation to make it clear that regular test applications
should not call QTest::qExec() more than once. Also minor rewording of
description of return value.
Change-Id: I45bdf520ed10fd3c9232847a0ec0bc2b32d4caf3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Frederik Gladhorn [Thu, 1 Dec 2011 20:59:44 +0000 (21:59 +0100)]
Clean formatting.
Remove extra spaces, remove virtual keywords.
This code was simply inconsistent with the rest.
Change-Id: Iec8e9542dd4c458ddd535cb1766c90c18051686a
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Frederik Gladhorn [Thu, 1 Dec 2011 20:21:52 +0000 (21:21 +0100)]
Accessibility: table2 -> table
Rename the new interface after the old one has been removed.
This interface is very close to the IAccessible2 Table2 interface.
Change-Id: I8659232189fe0e8307151c743727de425c30ac9a
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Kent Hansen [Wed, 30 Nov 2011 12:51:16 +0000 (13:51 +0100)]
syncqt: Create deprecated headers that work with MSVC
MSVC doesn't understand the #warning directive; use #pragma message
instead.
Change-Id: I42fe43269f5a84559a983932737c9eeb6b74b1ff
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Martin Jones [Fri, 2 Dec 2011 04:28:00 +0000 (14:28 +1000)]
Revert "Add QObject::objectNameChanged(const QString &objectName) signal"
This reverts commit
ba635d7e74472f3a54c0c4686966af46d9035c6f.
Breaks tests in declarative:
tst_qdeclarativeecmascript::deleteLater
tst_qquickvisualdatamodel::objectListModel
Change-Id: I467b45109332e66fc62f3de00f376b1b88ab19ca
Reviewed-by: Alan Alpert <alan.alpert@nokia.com>
Holger Hans Peter Freyther [Sun, 27 Nov 2011 19:42:22 +0000 (20:42 +0100)]
directfb: Introduce EGL integration for DirectFB
Introduce a new platform called 'directfbegl' that allows platform
integration with EGL. Change the QDirectFbIntegration to make it more
easy to hook up in the creation process, introduce an EGL integration
with custom screen, window and EGL Platform Context.
Vendors might need to add custom code to initialize EGL to be used with
DirectFB, this can be done in QDirectFbScreenEGL::platformInit.
Change-Id: I7bee277ede27c72437cd7c5977fa6ed85e65f538
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Holger Hans Peter Freyther [Sun, 27 Nov 2011 19:55:10 +0000 (20:55 +0100)]
directfb: Use QT_BEGIN_NAMESPACE/QT_END_NAMESPACE around the code
Change-Id: Iabf32130dcfe4f5a383e9c99f661ded176432817
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Holger Hans Peter Freyther [Sun, 27 Nov 2011 10:51:45 +0000 (11:51 +0100)]
directfb: Move the macro to the qdirectfbconvenience header file
We will need to have logging outside of the blitter code, make the
macro available to everyone.
Change-Id: I811ecb98a870a818630276b5daa788790db71ccd
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Friedemann Kleint [Thu, 1 Dec 2011 11:34:10 +0000 (12:34 +0100)]
Windows: Fix qabstractfilenengine-test.
The test fails if the repository is checked out with
Windows line endings. Try to work around.
Basically, ensure that common developers can conveniently
run the test.
Change-Id: I91f31b830ba7ba305deea782737d4e07a89420eb
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Frederik Gladhorn [Thu, 1 Dec 2011 18:10:15 +0000 (19:10 +0100)]
Remove action enum.
This is a left over from the old way of
handling accessibility actions.
Change-Id: I1146f3dfec2b842f83a3cdd264e4ebb1013cc517
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Morten Johan Sorvig [Thu, 1 Dec 2011 18:50:15 +0000 (19:50 +0100)]
Compile.
QAccessible and QtQuick API changes.
Change-Id: I5e329543937f9dd4b68dd01321c475149df4678c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Frederik Gladhorn [Tue, 29 Nov 2011 13:07:46 +0000 (14:07 +0100)]
Make cell a proper QAccessible2Interface.
Change-Id: I9b245037e8448f39ed2cb80d1ef5fb0714173518
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Friedemann Kleint [Wed, 30 Nov 2011 09:03:15 +0000 (10:03 +0100)]
Rebuild configure.exe.
- Build tests by default
b8f6ad4d1f081780e9c108cd96007a924c596d14
- Added build system support for installing tests
9ffd7a339f0da644c95e71583134263c06745ed5
- Add V8 snapshot support
52ef2ee57fd75640aebdb7578aefb5303547dcc7
- Reduce size by using -O1
76f2b0ab50df3fa7fb1e74662f08228ef1d54106
Change-Id: I3569a1e0550669154ca4da5eaff23d401556e4a6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Holger Hans Peter Freyther [Mon, 21 Nov 2011 20:37:48 +0000 (21:37 +0100)]
v8: Be able to build V8 for MIPS
Add mips to the list in configure and the v8.pri, build the existing
MIPS files. The result has not been verified to work.
Change-Id: I0f4fd29cd9752d32b6d87e0df0e888822f40ac0a
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Bradley T. Hughes [Mon, 28 Nov 2011 12:05:33 +0000 (13:05 +0100)]
Add QObject::objectNameChanged(const QString &objectName) signal
This is sent when the object's name changes.
tst_moc must be updated since the method count of QObject has changed.
The test assumed that there were 4 invokable methods in QObject. The
new signal is the 5th, which breaks the test's assumptions. Fix this
as well.
tst_QObject must be updated since the
QObjectPrivate::isSignalConnected() method only supports the first 64
signals. With the addition of this new signal, sig61() in the test
becomes the 65th signal, and will always appear connected now.
Task-number: QTBUG-13999 (related)
Change-Id: Ie87893c71a231fafa7ccf2f16102238a7be8327a
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Stephen Kelly [Thu, 1 Dec 2011 13:15:20 +0000 (14:15 +0100)]
Pass the tests when run in visual studio.
Make sure the name of the project corresponds to the project name
passed to try_compile so that the .sln files are created.
Change-Id: Ifee24ac4ab6a16a538bdf7fb32ea252eb1ba436a
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Shane Kearns [Wed, 30 Nov 2011 17:21:51 +0000 (17:21 +0000)]
Fix QTcpServer::serverAddress() for dual stack sockets
When listening on QHostAddress::Any, serverAddress() should return
QHostAddress::Any too, assuming that setting the socket options
was successful.
Task-number: QTBUG-22899
Change-Id: I50a9ff1b4ad0c1c1905e2952c595d7068df2627d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Friedemann Kleint [Thu, 1 Dec 2011 14:09:09 +0000 (15:09 +0100)]
Tests: Temporarily remove qsound.
As the test does not link Windows.
Change-Id: I07ce2381146e43aef4353ddb2625ac472e6a0555
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Friedemann Kleint [Thu, 1 Dec 2011 13:44:33 +0000 (14:44 +0100)]
Windows: Fix compilation of qdir test.
Introduced by
3385fb91e1e55e1bfa1f78dfb8ce2e9f3fdaedef.
Change-Id: If47a9874cccb7b64840e77b1f654ba8e1cf372e0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Jędrzej Nowacki [Mon, 28 Nov 2011 14:40:35 +0000 (15:40 +0100)]
Improve Q_CONSTRUCTOR_FUNCTION and Q_DESTRUCTOR_FUNCTION macros.
By adding anonymous namespace and static linkage we are reducing
visibility of implementation of these macros.
This patch also fixes warning about a declared but unused variable which
was issued by gcc 4.6 for Q_CONSTRUCTOR_FUNCTION.
Change-Id: I2cb70ad4c93f6f77e5518420abcce6fd4cadccfa
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Gunnar Sletta [Thu, 1 Dec 2011 10:06:13 +0000 (11:06 +0100)]
Fix image format use in cocoa plugin
The screen should be opaque. It is used to create the
default pixmap data which should be RGB32 on mac.
The backing store uses premultiplied in the resize but
initializes with non premultiplied. Unify this to all
premultiplied
Change-Id: I7d17d492fcff30b555a768da852ff9be0a9d96aa
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Jiang Jiang [Wed, 30 Nov 2011 15:43:45 +0000 (16:43 +0100)]
Add QRawFont from data support to Mac font db
Change-Id: I02f1c4b35b9ed585e72aa4bad9b75d3c098f8e62
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Jiang Jiang [Wed, 30 Nov 2011 15:41:11 +0000 (16:41 +0100)]
Set supporting writingSystem correctly
Change-Id: I963aa7b69a48441619c5885c443ae2620fcc4e57
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Friedemann Kleint [Thu, 1 Dec 2011 08:24:38 +0000 (09:24 +0100)]
Polish QWinEventNotifier.
Fix docs, remove redundant Q_DISABLE_COPY.
Change-Id: I8398fb71bced5ac6f7eb8613cd2f8d10c325f056
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Samuel Rødal [Wed, 23 Nov 2011 08:36:51 +0000 (09:36 +0100)]
Added rotation animation to paintedwindow example.
This serves as a useful test case for the QScreen orientation API.
Change-Id: I009ebd8b6d345453620420d84f3ff9d2d2e2663e
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Holger Hans Peter Freyther [Sat, 19 Nov 2011 19:57:14 +0000 (20:57 +0100)]
opengl: Do not crash when programGuard is a nullptr
The rest of the code is checking programGuard for nullptr, do it here
as well to prevent a segmentation fault.
Change-Id: I38a03f74d493b8f731157be1739707b39904f7ba
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Samuel Rødal [Tue, 22 Nov 2011 10:06:15 +0000 (11:06 +0100)]
Added QPA window system interface handler for logical DPI changes.
Logical DPI is independent from geometry and physical DPI.
Change-Id: Ice487f61e1bda9e6791e2adf6998ebf61cdbaef2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@nokia.com>
Rohan McGovern [Thu, 1 Dec 2011 03:10:13 +0000 (13:10 +1000)]
Mark tst_qfilesystementry as private test on Windows.
On Windows (only), this test depends on some Q_AUTOTEST_EXPORT symbols.
Change-Id: I3b2ef8dcd56b8860f02fc28f45823b889e794909
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Rohan McGovern [Tue, 29 Nov 2011 06:45:52 +0000 (16:45 +1000)]
testlib: add QFINDTESTDATA macro for finding testdata files
Automated tests often need to load some data from external files.
Currently, a wide variety of approaches for this have been used in Qt
autotests, including:
- embed the source directory into the test binary at compile time, and
find the testdata relative to that; this fails when the source tree
is no longer available (e.g. when the tests are deployed to a device).
- use a path relative to the current working directory, and trust that
the caller always sets the current working directory such that the
testdata can be found; this fails when the caller uses a different
working directory than expected.
- use a path relative to QCoreApplication::applicationDirPath();
this fails when source tree != build tree (since testdata is not
automatically copied into the build tree).
- compile the files into the binary using the Qt resource system; this
should work, but does not allow for testing of code which genuinely
needs external files.
It seems that there is not a simple method for determining the testdata
path which can be reliably used in all circumstances, so various tests
have reinvented the testdata location method in different ways.
Therefore, this is a good candidate for an addition to the testlib API.
The current implementation of QFINDTESTDATA is able to find testdata
in all three of (build tree, install tree, source tree), in that order.
Change-Id: Ib2fed860723ccf437240da3b00db22dfe1a6b56c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Rohan McGovern [Thu, 24 Nov 2011 00:36:10 +0000 (10:36 +1000)]
Fixed installation of corelib tests
In .pro files, removed wince/symbian-specific DEPLOYMENT cases and
replaced them with TESTDATA where appropriate.
In .cpp files, removed SRCDIR and relative paths to testdata and
replaced them with the QFINDTESTDATA macro where appropriate.
Modified test helper apps/libs to install themselves under the test
they relate to.
This change allows corelib tests to be correctly installed, along with
their testdata, via `make install'.
Change-Id: I5e202e2f3b577af7e39072d5c9fe13e0ca125304
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Jiang Jiang [Wed, 30 Nov 2011 10:28:30 +0000 (11:28 +0100)]
engineData should be cached solely based on QFontDef
Each QFontPrivate points to a QFontEngineData instance, which is
essentially a mapping from different scripts to QFontEngines. Let's
say we have QFont("Waree") and trying to use that for one text in
Thai and another text in English, there should be only one
QFontEngineData: [ QUnicodeTables::Common -> QFontEngineMulti(1),
QUnicodeTables::Thai -> QFontEngineMulti(2) ]. If we cache
QFontEngineData using QFontCache::Key (which includes QFontDef,
script and screen) as the key, then we will create two
QFontEngineData: [ QUnicodeTables::Common -> QFontEngineMulti(1) ]
and [ QUnicodeTables::Thai -> QFontEngineMulti(2) ], so it will be
pointless to have QFontEngineData at all.
This bug was introduced in a 2005 refactoring (
512f0e8c in history
repo).
Change-Id: I14677507e97682472cde9a0e1b594e903ec9e718
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@nokia.com>
Friedemann Kleint [Tue, 29 Nov 2011 11:49:24 +0000 (12:49 +0100)]
Fix compilation of Benchmark tests on Windows.
Change-Id: I92186f916792d110f22b23525b673ef006e19046
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Jason McDonald [Thu, 1 Dec 2011 03:02:54 +0000 (13:02 +1000)]
Improve QString autotest.
The QString autotest shares test data between the remove() and replace()
tests because those functions are very similar. Unfortunately, when an
integer overflow bug was found in remove() the regression test was not
shared with replace(), which prevented the same integer overflow bug
from being discovered in replace().
This commit improves the test by sharing the overflow test data between
both functions, thus demonstrating the remaining bug.
Task-number: QTBUG-22967
Change-Id: I2778249800f74799d890eefa9227ca8ddd8fbaa3
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Jason McDonald [Tue, 29 Nov 2011 07:14:54 +0000 (17:14 +1000)]
Minor improvement to QByteArray autotest
Rename the qUncompress test to make clear that the test only deals with
uncompressing corrupted data and add a message making it clear that this
test will produce some warning messages.
Don't skip creating the test data, as that prevents the test output
reporting exactly what is skipped.
The expected output is the same for every row (an empty QByteArray), so
don't bother storing that in the data table.
Change-Id: I59f1cc91a941bcaadacb2a613dd5eca2564961c1
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Debao Zhang [Sun, 27 Nov 2011 17:00:38 +0000 (01:00 +0800)]
Make QWinEventNotifier part of the public API
QWinEventNotifier is an essential class if you're using native Windows
Overlapped IO and need to convert it to Qt signals. However the header
is marked private.
Task-number: QTBUG-68
Change-Id: I22e9a84da97f969ddb82e9ba15e604a01abd80d0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Bradley T. Hughes [Mon, 28 Nov 2011 14:24:25 +0000 (15:24 +0100)]
Merge QObject::tr*() and QCoreApplication::translate() overloads
These were marked as TODO items for Qt 5. Do them now. (The TODO item
was added when plural support was added back in the early Qt 4 days.)
Change-Id: I3be50bc657582db730401103d691234695784340
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Shane Kearns [Wed, 30 Nov 2011 15:42:05 +0000 (15:42 +0000)]
Fix QHostAddress::operator==(QHostAddress::SpecialAddress)
QHostAddress(QHostAddress::Any) was not equal to QHostAddress::Any
because only one of the operator== overloads was handling this.
Task-number: QTBUG-22898
Change-Id: Ifd36947a50e8c36362b4e850fd8d5105ee0925ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Samuel Rødal [Tue, 22 Nov 2011 09:34:47 +0000 (10:34 +0100)]
Made more QScreen properties NOTIFY and added average DPI properties.
The physicalDotsPerInch() is the average of the horizontal and vertical
physical dots per inch, and likewise logicalDotsPerInch() is the average
of the horizontal and vertical logical dots per inch.
Change-Id: I18aa610dc9a63efe062f78c823ba29f90b2712f4
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Olivier Goffart [Tue, 8 Nov 2011 17:34:47 +0000 (18:34 +0100)]
Support for up to 6 arguments in the new connection syntax
For compilations without variadic template support
Change-Id: I78af4f6022ad7a0923e5c5788a34eb7d834f50f3
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Olivier Goffart [Thu, 10 Nov 2011 11:17:53 +0000 (12:17 +0100)]
Document the new connection syntax
It is already documented in the QObject API documentation, but
Also update the overview
Change-Id: I92f44a50222738530928e3f4e6e463b3210d3a29
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Jiang Jiang [Tue, 15 Nov 2011 12:59:36 +0000 (13:59 +0100)]
Mac Core Text font database for QPA
Add Core Text fontdatabase for Mac and use it as default. It also
reenabled Core Text font engine for native font rendering on Mac,
though it's not used in declarative UI (by default declarative
will still use scenegraph, which will only use this font engine
for retrieving font metrics and outlines).
With the new fontdatabase it's now possible to load all the fonts
installed in the system as well as adding application fonts.
Change-Id: I0d2aa1420019adf6d0f70dd147a9d71b2684d3f1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Honglei Zhang [Tue, 29 Nov 2011 11:00:16 +0000 (13:00 +0200)]
Fix sqlite driver memory eating due to close failure
If an ongoing query is not finalized before close function is
called, sqlite driver still tries to close the connection to
sqlite. In this case, sqlite reports an error to sqlite driver
which is not reported to the client. The failure in close causes
connection to sqlite unclosed and memory is not freed. This
fix tries to finalize all queries before close function is called.
The close function should succeed.
Task-number: QTBUG-16967
Change-Id: I2f10a2a9017446a9d44b693b00464a89625e3602
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Zeno Albisser [Tue, 29 Nov 2011 17:30:34 +0000 (18:30 +0100)]
Include qglobal.h first in qnsview.mm compilation unit.
If cocoa headers are being included first, this messes up
the defines MAC_OS_X_VERSION_MAX_ALLOWED and MAC_OS_X_VERSION_MIN_REQUIRED
when compiling with clang.
Change-Id: I07177d07a0ac7c5f7e72b04f42d6343e689e0d33
Reviewed-by: Ali Akhtarzada <ali.akhtarzada@nokia.com>
Reviewed-by: Denis Dzyubenko <denis.dzyubenko@nokia.com>
Jan-Arve Saether [Wed, 30 Nov 2011 08:48:51 +0000 (09:48 +0100)]
Fix casting. Casting is now done through the virtual interface_cast.
Change interface_cast to return void* to avoid using virtual
inheritance.
Get rid of the magic Q_ACCESSIBLE_OBJECT macro.
Change-Id: I94b824aef53f2ba657d39d406b387c8681d47ee4
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@nokia.com>
Joerg Bornemann [Thu, 24 Nov 2011 09:59:42 +0000 (10:59 +0100)]
mkspec win32-msvc2003 moved to unsupported
Change-Id: Idabdd08a033f3e77dae2de21b6544f57893abd59
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Jo Asplin [Fri, 25 Nov 2011 08:30:03 +0000 (09:30 +0100)]
Moved integrationtests/* into other/
Currently there seems to be no precise definition of what
an integrationtest is in the context of Qt testing.
To avoid confusion, the tests under integrationtests/ are
moved into other/ (which is effectively where we keep
tests that don't clearly fit into any other category).
Tests can be moved back into an integrationtests/ directory
at a later point, should an unambiguous definition be established.
Change-Id: I3bb289be2dc2aca11b51a8ce8fcc5942f06d6c5c
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Jason McDonald [Tue, 29 Nov 2011 06:37:01 +0000 (16:37 +1000)]
Cleanup corelib autotests
Remove references to the old bug tracker. The data from the old bug
tracker is no longer accessible, so these markers are meaningless.
Change-Id: Ib9d029d52b70fd0a512b9532d65f03763eabfe57
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Olivier Goffart [Fri, 25 Nov 2011 18:00:01 +0000 (19:00 +0100)]
Benchmark the new signal slot connection syntax.
- Added emition of a slot connected using the new syntax, as well as a
functor
- Replaced the old connect_disconnect_benchmark by a new one. The old
one was of little interest as it tried to connect to every signal,
producing a lot of similar results.
The new test tests different ways of connecting and disconnecting
Change-Id: I3c04c24027252308f8942bcd9562110104cdb4e9
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Olivier Goffart [Tue, 29 Nov 2011 00:44:18 +0000 (01:44 +0100)]
Fix Qt::QueuedConnection when signal has a return value
For queued connections, the args[0] is set to null as it make no sens to
forward the return value to the signal.
So we need to check in the operator, that the pointer is not null.
(container.data is args[0])
Change-Id: I80bde66f1ec19de0f4962c80e5b2797d2819075c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Jędrzej Nowacki [Tue, 29 Nov 2011 09:07:38 +0000 (10:07 +0100)]
Fix a deadlock in QMetaType.
QMetaType should unlock all mutexes guarding custom types data before
calling an user code.
Task-number: QTBUG-22930
Change-Id: I501d011d6cbd467d8f22402d668e84aa848061b8
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Friedemann Kleint [Tue, 29 Nov 2011 10:58:57 +0000 (11:58 +0100)]
QByteArray: Fix MSVC warning.
Warning C4308: negative integral constant converted
to unsigned type.
Change-Id: Ibdb14ad2ceebd56715fda861151e92f6dc10f955
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Frederik Gladhorn [Tue, 29 Nov 2011 12:25:37 +0000 (13:25 +0100)]
Accessible debug stream: don't print details for invalid objects
Print "invalid" instead of the details.
Change-Id: I785a896b680fad9e9bb81769d9e3361542fbaafe
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Olivier Goffart [Fri, 25 Nov 2011 21:35:32 +0000 (22:35 +0100)]
Support Qt::UniqueConnection in the new connection syntax
This commit also improves the related documentation a bit.
The test is copied from the test with the old syntax, but all the
connection statement are changed to use the new syntax
Change-Id: Ia5630ca4335b9f8ca6d724ae3c8750d6f0804d8e
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Olivier Goffart [Tue, 29 Nov 2011 06:21:10 +0000 (07:21 +0100)]
Reduce code dupplication in QObject::connect
Move from each implementation of QObject::connect to
QObjectPrivate::addConnection the code that adds the
QObjectPrivate::Connection* to the sender's list.
Change-Id: I665af016d5e6673eb0e9c06965e5deed50454b28
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Olivier Goffart [Tue, 8 Nov 2011 23:11:30 +0000 (00:11 +0100)]
Initialize the return value of signals
Before, the constructor was called for complex objects, but
POD were left unitinialized. Now, they are zero-initialized.
Also add test for return values
Change-Id: Iff9bf6687589d7b7395a71fb6f650ab8aa2b6bd1
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Olivier Goffart [Fri, 18 Nov 2011 09:57:04 +0000 (10:57 +0100)]
QObject::disconnect with new syntax
This add an overload to disconnect which is symetrical to the new
syntax of connect.
It is possible to diconnect connection like this:
QObject::connect( sender, &Sender::valueChanged,
receiver, &Receiver::updateValue );
QObject::disconnect( sender, &Sender::valueChanged,
receiver, &Receiver::updateValue );
This overload only work with pointer to member function, and not static
functions or functors.
The test is copied from tst_QObject::disconnect(), just
changed the syntax of the connection and disconnection
Change-Id: Ia8f819100cb12098e32877522b97b732b1e676a8
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Stephen Kelly [Tue, 1 Nov 2011 13:59:23 +0000 (14:59 +0100)]
Install CMake config files from Qt.
This includes a BSD licenced file Qt5CoreMacros.cmake which is
adapted from Qt4Macros.cmake in the CMake source tree.
Change-Id: I54326b808795535490a0489659b351a8da72cdbb
Reviewed-by: Clinton Stimpson <clinton@elemtech.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Joerg Bornemann [Thu, 24 Nov 2011 09:58:09 +0000 (10:58 +0100)]
mkspec win32-borland moved to unsupported
Change-Id: Ie34157318733a700214ff68708db8127644f65ba
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Kent Hansen [Fri, 25 Nov 2011 13:53:39 +0000 (14:53 +0100)]
Add deprecated headers support to syncqt
When renaming classes, or when moving classes from one module to
another, it's useful to have a simple way of supporting the old
API/location for some time. To this end, syncqt shall now recognize
a "deprecatedheaders" section in sync.profile. It looks like this:
%deprecatedheaders = (
"QtDeclarative" => {
"qquickcanvas.h" => "QtQuick2/qquickcanvas.h",
"qquickitem.h" => "QtQuick2/qquickitem.h",
"QQuickCanvas" => "QtQuick2/QQuickCanvas",
"QQuickItem" => "QtQuick2/QQuickItem",
}
);
In the above example, syncqt would generate a header called
qquickcanvas.h for the QtDeclarative module; when included, this
header will issue a warning and include <QtQuick2/qquickcanvas.h>.
And so on, for the other entries.
Deprecated headers are installed along with the module's normal
headers.
Change-Id: Ie2518b42275c2b2ff44216f07d376ccf5be6dc45
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Samuel Rødal [Tue, 29 Nov 2011 09:16:57 +0000 (10:16 +0100)]
Prevented Xlib sequence errors in xcb plugin.
Prevent Xlib errors of the form
"Xlib: sequence lost (0x2716a > 0x1717c) in reply type 0x11!" from
being printed. We know the cause of these is because we're manually
calling the XESetWireToEvent handlers since those are not handled by
XCB, and this confuses Xlib since it's then seeing events with old
sequence numbers. We simply set the sequence number to the latest
sequence number and the errors go away.
Change-Id: I2a9e7a7cfd0ba8692e43ce61f796a8189305e0d3
Reviewed-by: Simon Hausmann <simon.hausmann@nokia.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@nokia.com>
Johannes Zellner [Mon, 28 Nov 2011 18:45:14 +0000 (19:45 +0100)]
Remove QPlatformPrinterSupport usage
QPlatformPrinterSupport seems to not exist anymore.
Change-Id: I142ce99877620e0b678fd6693bc72257ca230e4f
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Samuel Rødal [Mon, 28 Nov 2011 14:58:03 +0000 (15:58 +0100)]
Added screenChanged() signal and handle screen destruction in QWindow.
It can be useful to get a signal when the QScreen changes, for example
when having bindings to QScreen properties in QML.
Change-Id: I919dd12c656485b28b393aec5eedac4c01593afc
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
Richard Moore [Sun, 27 Nov 2011 12:45:30 +0000 (12:45 +0000)]
Make the default ssloptions testable.
Centralise the specification of the default ssloptions to make the code
clearer and more testable.
Change-Id: I4f4bae72736dd063ee4cd64c6375e82d0600a105
Reviewed-by: Peter Hartmann <peter.hartmann@nokia.com>
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Jędrzej Nowacki [Mon, 28 Nov 2011 09:33:50 +0000 (10:33 +0100)]
Redefinition of QVariant::Type.
QVariant::Type is redundant, it copies QMetaType::Type enum. In long
term it might be removed completely, but it wouldn't be a source
compatible change.
Change-Id: Ibe79ca0ab43918b4cf767cd7a5040f865abbf03f
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Friedemann Kleint [Tue, 29 Nov 2011 07:49:23 +0000 (08:49 +0100)]
Fix linking of autotests on Windows.
Partial revert of
94fc8750797ffd3ef867d0cdc7849492cfee2c23. All dependent
modules need to be specified in the QT variable, except core and gui, which
are there by default.
Change-Id: Ie8ffed56de03a37da191772fa321ed162e44a50d
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Friedemann Kleint [Tue, 29 Nov 2011 07:51:44 +0000 (08:51 +0100)]
Fix compilation of qeasingcurve autotest on Windows.
MSVC cannot decide on an overload for pow().
Change-Id: Ied3fbc0de403774d9f85738852cf671ce42cd1c1
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Friedemann Kleint [Tue, 29 Nov 2011 07:54:26 +0000 (08:54 +0100)]
Temporarily disable Windows-specific QPrinter autotest.
See QTBUG-22927.
Change-Id: I6022d795bf893797c2ab1a91ffffa7b482109137
Reviewed-by: Oliver Wolff <oliver.wolff@nokia.com>
Friedemann Kleint [Tue, 29 Nov 2011 08:59:26 +0000 (09:59 +0100)]
QtGui: Fix a crash in OpenGL on Windows.
Add missing WINAPI calling convention for QOpenGLFunctions.
Change-Id: I43827d801c5ecc3859d8d4ba0bb9bccc108880e7
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Friedemann Kleint [Tue, 29 Nov 2011 11:00:17 +0000 (12:00 +0100)]
configure.exe: Build tests by default.
As does configure[.sh].
Change-Id: I5561d83a0c3959d6ae1efa5231cf2a149ad28377
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Friedemann Kleint [Mon, 28 Nov 2011 16:21:50 +0000 (17:21 +0100)]
Fix compilation of some benchmark tests on Windows.
Change-Id: Iab6b83f3d4693a3b5deaaf88043dde75a84866fd
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Friedemann Kleint [Mon, 28 Nov 2011 15:02:50 +0000 (16:02 +0100)]
QtCore/IO: Fix some warnings on Windows (64bit).
- Warnings about conversion from size_t to int
- Unused variable.
Change-Id: I4a79fa6dc4b95551a64d282ae4307b0edff41201
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Kent Hansen [Mon, 28 Nov 2011 08:07:30 +0000 (09:07 +0100)]
V8/arm: Add relevant float defines
CAN_USE_VFP_INSTRUCTIONS implies arm7.
This is the only arm configuration we currently support.
These defines also ensure that a suitable snapshot is generated
when cross-compiling (i.e., when using the arm simulator).
Change-Id: I3a8a4224b9127a549b3987bcf5651ed1ffb8079a
Reviewed-by: Aaron Kennedy <aaron.kennedy@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Bradley T. Hughes [Mon, 28 Nov 2011 10:49:23 +0000 (11:49 +0100)]
Remove obsolete QMetaObject::activate() overloads.
The overloads taking a range were previously used for cloned signals
(ones that had default arguments). Commit
919b723088b8617b202b92d80b8d0983e4fd9500 changed how cloned signals are
handled, making the from,to overloads obsolete.
The 3 argument activate() overload that does not take a QMetaObject
argument was marked obsolete by the same commit, but considering that it
is used by our autotests, I've decided to keep it and not mark it as
obsolete anymore.
Change-Id: I631ce84dce156dec68cf26e10787cb35e3f50e18
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Jason McDonald [Tue, 29 Nov 2011 02:53:30 +0000 (12:53 +1000)]
Cleanup corelib autotests
Don't name test functions using task identifiers from obsolete bug
trackers.
Change-Id: Iba6ae8ad3b39e365c5510ed5c86749a167572829
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Toby Tomkins [Mon, 28 Nov 2011 01:33:08 +0000 (11:33 +1000)]
Fixed Qtbase OSX specific namespace compilation.
Change-Id: Idacfa679df7aa6417f8017f80928907830d15df2
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Jędrzej Nowacki [Fri, 18 Nov 2011 09:05:25 +0000 (10:05 +0100)]
Fix a small memory leak in QXcbIntegration.
Prefer to use a smart pointer over a raw pointer.
Change-Id: If8b5cbef8767433eab2f82c14abaa9608b8e61d0
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Olivier Goffart [Fri, 25 Nov 2011 09:53:38 +0000 (10:53 +0100)]
Fix crash in tst_qatomicpointer test
if given char*, QCOMPARE will try to compare the strings pointed by the
char*
In this case, the char* just point to garbage, we just want to compare
the addresses.
(Was changed in commit
6fcfae99d3615c7a850e4933691763097078c8e4)
Change-Id: I9edb2b676aedf67a252aea6a41d56cd1eef7befc
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Jędrzej Nowacki [Mon, 28 Nov 2011 11:15:09 +0000 (12:15 +0100)]
Fix documentation for QVariant::Type enum.
QPolygonF was missing. QPointArray doesn't exist anymore.
Change-Id: I764508f67d859c8519b44a6a1ee19d1f96ebe1cf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Jędrzej Nowacki [Thu, 17 Nov 2011 13:42:48 +0000 (14:42 +0100)]
Fix clang warning about bool to pointer conversion.
The operation is legal from C++ perspective but only for "false" as it
is guaranteed to be 0. Anyway returning 0 instead of "false" is
logical and it follows coding style used in the modified functions.
Change-Id: Ia09758e8d28599097f5c40eb24722890508afdbc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>