João Abecasis [Fri, 17 Feb 2012 10:23:41 +0000 (11:23 +0100)]
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>
João Abecasis [Thu, 16 Feb 2012 22:11:26 +0000 (23:11 +0100)]
Add header to .pri
Commit
7d16ea40 introduced QArrayDataPointer and respective header file, but
missed making it known to qmake.
Change-Id: I48c1831730cc4d27c6600c090a719861bb71a301
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
João Abecasis [Thu, 16 Feb 2012 22:53:58 +0000 (23:53 +0100)]
QVector: always grow exponentially
For non-movable types (QTypeInfo<T>::isStatic), QVector would grow the
array linearly, and defer to qAllocMore otherwise. That property,
however, gives no indication as to how the vector will grow.
By forcing additional allocations for growing containers of such types,
this penalized exactly those objects which are more expensive to move.
We now let qAllocMore reign in growth decisions.
Change-Id: I843a89dcdc21d09868c6b62a846a7e1e4548e399
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
João Abecasis [Thu, 16 Feb 2012 18:59:07 +0000 (19:59 +0100)]
qAllocMore: Always grow exponentially
qAllocMore is used by growing containers to allocate additional memory
for future growth. The previous algorithm would grow linearly in
increments of 8 up to 64 and then progress exponentially in powers of
two.
The new (constant time) algorithm does away with the linear segment and
always progresses exponentially. It also has the nice benefit of cleanly
avoiding undefined behaviour that the old implementation tried hard to
circumvent.
Besides always progressing exponentially, the next-power-of-two
algorithm was tweaked to always include space for growth. Previously
queries at boundary values (powers of two) would return the same value.
The test was updated to verify sanity of results. As the algorithm is
well behaved, testing of bogus data was dropped. Whatever happens in
those cases is irrelevant, anyway: the bug lives elsewhere.
Change-Id: I4def473cce4b438734887084e3c3bd8da0ff466b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
João Abecasis [Tue, 31 Jan 2012 17:31:58 +0000 (18:31 +0100)]
Remove constructors taking implicit string sizes
Constructors taking explicit sizes got a default -1 size argument that
triggers length calculation from nul-terminated strings.
This imposes a slight change in behavior: negative size arguments would
previously be ignored and generate an empty string whereas with this
patch we expect to see a nul-terminated string.
On the other hand, keeping the previous behavior could effectively hide
errors in user code and I can't find a good reason to support it.
Documentation for the constructors was updated and made more consistent
between the classes.
Change-Id: I738ac3298cffe3221c8a56e85ba2102623e7b67d
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
João Abecasis [Mon, 13 Feb 2012 23:02:08 +0000 (00:02 +0100)]
Fix and simplify QString::mid
'position' was being used to initialize 'n' before being fully
validated. To compensate for this, the code attempted to fix 'n' once
'position' was found to be invalid (negative). This would, however, also
attempt to "fix" a perfectly valid value of 'n'.
By fully validating 'position' beforehand we avoid this trap and can
safely use it to validate and reset 'n', as needed.
Arithmetic for boundary conditions of 'n' was rearranged to avoid
triggering integer overflow.
Removed explicit check for shared_null, as the same behaviour can be
supported without it.
Change-Id: Ie9bff7b8137a74f55c7dcfe629bd569045e28f3c
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
João Abecasis [Fri, 10 Feb 2012 15:13:56 +0000 (16:13 +0100)]
Add support for rvalue-references in QArrayDataPointer
I love how this magically makes SimpleVector move-aware :-)
Change-Id: I5cb75954d70cf256863c33e684ebc4551ac94f87
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
João Abecasis [Fri, 10 Feb 2012 11:36:00 +0000 (12:36 +0100)]
Don't expect null d-pointer in destructors
The feature was introduced in commit
83497587b2 (2004, private history),
to allow static containers to remain uninitialized until needed.
This finishes reverting said commit. The feature had been silently
removed from QByteArray and QString in commit
a5a0985476 (2004, private
history); removed from QList in
aef03d80f7.
Change-Id: I9947be7758d5730d2d6e6eb2a8a308db6e9bef39
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
João Abecasis [Wed, 1 Feb 2012 16:57:24 +0000 (17:57 +0100)]
Make QStringBuilder use memcpy for QByteArrayLiteral
There is no need to do a bytewise copy looking for the terminating
nul-character when the size of the data is statically declared and known
ahead of time.
Change-Id: I787745a58955d1a366624f9ea92e9e701de8c981
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
João Abecasis [Mon, 6 Feb 2012 10:38:26 +0000 (11:38 +0100)]
Remove use of QT_MODULE from QArrayData stack
The macro was made empty in
4ecf82795de54fba530ac9c386f3afff2174edbd,
and is no longer necessary or used.
Change-Id: If000ff51729e41bdcd1b0409961cf94d50e5f172
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
João Abecasis [Mon, 6 Feb 2012 10:18:18 +0000 (11:18 +0100)]
Update license headers
- Updated copyright year, per
1fdfc2abfe1fa26b86028934d4853432e25b4655
- Updated contact information,
629d6eda5cf67122776981de9073857bbc3dcba2
- Drop "All rights reserved",
5635823e17db3395d9b0fa8cfcc72f82fea583f4
(Empty line added to maintain license header line count)
Change-Id: Ie401e2b6e40a4b79f4191377dd50dc60be801e1f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
João Abecasis [Sun, 5 Feb 2012 13:38:36 +0000 (14:38 +0100)]
QConstStringData -> QStaticStringData
The class was renamed in
fed603fde515339ec520accefded211ac6f69982.
Change-Id: I859f318e80a739f31c2666d0e3088c62b55c5f13
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
João Abecasis [Sun, 5 Feb 2012 20:25:31 +0000 (21:25 +0100)]
Merge remote-tracking branch 'gerrit/master' into containers
Conflicts:
src/corelib/tools/qstring.cpp
Change-Id: I23d214bf33c2badfae1876da3cc7d6d8f6e635fb
Friedemann Kleint [Mon, 30 Jan 2012 14:16:50 +0000 (15:16 +0100)]
qmake: Work around MSVC compiler bug.
Disable optimization for getProjectUUID() as it triggers
ASSERT: "&other != this" at qstring.h:720 with -O2.
Change-Id: I51b31d4318ba9be187c186623099171d8f48235b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Mark Brand [Tue, 5 Jul 2011 15:27:54 +0000 (17:27 +0200)]
reduce cost of checking cache for data() and headerData()
Assume requested row is usually not cached.
Change-Id: I7727b431cc3841528aa6390400b93b1218773e65
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Mark Brand [Thu, 7 Jul 2011 10:42:07 +0000 (12:42 +0200)]
QSqlTableModel::setData(): comment historical idiosyncracies
Change-Id: I5c4782e18dc7a471dc294a4146db04f1efd3ed2e
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Mark Brand [Thu, 7 Jul 2011 09:52:11 +0000 (11:52 +0200)]
refactor QSqlTableModel::setData()
-move logic out of switch statement
-clear cache more clearly for OnFieldChange
-call setValue() in one place instead of two
-eliminate extra return path
Existing idiosyncracies have been kept for the time
being.
Change-Id: Ia4c5a5fd3e374b53e3c4d870f2ee9d37b5090917
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Mark Brand [Wed, 6 Jul 2011 19:10:45 +0000 (21:10 +0200)]
refactor QSqlTableModel::setRecord()
-Do not use setData()
We're using ModifiedRow now so it makes sense to buffer the changes
and submit the row at once. This improves readability and
encourages further haromonization of the editing strategies.
-No longer need temporary change to OnRowChange
Previously, the strategy was temporarily changed from OnFieldChange
to OnRowChange in order to obtain the desired behavior from setData().
Now, since we don't use setData(), we can program the desired behavior
here and don't need this trick.
-Comment historical idiosyncracies/bugs
Change-Id: I6d9e2a69e1571a74c630ad1392e15b60fc0ad3f2
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Mark Brand [Wed, 6 Jul 2011 18:52:06 +0000 (20:52 +0200)]
merge private and public QSqlTableModel::setRecord()
Change-Id: I409bd32f85224db64363688d63fc372d1beaa0d3
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
Mark Brand [Wed, 6 Jul 2011 07:49:45 +0000 (09:49 +0200)]
ModifiedRow: use for all edit strategies
Previously ModifiedRow was used only for OnManualSubmit and
a seperate buffer and utility methods were used for OnFieldChange
and OnRowChange.
Also, initialization of the edit buffer is done by ModifiedRow
instead of a helper function.
Change-Id: I3316498e5bb10c416138ca14c3a7f8b143c8e544
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
John Layt [Fri, 27 Jan 2012 20:21:21 +0000 (20:21 +0000)]
SIC: QLocale: Make QSystemLocale a private class
As discussed on list and approved by Lars and Thiago.
Make QSystemLocale private to give us time and space to change it to a
better implementation.
Change-Id: Ifd806972f3996c43a876f544f78c6557ad71cd75
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
John Layt [Fri, 27 Jan 2012 19:04:42 +0000 (19:04 +0000)]
SIC: QLocale: Remove base argument from conversion to number api
As discussed on list and approved by Lars and Thiago.
Remove the option to use QLocale to convert strings to non-decimal
numbers as they are not localised and the api is available in QString.
Change-Id: Ib810505ba86fb08ad23571b39f1520e86fde6787
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
John Layt [Sun, 22 Jan 2012 21:23:50 +0000 (21:23 +0000)]
QString: Make convert to number methods only use C locale
Ensure consistent conversions by not using the system default locale.
Change-Id: I60db9fc4f465c0254f3213419e57d7879aaddd65
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Lars Knoll [Fri, 3 Feb 2012 13:17:26 +0000 (14:17 +0100)]
Move QtConcurrent into its own module
Task-number: QTBUG-20892
Change-Id: I614500aafb6428915509983608bbb0ade4e4f016
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Samuli Piippo [Thu, 26 Jan 2012 11:53:00 +0000 (12:53 +0100)]
Exclude helloconcurrent when QtConcurrent is not configured
Task-number: QTBUG-23874
Change-Id: I374a08ce947e804ebb1da08c413e340e4719d9d0
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Jędrzej Nowacki [Tue, 31 Jan 2012 13:16:52 +0000 (14:16 +0100)]
Add movability tests for QByteArray.
QByteArray is declared as movable but it was not tested before.
Change-Id: I4fb636f8705c3fd792a768872206203ee5fd4ddb
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Jędrzej Nowacki [Fri, 13 Jan 2012 14:12:46 +0000 (15:12 +0100)]
Do not crash trying to load or save QModelIndex.
QModelIndex doesn't have data stream operators loading or saving this
type should gracefully fail.
Change-Id: I6a1a3bab3f83ff4921369a07fdb54ac462eff554
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Jędrzej Nowacki [Tue, 24 Jan 2012 12:58:04 +0000 (13:58 +0100)]
Reimplement QMetaType::destroy.
New implementation is using QMetaTypeSwitcher, which should reduce
maintenance costs.
Change-Id: Ibb7bb4b9de0e19c081c087d9eebf0c709118d3b4
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Nick Ratelle [Mon, 19 Dec 2011 14:53:35 +0000 (10:53 -0400)]
Fixes QIconvCodec::convertToUnicode()
We need to hang onto the internal state of the utf16 converter
object whenever converting a long string to unicode. This was
failing with the text stream class -- the first read was okay,
but subsequent reads could not be correctly converted to unicode.
Change-Id: I9e2d445d51c9009591bfa7a1765ea2d09ae634a2
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
John Layt [Mon, 9 Jan 2012 20:50:00 +0000 (20:50 +0000)]
QDateTime: Remove Julian Calendar
Convert QDate to only use Gregorian calendar and not Julian calendar
before 1582. In future the Julian can be used via proper calendar
classes.
Change-Id: I547a3550332057a0ab1be616706630b6afaceffc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
John Layt [Thu, 25 Aug 2011 06:54:16 +0000 (07:54 +0100)]
QDateTime: Store Julian Day as qint64
Store the QDate Julian Day number as an qint64 instead of uint32 to
enable support for dates before 2 January 4713 BCE. This changes the
possible date range to be approx 2.5 Quadrillion BC to 2.5 Quadrillion
AD. A qint32 was not used as it only covers 5 million BCE to 5 million
CE which does include Geological or Astronomical time.
The effective supported date range is currently 4800 BCE to 1.4 million
CE due to restrictions in existing conversion formulas. The effective
range will be extended later with new formulas.
Change-Id: Ib4345369455b31d4edae8c933b7721e76414e914
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Bradley T. Hughes [Sat, 4 Feb 2012 12:43:37 +0000 (13:43 +0100)]
Use $CFG_ARCH even if src/corelib/arch/$CFG_ARCH does not exist
Recent commits in src/corelib/arch have removed empty directories,
which cause configure to assume that the architecture is not supported.
This assumption is wrong, due to changes in
src/corelib/thread/qbasicatomic.h to include the correct QAtomic*
implementation based on compiler pre-defined macros instead of the
architecture found by configure.
Change-Id: I026958fb9af8af62e295e68a4643c37ac9395dc6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Friedemann Kleint [Fri, 3 Feb 2012 14:29:13 +0000 (15:29 +0100)]
MinGW: Fix warnings.
- Special #define to access HB seems no longer necessary
(it was causing about mismatching DLL import attributes).
Change-Id: I57cc7d57b12a67c1d549b053db81e1f198f87786
Reviewed-by: Joerg Bornemann <joerg.bornemann@nokia.com>
Simon Hausmann [Fri, 3 Feb 2012 09:03:26 +0000 (10:03 +0100)]
Improve sysroot handling with regards to configure tests.
Some configure tests try to link programs, which when compiling against
a sysroot _does_ require the --sysroot= argument in order to find crt0.o.
This patch uses the existing pattern of using the export SYSROOT_FLAG
in the missing linking tests.
Change-Id: I063849c814f393d5f88de1b486ce9035b9f7bf65
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Kent Hansen [Thu, 2 Feb 2012 13:20:24 +0000 (14:20 +0100)]
Bring qmetaobjectbuilder in sync with moc
qmetaobjectbuilder should generate meta-objects of the same version
as moc; in the future, when the moc version is bumped, QMOB has to
be adapted at the same time.
QMOB was generating version 4 meta-objects. This patch makes it
generate version 6 (the current version). This also fixes a bug with
using qt_static_metacall with QMOB (setStaticMetacallFunction()); it
was already using the version 6 qt_static_metacall signature, which
isn't compatible with version 4.
Also add tests that ensure that the QMOB-generated meta-object works
with real objects; in particular we want to test the codepaths in Qt
that check for version >= 4.
Change-Id: I64a151ea5c947a6f8b7a00e85a39866446c735e9
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Kent Hansen [Fri, 3 Feb 2012 12:41:56 +0000 (13:41 +0100)]
Adapt QtDBus to QVariant property type change
Commit
00c8984b4e48b2a7eadfee6c3cd0cbb19f586118 changed other parts
of Qt to use QMetaType::QVariant, not 0xff, as the type for QVariant
properties. QtDBus should check for that type, and also use it for
QDBusVariant properties.
Change-Id: I21d81b59754ae44889766877a4c5066466b46d86
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Kent Hansen [Fri, 3 Feb 2012 08:24:56 +0000 (09:24 +0100)]
Bring QtDBus meta-object generator in sync with moc
QtDBus's meta-object generator should generate objects of the same
version as moc; in the future, when the moc version is bumped,
QtDBus's meta-object generator has to be adapted at the same time.
Since QMetaObjectPrivate and related flags reside in qmetaobject_p.h,
QtDBus can just include the header instead of duplicating code.
qmetaobject_p.h also defines the meta-object revision QtDBus should
be targeting.
QtDBus was generating version 3 meta-objects. This patch makes it
generate version 6 (the current version). Since a new field was
added to QMetaObjectPrivate in revision 4 (signalCount), the
generator had to be adapted. In particular, the signal definitions
need to come before other methods (as they do with moc), since
there are functions in QObject that rely on that (e.g.
computeOffsets()).
Change-Id: I37f102d8c1be372ef6cfaf013baa87f9abb0fd5e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Friedemann Kleint [Fri, 3 Feb 2012 12:30:03 +0000 (13:30 +0100)]
Fix compilation on MinGW.
- Add missing constant.
- Make FontKey a pair instead of a function-local type which
cannot be used as template parameter for gcc.
- Fix warnings about redefinition of NOMINMAX and enumeration.
Change-Id: Ie3eb6e5b8dd9cd81210d6e10270ada0158aaf809
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Andy Shaw [Thu, 19 Jan 2012 20:39:30 +0000 (21:39 +0100)]
Handle the 'real' datatype correctly in the SQLite driver
The 'real' datatype should be seen as a QVariant::Double type and not as
a QVariant::String type otherwise it does not get presented correctly
when using a non Qt application to access it.
Test is included for QSqlQuery.
Task-number: QTBUG-16373
Change-Id: Ie323ce49eb95e4d6bb4c3814ba9a957a63f4b259
Reviewed-by: Yunqiao Yin <charles.yin@nokia.com>
(cherry picked from commit
b23631015c23a49e3b4d296ea0a6266bfce3d4f1)
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Jędrzej Nowacki [Fri, 3 Feb 2012 12:46:24 +0000 (13:46 +0100)]
Fix a typo TypeDefiniton -> TypeDefinition.
If you repeat a typo often enough, it becomes the right spelling.
But 49 times is definitely not enough :-)
Change-Id: I7c0bb29e68e4bff5c67277f9874df8b3ab8b2b54
Reviewed-by: Kent Hansen <kent.hansen@nokia.com>
Bradley T. Hughes [Fri, 3 Feb 2012 12:38:26 +0000 (13:38 +0100)]
Include qatomic_cxx11.h for C++11 compilers
qatomic_cxx0x.h doesn't exist.
Change-Id: Iac654ecf09a1b890d25fa23625c8c43f2f7f1ecf
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Bradley T. Hughes [Fri, 3 Feb 2012 08:54:05 +0000 (09:54 +0100)]
Remove empty src/corelib/arch subdirectories
The bfin, integrity, s390, and sh4a directories included an empty
arch.pri, which is not necessary. Remove these directories and arch.pri
files.
Change-Id: I016dcef63e4b9fb4c14cc1fa7b9b91cba2080dbb
Reviewed-by: Giuseppe D'Angelo <dangelog@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Bradley T. Hughes [Fri, 3 Feb 2012 08:50:45 +0000 (09:50 +0100)]
Remove src/corelib/arch/nacl/* and qatomic_nacl.h
This implementation uses the GCC __sync_* intrinsics, which we do not
need to duplicate after commit
2bbd2262b3974fb4e39341a23e40ffdf1655ebe9
(which added qatomic_gcc.h).
Change-Id: I59b6e4a03e83f58f4145a5ab2bfd635fe9ab686f
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Bradley T. Hughes [Fri, 3 Feb 2012 08:47:29 +0000 (09:47 +0100)]
Remove src/corelib/arch/ia64/*
The out-of-line q_atomic_test_and_set_(int|ptr) functions are no longer
declared after commit
1955353149781a064bc053b86be6e221b159d4ee. They
appear to have never been used either. Remove them.
Change-Id: Ia8dfa1f585f2370091b4fd93aaf98cb10241bf31
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Bradley T. Hughes [Fri, 3 Feb 2012 08:37:48 +0000 (09:37 +0100)]
Remove src/corelib/arch/i386/* and src/corelib/arch/x86_64/*
We do not want to support out-of-line QAtomic* implementations. Remove
these from the i386 and x86_64 implementations.
Change-Id: Ib6a9614b7b11bf6bccc9054b177357afd83e33e6
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Bradley T. Hughes [Fri, 3 Feb 2012 08:33:28 +0000 (09:33 +0100)]
Remove src/corelib/arch/avr32/* and qatomic_avr32.h
This implementation uses the GCC __sync_* intrinsics, which we do not
need to duplicate after commit
2bbd2262b3974fb4e39341a23e40ffdf1655ebe9
(which added qatomic_gcc.h).
Change-Id: I2cab86deacad1c37f17f0c5836d9faf2ad366495
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Bradley T. Hughes [Fri, 3 Feb 2012 08:30:38 +0000 (09:30 +0100)]
Remove src/corelib/arch/mips/*
Commit
99fb1bea49c4de5cf3143af59f8c96a92980e58f removed the use of the
old, out-of-line q_atomic_* implementation. Remove these functions from
the library.
Change-Id: I0b239bf779e0545cb5558862e3a40f6e95fdcbd9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Bradley T. Hughes [Fri, 3 Feb 2012 08:17:33 +0000 (09:17 +0100)]
Remove src/corelib/arch/arm/*
After commit
dc5388e79b71d796c1207681235cf007c39810bd, which removed
support for non-EABI, qt_atomic_yield() and q_atomic_lock are no
longer used. Remove them.
Change-Id: I0f405ae63d7903c222fc2b829887207885be0a03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Bradley T. Hughes [Fri, 3 Feb 2012 08:22:53 +0000 (09:22 +0100)]
Remove #include "qatomic_macosx.h"
This file was removed in commit
68e5fd9ebc8a3f510e3144e981a0cb358945fb9c
Change-Id: I76671f79432204c28ffa7488871d0eef07cc8dca
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Giuseppe D'Angelo [Fri, 3 Feb 2012 01:46:26 +0000 (01:46 +0000)]
Fix QAbstractItemModel documentation
Commit
20abd88e711a2dfcbe07925f8902faa45e5110e2 refactored the
supportedDragActions methods, this oneliner adds the necessary \fn.
Change-Id: I373b039138e1cbfe0f28a0aa9eb3b65245f2132d
Reviewed-by: David Faure <david.faure@kdab.com>
Rafael Roquetto [Thu, 2 Feb 2012 15:06:05 +0000 (16:06 +0100)]
Add support for QNX iconv implementation
QNX implements the POSIX version of iconv (with non-const function
signatures). However, it is still necessary to link with libiconv, unlike most
cases. Also, its iconv_open does not know how to handle an empty string.
Change-Id: I8654703e46b9c64503aca5521ce7fae1c97d7968
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Pekka Vuorela [Wed, 1 Feb 2012 07:43:18 +0000 (09:43 +0200)]
Remove QInputContext
This has only been around as compatibility interface for Qt4
but is now replaced by QPlatformInputContext.
Change-Id: I677dbbea46311bf39f6c5ca9dc3fb5009abe924a
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Bradley T. Hughes [Thu, 2 Feb 2012 13:23:32 +0000 (14:23 +0100)]
Rename qatomic_windows.h to qatomic_msvc.h
The QT_ARCH_WINDOWS(CE) define(s) aren't used to control which
header to include anymore, so just remove it. We also do not need
the empty src/corelib/arch/windows/arch.pri.
Change-Id: I5400fc852af31907e533d0278540b8cd3da391cb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Bradley T. Hughes [Thu, 2 Feb 2012 13:38:28 +0000 (14:38 +0100)]
Update .gitignore to ignore qmake/qmake_pch.pch
This file is generated when building qmake on Windows
Change-Id: I554bb2d32cfeff6791d664a5ca7b3d605db38c77
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Tor Arne Vestbø [Thu, 26 Jan 2012 12:54:07 +0000 (13:54 +0100)]
Make Clang the default makespec on Mac OS 10.7 (Lion) if Clang >= 3.0
Change-Id: Ibeb1db0eca2fb6d843d85c3f48c5f23a81230745
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Zeno Albisser <zeno.albisser@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Reviewed-by: Marius Storm-Olsen <marius.storm-olsen@nokia.com>
Reviewed-by: Sergio Ahumada <sergio.ahumada@nokia.com>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@nokia.com>
Kurt Korbatits [Wed, 1 Feb 2012 03:33:08 +0000 (13:33 +1000)]
Fixed qsharedpointer unittest on windows
- Use source file location as working directory for externaltests
Change-Id: Ic05259f48eece920b348ccbde9ba80c90dedfdd2
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Bradley T. Hughes [Mon, 23 Jan 2012 07:59:27 +0000 (08:59 +0100)]
processEvents(WaitForMoreEvents) should return after delivering events
The Cocoa event dispatcher sends timer, socket, and posted events
correctly, but they are not NSEvents, and as such, they do not cause
[NSApp nextEventMatchingMask] to return. When calling processEvents()
with WaitForMoreEvents, but the EventLoopExec flag isn't set, we want to
interrupt the WaitForMoreEvents.
As a result, We should not call wakeUp() at the top of processEvents(),
otherwise we end up shortcutting other event sources. We also do not
need to call QCoreApplication::sendPostedEvents() directly either in
processEvents(), it's the postedEventsSource job to do that.
The interruptLater mechanism is always run when calling processEvents()
directly (not via exec()), which causes problems when testing
processEvents(). Don't use interruptLater unless the modal sessions
change (which is indicated by the cached session pointer being reset
to zero).
Change-Id: Iec2b49a4f306b2702c979522f12a28d0b5fbd0b4
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
Pierre Rossi [Wed, 1 Feb 2012 16:13:24 +0000 (17:13 +0100)]
Un-guard a QRawFont autotest.
Let's just run this test on all platforms.
Change-Id: Iffec0ddfa8a73fd9e1af1c5ea3b49c337fa8a026
Reviewed-by: Jiang Jiang <jiang.jiang@nokia.com>
Bradley T. Hughes [Thu, 2 Feb 2012 11:02:15 +0000 (12:02 +0100)]
Don't include config.tests/unix/openssl/openssl.pri (again)
This file was removed in commit
ba9302b8a9b6b50f37987261c1ade9af2ade2d3c.
Commit
8fad23f3261bdcf9bd0e11980ebfc3b00c2469c6 removed openssl.pri from
src/network/ssl/ssl.pri, but not from the qsslsocket autotest.
Change-Id: Ic1a576ee7f0ee3d68471121ba636b94ce7bae455
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Sergio Martins [Thu, 2 Feb 2012 17:00:13 +0000 (17:00 +0000)]
Reimplement QIdentityProxyModel::headerData().
The one in the base class is slower due to parent<->source
mappings.
Change-Id: Ib0b337ef5d4b5b8cd9f6e1d7c5c19a770b53e0e8
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Giuseppe D'Angelo [Thu, 2 Feb 2012 17:48:31 +0000 (17:48 +0000)]
Make QAbstractItemView::itemOptions properly initialize a V4 option
Since the QStyleOptionViewItem now contains the V4 fields, they
must be properly initialized when calling itemOptions.
Change-Id: I1346e6887d2d9a7eb29cc458fa4eede0b815001c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Giuseppe D'Angelo [Thu, 2 Feb 2012 17:40:27 +0000 (17:40 +0000)]
Fix the chart itemview example
Commit
054a4aa7dddacbe31778c5c5e9ffc9d41f803353 (being a SIC)
breaks QAbstractItemViews that used to override the
dataChanged(QModelIndex, QModelIndex) method, so this change
updates the dataChanged signature accordingly.
Change-Id: I632b6625c12dcb09abcb737ea2648efeeedeee8e
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Stephen Kelly [Thu, 2 Feb 2012 20:04:38 +0000 (21:04 +0100)]
Build with -pedantic
Change-Id: I42487099855d2adaecfad0a3147141f88aca1898
Reviewed-by: David Faure <faure@kde.org>
Stephen Kelly [Thu, 2 Feb 2012 16:15:25 +0000 (17:15 +0100)]
Add typedef for source compatibility.
Change-Id: I73fb90b87db50db40c8a712acb25e0f966bbd5d3
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Giuseppe D'Angelo [Mon, 30 Jan 2012 00:52:34 +0000 (00:52 +0000)]
Merge QStyleOption*V{2,3,4} classes together
In order to keep binary compatibility, Qt 4 introduced V{2,3,4}
classes for QStyleOption subclasses. They're simple, low level
containers for various members with public access (no accessors
required).
In Qt 5.0 we can break BC, so this patch moves the members
from the derived classes into the ``base'' ones.
The ``base'' ones get a version bump matching the highest
version available, and the V{2,3,4} classes become typedefs.
This change can cause problems in code that used QStyleOption
directly, especially QStyleOptionViewItem, because the old V4
fields get default initialization but the QStyle subclasses
detect that the option is a V4 option and expect all fields
to be properly initialized. The fix in such places is to
properly initialize all fields.
Task-number: QTBUG-23522
Change-Id: I2f782da09ca5cc8c4cbafc07448fb0d33153a251
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Gunnar Sletta [Thu, 19 Jan 2012 11:51:43 +0000 (12:51 +0100)]
Improve QSurface / QWindow API a bit and use that to avoid errors
Change-Id: Iadba1c3a7b8e6bc7f145455132cefed2a905c11d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Laszlo Agocs [Thu, 2 Feb 2012 15:29:15 +0000 (17:29 +0200)]
Update wrong docs for TouchPoint::id().
What it states is simply not true, at least certainly
not since QPA has been introduced.
Change-Id: If8aa2120cf5fc9ca85f4f0e6832b2115a5b71fe1
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Stephen Kelly [Thu, 2 Feb 2012 16:13:54 +0000 (17:13 +0100)]
Build with QT_NO_CAST_FROM_BYTEARRAY
Change-Id: Ibb79e372a3adf90c9f982f50ab711066063eff4a
Reviewed-by: David Faure <faure@kde.org>
Friedemann Kleint [Thu, 2 Feb 2012 13:40:02 +0000 (14:40 +0100)]
Windows QPA: Compile with QT_NO_CAST_FROM_ASCII, warnings.
Change-Id: I75d6a102a6a1fa0b5f8add049442f23d6fd57725
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Shane Kearns [Thu, 2 Feb 2012 15:51:26 +0000 (15:51 +0000)]
Fix unintended source compatiblity break in QSslSocket
QSslSocket overrides one version of QAbstractSocket::connectToHost.
Since these functions were made virtual, this now hides the other
overloads.
Added a using statement to make the other overloads visible.
Change-Id: Ia48fdc9bd67936c75c25bb24dabd26a723bb7a05
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Teemu Katajisto [Thu, 2 Feb 2012 10:29:54 +0000 (12:29 +0200)]
Various documentation fixes ported from Qt 4.8
Selected fixes for qtbase from 4.8 commit
3826203f744a2147bebf5f088de0d524156f59fd
Task-number: QTBUG-9466
Task-number: QTBUG-7924
Task-number: QTBUG-20355
Task-number: QTBUG-19367
Task-number: QTBUG-14554
Change-Id: I551251dd8a87d7dd837e5927050ffd14bce9a97c
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Casper van Donderen <casper.vandonderen@nokia.com>
Bradley T. Hughes [Thu, 2 Feb 2012 08:05:04 +0000 (09:05 +0100)]
Reimplement QAbstractSocket::setReadBufferSize() properly
This function takes a qint64 argument, not an int argument.
peerwireclient.h:119:10: warning: 'PeerWireClient::setReadBufferSize'
hides overloaded virtual function [-Woverloaded-virtual]
void setReadBufferSize(int size);
^
src/network/socket/qabstractsocket.h:162:18: note: hidden overloaded
virtual function 'QAbstractSocket::setReadBufferSize' declared here
virtual void setReadBufferSize(qint64 size);
^
Change-Id: I29b67b216147771ff2d662d309d2c31d977e9d3f
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Jonas Gastal <jgastal@profusion.mobi>
Morten Johan Sorvig [Mon, 30 Jan 2012 13:14:04 +0000 (14:14 +0100)]
Move QString <-> NSString conversion to QtCore
Add (private) API to QCFString:
static QString toQString(NSString *)
static NSString *toNSString(const QString &)
Add implementation to qcore_mac_objc.mm. Keep the
mac_cpp since it's used for building qmake as well
as bootstrapping.
Replace usage of NSString conversion functions
in the cocoa and corewlan plugin with QCFString.
Change-Id: I9f34edd5231255aef9d8d6e9a60306174bb279b3
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Xizhi Zhu [Wed, 1 Feb 2012 21:26:36 +0000 (22:26 +0100)]
Call start() even when bearer is not compiled.
Otherwise, the HTTP request won't be sent if bearer is not compiled.
Change-Id: I9a8171fde6fe5b2db0405b4af6e1d52ac4528502
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
Xizhi Zhu [Wed, 1 Feb 2012 19:04:31 +0000 (20:04 +0100)]
Remove one un-used variant.
Change-Id: I325451f2f346cc75f23703118b451b9c7398baea
Reviewed-by: Shane Kearns <ext-shane.2.kearns@nokia.com>
Morten Johan Sørvig [Thu, 2 Feb 2012 10:02:01 +0000 (11:02 +0100)]
Fix qmlscene segfault on startup on Mac OS 10.6.
Task-number: QTBUG-23982
The platform plugin loader was searching for plugins
in qtbase/bin and would segfault when checking if
the qmlscene binary was a plugin.
Test if "../Plugins" actually exists before setting
it as the platform plugin path.
Change-Id: Ibd887b5c5045d23e3eb62867dc7598e09d3918ad
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>
Reviewed-by: Sarah Jane Smith <sarah.j.smith@nokia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com>
jian liang [Wed, 1 Feb 2012 15:19:46 +0000 (23:19 +0800)]
speed up font enumeration in windows platform
Currently, font enumeration is very slow in windows platform, it will take
several seconds to enumerate all fonts for the first time. This patch
cache the font information queried from font registry, it can
significantly speed up font enumeration.
Change-Id: Ic783877b7f3db3facf24965b0c5d669b22d40c61
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Kent Hansen [Wed, 1 Feb 2012 20:08:30 +0000 (21:08 +0100)]
Fix QString::operator=(QLatin1String) for substrings
QLatin1String now has a constructor that takes explicit length, which
makes it possible to create a QLatin1String that isn't null-terminated.
Made QString::operator=(QLatin1String) work in that case.
Change-Id: Ie77eabd2f8f036531d67cd8051a7b6305b386ccf
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Kent Hansen [Wed, 1 Feb 2012 19:47:26 +0000 (20:47 +0100)]
Fix QTextStream and QDebug operator<< for QLatin1String
QLatin1String now has a constructor that takes explicit length, which
makes it possible to create a QLatin1String that isn't null-terminated.
Made the QTextStream and QDebug << operators work in that case.
Change-Id: I94d051ce2ebfb2d2a403b96d25e040c80a54bf7c
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Kent Hansen [Wed, 1 Feb 2012 19:15:24 +0000 (20:15 +0100)]
Fix QString(QLatin1String) constructor for substrings
QLatin1String now has a constructor that takes explicit length, which
makes it possible to create a QLatin1String that isn't null-terminated.
Made the QString(QLatin1String) constructor work in that case.
Change-Id: I4f4f07a956144b7ea4aa9c58a61c755fb99ef1b3
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Kent Hansen [Wed, 1 Feb 2012 16:37:02 +0000 (17:37 +0100)]
Fix operator==(QLatin1String, QLatin1String) and friends for substrings
QLatin1String now has a constructor that takes explicit length, which
makes it possible to create a QLatin1String that isn't null-terminated.
Made the QLatin1String comparison operators work in that case.
Change-Id: I234ba851e67a6f5cfbb46fb6f0b22623ce40be28
Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Bradley T. Hughes [Mon, 30 Jan 2012 14:04:06 +0000 (15:04 +0100)]
Port the Windows atomic implementation to use QGenericAtomicOps
First, we do not need to have the QT_INTERLOCKED_REMOVE_VOLATILE(a)
macro anymore either, since the value stored in QBasicAtomicInteger is
not volatile.
Windows provides Interlocked*Pointer() functions in some configurations,
so we provide a partial specialization of QAtomicOps for pointer types.
For integer types, QAtomicOps selects an implementation based on the
size of the type. At the moment, we only support 32-bit types, but it
will be possible to add 64-bit later.
Note that the 32-bit specialization of QAtomicOpsBySize declares the
Type typedef as long, not int, since the Windows Interlocked*() API
takes parameters as longs and long pointers. Since this typedef differs
from the type given to QBasicAtomicInteger<T> by the QBasicAtomicInt
typedef, we need to templatise the _q_value parameter separately from
the other arguments in QGenericAtomicOps.
This templatisation would be necessary to port other architectures, such
as PA_RISC, where we need to have an int[4] array in the atomic type
while the arguments do not need this array.
Change-Id: Id71fa1ae334da2023553cb402b45e6c285f1d344
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@nokia.com>
Reviewed-by: João Abecasis <joao.abecasis@nokia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Joerg Bornemann [Thu, 10 Nov 2011 11:43:51 +0000 (12:43 +0100)]
fix gdb_dwarf_index.prf for applications, take two
Handle the case of an empty DESTDIR.
(cherry picked from commit
122fa6b53c33364a4687919191e55899acb43797)
Change-Id: I0c2eec5736d0944b8ee97abdfa3f1121e7d8db4b
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Joerg Bornemann [Wed, 9 Nov 2011 17:59:46 +0000 (18:59 +0100)]
fix gdb_dwarf_index.prf for executables
Unlike for libraries, $(TARGET) already contains $(DESTDIR).
Changing to $(DESTDIR) does break the command in that case.
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
(cherry picked from commit
7eb770aed35fee50ff98c12e390dcb02c72b5132)
Change-Id: Idd0f30d52db432062917a1c956c3af73e6c8a6a4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Pekka Vuorela [Tue, 24 Jan 2012 15:44:38 +0000 (17:44 +0200)]
Renamed QInputPanel as QInputMethod
QInputMethod better describes what the class is about, input methods
in general, be they panels or just composing input from key events.
Compatability headers added for old name. Not bulletproof but should be
enough to get transition done.
Change-Id: Iefde6e7ccb1ec4a3b226cef3469089e751c60fc1
Reviewed-by: Joona Petrell <joona.t.petrell@nokia.com>
Bradley T. Hughes [Wed, 1 Feb 2012 13:02:02 +0000 (14:02 +0100)]
Remove duplicated function from QCocoaEventDispatcher
The qt_mac_waitForMoreModalSessionEvents() is identical to
qt_mac_waitForMoreEvents(), except that it passes a different inMode
parameter to [NSApp nextEventMatchingMask]. Change the latter function
to take the mode as a parameter itself, defaulting to the default mode.
Change the dequeue parameter to [NSApp nextEventMatchingMask] from YES
to NO. Having the function dequeue the event, and then immediately
reposting the event is not necessary.
Change-Id: Iba45d41ad3ff4d5721d1068e6d5c78585cb15810
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@nokia.com>
Bradley T. Hughes [Thu, 2 Feb 2012 08:07:27 +0000 (09:07 +0100)]
Don't include config.tests/unix/openssl/openssl.pri
This file was removed in commit
ba9302b8a9b6b50f37987261c1ade9af2ade2d3c
Change-Id: Ib3a70877f6f6848c8cf072faf13da93abbe186f2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Jian Liang [Wed, 1 Feb 2012 06:24:00 +0000 (14:24 +0800)]
fix memory leak of QAccessibleWidget
in topLevelObjects() we should use "root->object()" instead of
"w->accessibleRoot()->object() to get the object attached to the
accessible interface. This is because "w->accessibleRoot()"
will create a new QAccessibleWidget(or its subclass) object
and this object is never released.
Change-Id: I34292b467b51d6cc439f0a1a45cd74d5f8a6a5a8
Reviewed-by: Jan-Arve Sæther <jan-arve.saether@nokia.com>
Sergio Ahumada [Wed, 1 Feb 2012 15:27:17 +0000 (16:27 +0100)]
tests: do not run benchmarks by default in 'make check'
`make check' is intended primarily for running functional tests.
For the most part, it does not make sense to run benchmarks in the same
test environment as the functional tests.
Change-Id: I79f867fdab295bdbd4c4b3c785dfd7ede520022e
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Kent Hansen [Wed, 1 Feb 2012 20:43:22 +0000 (21:43 +0100)]
Avoid duplicating flags/types in qmetaobjectbuilder
Presumably the contents from qmetaobject_p.h were copied
because qmetaobjectbuilder originally lived outside of qtbase,
and private headers could not be included from other modules.
But now we can just include the right headers.
Change-Id: I975df1ea94455f1bf0db1d8024de8f5379fc9fc7
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Lorn Potter <lorn.potter@nokia.com>
Kurt Korbatits [Wed, 1 Feb 2012 02:03:59 +0000 (12:03 +1000)]
Fixed selftests unittest on windows
- Needed to add toLower() for compare as c:\ and C:\ was causing
a failure.
Change-Id: Idd55774d118b7249e88362688166b4f9d9712c7c
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Kurt Korbatits [Wed, 1 Feb 2012 00:08:33 +0000 (10:08 +1000)]
Fixed qfile unittest on windows
- Changed to set working directory based on subprogram
stdinprocess's directory location.
- Changed QProcess execution of subprograms to use
relative paths.
Change-Id: Idbccca635f0f61adba9721bcceeceb0a8a961dcf
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Jason McDonald [Wed, 1 Feb 2012 04:53:33 +0000 (14:53 +1000)]
Add selftest for xpass in a data-driven test.
Change-Id: I9491d1e17ad31453ec353a11c9efb31522a16459
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Jason McDonald [Wed, 1 Feb 2012 04:33:42 +0000 (14:33 +1000)]
Improve readability of expectfail selftest.
Rename some of the test functions to improve consistency, and change the
order so that all the xfail tests are together (some new xpass tests
will be added later).
Change-Id: Ice1ac5bf61bc26109bb0d08f72eb74e1a0424101
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Jason McDonald [Tue, 31 Jan 2012 04:07:58 +0000 (14:07 +1000)]
Add testlib selftest for counting of test results.
The test simply generates each possible pair of Pass, Fail and Skip
results. At present the test simply serves to demonstrate the current
shortcomings of testlib's plain text logging, namely:
* If a test function passes for all data rows, that is counted as one
pass, but each skipped or failed row counts as one skip or fail.
* Only skipped and failed rows are reported individually in the test
output. Passed rows are not reported, so it is impossible to see how
many rows were executed.
* A skip followed by a pass will be reported as an overall pass for the
test function, but the same rows in reverse order will not report any
overall result for the test function.
Future commits will attempt to correct these problems.
Task-number: QTBUG-22124
Change-Id: If8c7ea15fc43ba9a1bccd0e881c1efc18e705b25
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Kurt Korbatits [Fri, 27 Jan 2012 04:47:54 +0000 (14:47 +1000)]
Changed qtextbrowser unittest to work from install directory
- Changed qtextbrowser unittest to use TESTDATA and QFINDTESTDATA
Change-Id: I0ac7c990640d492d5ec94f5824c022a2b5075103
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Kurt Korbatits [Fri, 27 Jan 2012 03:29:07 +0000 (13:29 +1000)]
Changed qlabel unittest to work from install directory
- Changed qlabel unittest to use TESTDATA and QFINDTESTDATA
Change-Id: Ide6755cd79caf91b553fb6b1412da6fbab583720
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Kurt Korbatits [Tue, 24 Jan 2012 21:10:47 +0000 (07:10 +1000)]
qopenglcontext not checking for null and failing with platform minimal
- The minimal platform plugin returns null and was causing segfault.
Change-Id: Ied262692f77e9801c3d3451de7f21539f7686ca4
Reviewed-by: Kurt Korbatits <kurt.korbatits@nokia.com>
Reviewed-by: Jason McDonald <jason.mcdonald@nokia.com>
Reviewed-by: Rohan McGovern <rohan.mcgovern@nokia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Holger Hans Peter Freyther [Mon, 23 Jan 2012 13:02:48 +0000 (14:02 +0100)]
pixmap: Add QPlatformPixmap::fromData null check for the image
QPlatformPixmap::fromFile is doing the null check,
QRasterPlatformPixmap::fromData is doing the null check as
well. Add the null check to QPlatformPixmap::fromData as
well. This would have avoided a crash in the directfb plugin.
Change-Id: Ifc904b2df2424e86bf0992d4e28dc256530be02d
Reviewed-by: Samuel Rødal <samuel.rodal@nokia.com>
Lars Knoll [Wed, 1 Feb 2012 16:04:19 +0000 (17:04 +0100)]
Fix some warnings from clang
One of them was a real error, that could
lead to Data::alloc containing wrong values.
Change-Id: I48315ef6fd59188630107ebbe7bf8dbaa5da689e
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Bradley T. Hughes <bradley.hughes@nokia.com>