Commit Graph

171 Commits

Author SHA1 Message Date
Ulf Hermann
5ab74ffca1 Namespace copy of QFileSystemIterator in QDirIterator benchmark
Otherwise you cannot link it statically against QtCore.

Change-Id: I4ac35602cea2192974f3e96ecad35edac976ce27
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2015-06-12 13:52:55 +00:00
Simon Hausmann
198606f6db Merge remote-tracking branch 'origin/5.5' into dev
Conflicts:
	src/plugins/platforms/xcb/qxcbnativeinterface.cpp
	src/plugins/platforms/xcb/qxcbnativeinterface.h

Change-Id: I31b38ba439b9341d51a01c0fd54bea33f7410076
2015-03-16 10:31:07 +01:00
Rafael Roquetto
00c09aaf5b Fix build of tests on QNX.
Change-Id: Ib28e42e3eb10e26555fe392c55534f715bee5f8b
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
2015-03-14 07:05:34 +00:00
Alex Trotsenko
9dd0bb851b Make QRingBuffer a 64-bit safe
According to I/O API, QIODevice and its inherited classes should be
able to process a full 64-bit offsets and lengths. This requires
64-bit parameters in operations with internal buffers. Rework
QRingBuffer to avoid implicit truncation of numbers and fix some
64-bit issues in code.

Change-Id: Iadd6fd5fefd2d64e6c084e2feebb4dc2d6df66de
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2015-03-12 05:33:20 +00:00
Jani Heikkinen
83a5694dc2 Update copyright headers
Qt copyrights are now in The Qt Company, so we could update the source
code headers accordingly. In the same go we should also fix the links to
point to qt.io.

Outdated header.LGPL removed (use header.LGPL21 instead)

Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing
combination. New header.LGPL-COMM taken in the use file which were
using old header.LGPL3 (src/plugins/platforms/android/extract.cpp)

Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license
combination

Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe
Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
2015-02-11 06:49:51 +00:00
Robin Burchell
442eee3cda QStack: Add a simple benchmark.
This covers the only real additions over QVector: push and pop. Really, there
isn't too much specific to benchmark here, but we're interested in one specific
case: that of pushing and popping a single item repeatedly.

With the current QVector behavior, this causes constant deallocation, which
makes it morbidly slow. This behavior will be reviewed in a subsequent commit.

Results (not that anyone really cares) for me:
    PASS   : tst_QStack::qstack_push()
    RESULT : tst_QStack::qstack_push():
         1.9 msecs per iteration (total: 61, iterations: 32)
    PASS   : tst_QStack::qstack_pop()
    RESULT : tst_QStack::qstack_pop():
         8.2 msecs per iteration (total: 66, iterations: 8)
    PASS   : tst_QStack::qstack_pushpopone()
    RESULT : tst_QStack::qstack_pushpopone():
         80 msecs per iteration (total: 80, iterations: 1)

Change-Id: I3530888abbfcfcef39318d6be6d5b07306a4704e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-12-30 19:25:58 +01:00
Kent Hansen
0678d7c43c Add QMetaType::type(QByteArray) function
QMetaType::type(const char *) requires that the string argument is
0-terminated. This new overload makes it possible to query the type
of a string with an explicit length.

In particular, QByteArrays constructed by QByteArray::fromRawData(),
for example from a substring of a normalized method signature (the
"int" part of "mySlot(int"), can now be queried without making a copy
of the string.

Also, Qt5 meta-objects represent type names as QByteArray literals,
which can be fed directly to this new QMetaType::type() overload (no
need to call strlen).

Change-Id: I60d35aa6bdc0f77e0997f98b0e30e12fd3d5e100
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-10-31 12:17:57 +01:00
Marc Mutz
03e794b7a6 Add benchmark for QString::section()
Change-Id: I7ca4ceb8cfa7a3df384400a1b3ebc9be2502e396
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2014-10-04 13:57:55 +02:00
Oswald Buddenhagen
189dc655bb Merge remote-tracking branch 'origin/5.4' into dev
Conflicts:
	src/corelib/tools/qbytearray.cpp
	src/gui/image/qimage.cpp
	src/gui/image/qppmhandler.cpp
	src/gui/kernel/qguiapplication.cpp
	src/gui/painting/qpaintengine_raster.cpp

Change-Id: I7c1a8e7ebdfd7f7ae767fdb932823498a7660765
2014-09-29 14:08:49 +02:00
Matti Paaso
974c210835 Update license headers and add new license files
- Renamed LICENSE.LGPL to LICENSE.LGPLv21
- Added LICENSE.LGPLv3
- Removed LICENSE.GPL

Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2
Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
2014-09-24 12:26:19 +02:00
David Faure
31c6d9f04b QTextStream: add fast path for writing char and QChar.
Avoids allocating a QString for every char being written out.
The benchmark went from 5.5 ms per iteration to 0.8 ms,
and from 40 million instructions to 6 million.

Found using Milian Wolff's heaptrack tool.

Change-Id: I1784c47b944454bc947a607a22c39d249372ed55
Reviewed-by: Adam Majer <adamm@zombino.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-09-12 02:07:36 +02:00
Thiago Macieira
c250a0ec3a Unify and optimize QByteArray::to{Upper,Lower}
Do a check first if we need to transform before doing the transform.
This means we won't detach when transforming data that is already
correct.

And instead of using QChar, use our own hand-rolled table. In a proper
LTO build, the QChar calls would be resolved to a lookup of the Unicode
data, but not many people do LTO builds, Therefore, this means a great
speed-up is achieved by simply avoiding the function call. The extra
gain in performance comes from the simpler translation table instead of
the more complex full-Unicode data.

Also as a consequence, this changes the handling of two characters in
Latin 1: 'ß' should be uppercased to "SS" but we won't do it, and 'ÿ'
can't be uppercased in Latin 1 ('Ÿ' is outside the range).

Benchmarking is included. Comparing the Qt 5.4 algorithm to the new code
is almost 20x faster. Other alternatives are included in the benchmark
and are all faster than the current code, though slower than the new
one. While all of them could compress the tables to be smaller or shared
between uppercasing and lowercasing, they would also expand to more code
(though probably less than the extra bytes required in the full
translation table). In the trade-off, I decided to go with simplicity
and most efficient code.

Change-Id: I002d98318d236de0d27ffbea39d662cbed359985
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-08-19 03:39:05 +02:00
Thiago Macieira
db851ed5d1 Trim the QString benchmark test
The comparison, Latin 1 and UTF-8 benchmarks contained in this file are
stale. The implementation changed in Qt 5.3 and this benchmark couldn't
be updated (test data too large for Qt).

Please contact Thiago Macieira to obtain the benchmarks and test data.

Change-Id: I48c19b1f1711eb73c953a30ed4da510e97a62472
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-08-09 15:36:36 +02:00
Frederik Gladhorn
1e2af80785 Fix int conversion to string
clang warning: adding 'int' to a string does not append to the string

Change-Id: I6dc393269a52e9482fde106c17132336cf5ce226
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-08-08 10:45:53 +02:00
Jędrzej Nowacki
21a58910b2 Remove useless QMetaType benchmarks
Cost of a type lookup for core built-in types is really small, just few
cpu instructions, but the benchmark was testing create() and destroy()
functions (in a different fashion) which by definition allocate and
de-allocate memory. These memory operations are significantly more
expensive which obfuscate the results.

Change-Id: I33c679f57e6c2b57e98328f076dfe249ab7bcde8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-07-28 08:39:29 +02:00
Alex Trotsenko
324351f6c9 Integrate tst_bench_qringbuffer into the build tree.
Change-Id: Id1d091889c3ba5e343d1237f016fdc22f7dfe413
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-25 17:50:30 +02:00
Thiago Macieira
1602a091c6 Fix compilation on ARM without ARMv6T2
The "rbit" instruction requires ARMv6T2 or higher. This was found in the
CI when building the imx6 target:

Compiler: arm-poky-linux-gnueabi-g++
Flags: -mfloat-abi=hard -mfpu=neon
Errors from the assembler:
  {standard input}:3078: Error: selected processor does not support ARM mode `rbit r3,r3'
  {standard input}:7341: Error: selected processor does not support ARM mode `rbit ip,ip'

That compiler defaults to ARMv5T. That's obviously wrong for an i.MX 6,
which is a Cortex-A9 (ARMv7), but the correction applies for older
processors.

Change-Id: I56c276fa411977dd7cd867d62adf021e4909302c
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-07-25 17:48:14 +02:00
Alex Trotsenko
df4f334ad0 Rewrite QRingBuffer
QRingBuffer is a fully inlined class used in many I/O classes.
So, it must be as fast and small as possible. To this end, a lot of
unnecessary special cases were replaced by generic structures.

Change-Id: Ic189ced3b200924da158ce511d69d324337d01b6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-24 17:31:20 +02:00
Friedemann Kleint
eb66916082 Fix some compiler warnings in benchmark tests.
main.cpp(332) : warning C4307: '*' : integral constant overflow
tst_qpainter.cpp(1293) : warning C4305: '+=' : truncation from 'double' to 'float'
tst_qpainter.cpp(1474) : warning C4305: '+=' : truncation from 'double' to 'float'
tst_qtbench.cpp(155) : warning C4267: 'initializing' : conversion from 'size_t' to 'int', possible loss of data
main.cpp(68) : warning C4189: 'fontHeight' : local variable is initialized but not referenced

Change-Id: If6aadd50df7c5cf7d0f33791c9247730a47ddd27
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-07-14 10:55:55 +02:00
Rainer Keller
5835407df1 Check for boost header in sysroot
The check has to detect if boost header is present in the system we are
building for.

Change-Id: I700a11df208c8852ba094d8bff387ad21fa309b2
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-07-10 08:10:52 +02:00
Thiago Macieira
7b7c37ab94 Add a benchmark test for QCryptographicHash
Some quick benchmarks against GNU coreutils 8.21 and OpenSSL 1.0.1e
(time in µs; time for coreutils and OpenSSL include the loading of the
executable):

             Qt                 Coreutils                OpenSSL
n    SHA-1 SHA-224 SHA-512  SHA-1 SHA-224 SHA-512  SHA-1 SHA-224 SHA-512
0      0      0       0      717    716     700     2532   2553    2522
64k   120    484     381     927   1074     966     2618   2782    2694
Diff  120    484     381     210    358     266       86    229     172

The numbers for Qt are pretty stable and vary very little; the numbers
for the other two vary quite a bit, since they involve launching and
executing separate processes. We can take the lesson that we're in the
same ballpark for SHA-1 and we should investigate whether our SHA2
implementation is sufficiently optimized.

Change-Id: Ib081d002ed57c4f43741eca45ff5cd13b97b6276
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-04-04 01:29:37 +02:00
Thiago Macieira
ea8e48a679 Update the qHash function for strings to use the CRC32 instruction
According to my profiling of Qt Creator, qHash and the SHA-1 calculation
are the hottest spots remaining in QtCore. The current qHash function is
not really vectorizable. We could come up with a different algorithm
that is more SIMD-friendly, but since we have the CRC32 instruction that
can read 32- and 64-bit entities, we're set.

This commit also updates the benchmark for QHash and benchmarks both
the hashing function itself and the QHash class. The updated
benchmarks for the CRC32 on my machine shows that the hashing function
is *always* improved, but the hashing isn't always. In particular, the
current algorithm is better for the "numbers" case, for which the data
sample differs in very few bits. The new code is 33% slower for that
particular case.

On average, the improvement (including the "numbers" case) is:

 compared to          qHash only          QHash
Qt 5.0 function          2.54x            1.06x
Qt 4.x function          4.34x            1.34x
Java function            2.71x            1.11x

Test machine: Sandybridge Core i7-2620M @ 2.66 GHz with turbo disabled
for the benchmarks

Change-Id: Ia80b98c0e20d785816f7a7f6ddf40b4b302c7297
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-01-23 01:06:34 +01:00
Frederik Gladhorn
4a8273a6fc Merge remote-tracking branch 'origin/stable' into dev
For the conflicts in msvc_nmake.cpp the ifdefs are extended since we
need to support windows phone in the target branch while it is not there
in the current stable branch (as of Qt 5.2).

Conflicts:
	configure
	qmake/generators/win32/msvc_nmake.cpp
	src/3rdparty/angle/src/libEGL/Surface.cpp
	src/angle/src/common/common.pri
	src/corelib/global/qglobal.h
	src/corelib/io/qstandardpaths.cpp
	src/plugins/platforms/qnx/qqnxintegration.cpp
	src/plugins/platforms/qnx/qqnxscreeneventhandler.h
	src/plugins/platforms/xcb/qglxintegration.h
	src/widgets/kernel/win.pri
	tests/auto/corelib/thread/qreadwritelock/tst_qreadwritelock.cpp
	tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
	tests/auto/gui/text/qtextdocument/tst_qtextdocument.cpp
	tools/configure/configureapp.cpp

Change-Id: I00b579eefebaf61d26ab9b00046d2b5bd5958812
2013-11-26 22:35:48 +01:00
Andrew Knight
1c2be58fec Fix test compilation on WinRT
Tweak a handful of tests which didn't compile on this platform.

Change-Id: I208d9eb289dfb226746c6d0163c3ea752485033b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2013-11-26 20:29:09 +01:00
Olivier Goffart
3d2691ae77 Benchmark for QWaitCondition
Change-Id: I89fc0819324c12030bc23ba080b21f3d8d5c9852
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-11-15 15:42:35 +01:00
Frederik Gladhorn
840f6a40e6 Merge remote-tracking branch 'origin/stable' into dev
Change-Id: Ie56539b2e0be611a363b5f15ae5412a78d6945a2
2013-10-24 12:48:42 +02:00
Kurt Pattyn
add2bf739a Allow non-character codes in utf8 strings
Changed the processing of non-character code handling in the UTF8 codec.
Non-character codes are now accepted in QStrings, QUrls and QJson strings.
Unit tests were adapted accordingly.
For more info about non-character codes,
see: http://www.unicode.org/versions/corrigendum9.html

[ChangeLog][QtCore][QUtf8]
UTF-8 now accepts non-character unicode points; these are not replaced
by the replacement character anymore

[ChangeLog][QtCore][QUrl]
QUrl now fully accepts non-character unicode points; they are encoded as
percent characters; they can also be pretty decoded

[ChangeLog][QtCore][QJson]
The Writer and the Parser now fully accept non-character unicode points.

Change-Id: I77cf4f0e6210741eac8082912a0b6118eced4f77
Task-number: QTBUG-33229
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-10-17 09:50:58 +02:00
Andrew Knight
c6af0a504f WinRT: Fix various test compilations
- Remove irrelevant test subdirs via .pro files
- Follow WinCE codepaths where applicable
- Replace unsupported Win32 APIs with WinRT equivalents

This does not aim to fix any failures in the tests themselves; it only
makes them compile.

Change-Id: Ia82bc0cc402891f8f6238d4c261ee9152b51be80
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-10-02 12:36:05 +02:00
John Layt
4f563cf093 QDateTime - Remove some benchmark tests
Remove benchmark tests that are no longer required as they are simple
overloads of other methods.

Change-Id: I610211543d17c077f482fa2145ac3da7d0767282
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-23 01:14:10 +02:00
John Layt
55f5b29d79 QDateTime - Add QTimeZone support
Add support to QDateTime for time zones using the new QTimeZone class.

[ChangeLog][QtCore][QDateTime] Add support for a new Qt::TimeZone
spec to be used with QTimeZone to define times in a specific
time zone.

Change-Id: I21bfa52a8ba8989b55bb74e025d1f2b2b623b2a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-23 01:14:03 +02:00
John Layt
662f23ff5b QDateTime - Add Benchmark Tests
Add benchmark tests for QDateTime.

Change-Id: I839f8bc81e6cae56d93539c7c3f999d9eec10ad7
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
2013-09-20 23:45:06 +02:00
hjk
63a382a930 Add a static QFileInfo::exists(fileName) function
This avoids dynamic construction of the private class. According to
the benchmark we go from 4,550 to 3,900 instruction reads per iteration.
(without change 32629676 the baseline is 5,600)

Change-Id: I5df925e30dbd49bdde87173e481820574ce5abe1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-09-13 19:37:51 +02:00
David Faure
028def2ada Add benchmark for QThreadPool.
The current question is whether activeThreadCount() should be lock-free
(using atomic ints) or mutex-protected, so this tests start()
and activeThreadCount() directly.

Change-Id: Ica4a2ad023c2002e3c7d81558e6b9ee64af7f690
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2013-08-21 23:50:23 +02:00
Sergio Ahumada
3ef6cf060e Merge branch 'stable' into dev
Conflicts:
	qmake/generators/mac/pbuilder_pbx.cpp
	src/corelib/json/qjsonwriter.cpp
	src/corelib/kernel/qeventdispatcher_blackberry.cpp
	src/plugins/platforms/cocoa/qcocoacolordialoghelper.mm

Change-Id: I24df576c4cbd18fa51b03122f71e32bb83b9028f
2013-07-11 16:42:01 +02:00
Robin Burchell
4fc230ab15 benchmarks: Re-enable QFileInfo build by removing canonicalFileNamePerformance.
QFSFileEnginePrivate::canonicalized has been gone for a very, very long time now
(since d3b152ba1e3cd38dd675c801474105d518bacb44 in Qt 4).

This also fixes a build failure in the code on Windows.

Change-Id: I81f5e0c1d644b1b4d75644626eb394a663535387
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-07-04 17:00:17 +02:00
Bernd Weimer
70be62e95b QNX: fixed compilation of auto test
Compilation failed because "open" is defined as "open64" in fcntl.h.
This definition is reverted now.

Change-Id: I9badcf11131320c53e442cd5b8b21bb5aa4efee5
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2013-06-06 13:48:06 +02:00
Mitch Curtis
4f2c96eaa8 Iterate over the smaller set in QSet::intersect().
When calling intersect() on a large (1000000 items) QSet, with a small
(1000 items) QSet as the argument, the function takes signifcantly
longer than when the operand and the argument are reversed. This is
because the operand set is always iterated over in its entirety.

This patch changes intersect() to iterate over the smaller set. This
reduces the large operand scenario's benchmark to ~0.000063
milliseconds, compared to the current ~134 milliseconds:

1000000.intersect(1000) = empty: 0.000063 (was 134)
1000.intersect(1000000) = empty: 0.000039 (was 0.000036)
1000000.intersect(1000) = 500: 0.10 vs (was 130)
1000.intersect(1000000) = 500: 0.023 vs (was 0.093)
1000000.intersect(1000) = 1000: 0.20 vs (was 139)
1000.intersect(1000000) = 1000: 0.017 vs (was 0.016)

Task-number: QTBUG-22026

Change-Id: I54b25c49c78c458fef355e9c6222da8a64c7681f
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-06-05 09:35:42 +02:00
Jędrzej Nowacki
14d222cc9d Fix QMetaType benchmark.
Void is not constructible, so there is no point in checking how fast
it can be constructed.

Change-Id: Icb4b607bebce30fff5fc57b105101f019e0e0db5
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2013-05-13 13:29:48 +02:00
hjk
01cbd7e4b5 Remove QLocalePrivate::m_localeID
It was only used for toUpper/toLower but always computed in the
constructor, including QString::toLatin1 conversion and allocations.

This needlessly slows down all other uses, including supposedly "cheap"
operations QString::toDouble, or accesses inside QResourceFileEngine.

The benchmarks indicates that doing it always when needed is bearable.
There's still a lot of improvement potential on these code paths.

Change-Id: I88b637ee11f9f7ea614f8da4ec5df0bf40664fce
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2013-04-23 18:57:45 +02:00
Janne Anttila
52afd781ad Fix qprocess benchmark test build for WEC7.
Use Q_OS_WINCE ifdef in both method declaration and definition,
in addition combine QT_NO_PROCESS and Q_OS_WINCE ifdefs to one line.

Change-Id: I0787e4341c41b46a5fc089f24a538c0ad40a0875
Reviewed-by: Björn Breitmeyer <bjoern.breitmeyer@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Andreas Holzammer <andreas.holzammer@kdab.com>
2013-04-17 19:49:08 +02:00
Axel Waggershauser
b11317a643 Whitespace cleanup: remove trailing whitespace
Remove all trailing whitespace from the following list of files:
*.cpp *.h *.conf *.qdoc *.pro *.pri *.mm *.rc *.pl *.qps *.xpm *.txt *README
excluding 3rdparty, test-data and auto generated code.

Note A): the only non 3rdparty c++-files that still
have trailing whitespace after this change are:
* src/corelib/codecs/cp949codetbl_p.h
* src/corelib/codecs/qjpunicode.cpp
* src/corelib/codecs/qbig5codec.cpp
* src/corelib/xml/qxmlstream_p.h
* src/tools/qdoc/qmlparser/qqmljsgrammar.cpp
* src/tools/uic/ui4.cpp
* tests/auto/other/qtokenautomaton/tokenizers/*
* tests/benchmarks/corelib/tools/qstring/data.cpp
* util/lexgen/tokenizer.cpp

Note B): in about 30 files some overlapping 'leading tab' and
'TAB character in non-leading whitespace' issues have been fixed
to make the sanity bot happy. Plus some general ws-fixes here
and there as asked for during review.

Change-Id: Ia713113c34d82442d6ce4d93d8b1cf545075d11d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-03-16 20:22:50 +01:00
Thorbjørn Martsum
3222db0937 QVector - removeLast optimize
In case somebody uses QVector as a stack, it is not fair to have
takeLast, removeLast and pop_back to do way too much work.

This is still very slow compared to std::vector::pop_back
(mostly due implicit sharing), however it is more than a
factor faster than before.

Change-Id: I636872675e80c8ca0c8ebc94b04f587a2dcd6d8d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2013-03-07 08:37:26 +01:00
Thorbjørn Lund Martsum
ca6a4258d0 QMap - add insert overload that provide a hint
This adds a fast insert on QMap when providing a correct hint.

Change-Id: I256bba342932c1d4f24c6e65074e1bf47b519537
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-03-06 18:56:17 +01:00
Sergio Ahumada
07e3bcdc10 Remove QT_{BEGIN,END}_HEADER macro usage
The macro was made empty in ba3dc5f3b5
and is no longer necessary or used.

Discussed-on: http://lists.qt-project.org/pipermail/development/2013-January/009284.html
Change-Id: Id2bb2e2cabde059305d4af5f12593344ba30f001
Reviewed-by: Laszlo Papp <lpapp@kde.org>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-01-29 01:06:04 +01:00
Sergio Ahumada
48e0c4df23 Update copyright year in Digia's license headers
Change-Id: Ic804938fc352291d011800d21e549c10acac66fb
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2013-01-18 09:07:35 +01:00
Stephen Kelly
ee7dbf97bb Benchmarks: Remove declaration of built-in and automatic metatypes.
These types are either built-in or 'automatically declared' and so
don't need to be explicitly declared as metatypes.

Change-Id: Iba4b7f8ff7a1c7974d144b955cbf064e43b36ec7
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2013-01-03 18:19:28 +01:00
Oswald Buddenhagen
586adeabe4 add and use qtHaveModule() function
this is much more elegant than the so far propagated !isEmpty(QT.foo.name).
also replace feature-specific tests (no-gui and no-widgets) and the
obsolete contains(QT_CONFIG, foo) syntax.

Change-Id: Ia4b3c8febcabf9eeca67b1f9173a523820b1038b
Reviewed-by: Sergio Ahumada <sergio.ahumada@digia.com>
Reviewed-by: Tasuku Suzuki <stasuku@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2012-12-21 19:05:02 +01:00
Thiago Macieira
f2dbf6a819 Disable the JSC portion of the test unless we have a system PCRE
CONFIG += pcre is enabled if we're using the Qt PCRE, which isn't
compiled for 8-bit. If it isn't set, then we have a system PCRE.

Change-Id: I29d043b9d3f4d3223dcbb41eadc9f859e710eb88
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2012-12-20 03:32:48 +01:00
Oswald Buddenhagen
599a58170d remove obsolete DEPENDPATH assignments
qmake now add CONFIG+=depend_includepath by default, making manual
DEPENDPATH setup unnecessary.

Change-Id: Ie57cf05c369e21b5b9e099b6ce9be4f75da1508f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-17 14:08:17 +01:00
Oswald Buddenhagen
e0d72efbe7 remove bizarre jsc source reference
it compiles just fine without it.
if this was meant to inject a newer version of JSC than what is in
QtScript, it can be redone without creating a bizarre hybrid.

Change-Id: I61fe60bfa6a9bdb6423e8a7135250e332a5835ec
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-12-11 13:37:57 +01:00