Commit c5db8fc74 changed all instances of Q_WS_FOO to have the prefix
Q_DEAD_CODE_FROM_QT4 instead, to make it clearer when reading the code
that the code in question was a left-over from Qt4, when we used
Q_WS_ defines instead of Q_OS_ defines.
This worked well for cases of #ifdef Q_DEAD_CODE_FROM_QT4, but less so
for cases of #ifndef Q_DEAD_CODE_FROM_QT4, where the code was actually
unconditionally included.
To make this even clearer, the defines have been replaced by checks for
1 or 0, with a comment describing how the code used to look in Qt4. The
use of constants in the check also makes it easier for editors to parse
the condition and show visually that the code is defined out.
Change-Id: I152070d87334df7259b417cd5e17d7b7950379b7
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Adds missing image-formats so it doesn't segfault.
Also changes the exclusion of rare formats to lists of included ones
Change-Id: I1d00562cf8e96baa03121a0b996764224911e06a
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Move the different parts of configure.json/.pri into the libraries where
they belong.
Gui is not yet fully modularized, and contains many things related to
the different QPA plugins.
Done-with: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Change-Id: I6659bb29354ed1f36b95b8c69e7fce58f642053f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Use the new qtConfig macro in all pro/pri files.
This required adding some feature entries, and adding
{private,public}Feature to every referenced already existing entry.
Change-Id: I164214dad1154df6ad84e86d99ed14994ef97cf4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
this migrates the cases where the build system already made (some) use
of variables (possibly) set by configure.
Change-Id: I43a08caed481d5f887a3a40821e71a4797760e7e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Before: HexRgb: 0.00230 ms per iteration, HexArgb: 0.00290 ms per iteration
After: HexRgb: 0.00051 ms per iteration, HexArgb: 0.00061 ms per iteration
This showed up as a relevant optimization when profiling KIconLoader
which uses QColor::name() as part of the key -- thanks to Mark Gaiser for
the investigation and first suggestion of a solution. I have also seen
customer code writing a replacement for QColor::name() because it was
too slow to be used as a hash key.
Change-Id: I009ccdd712ea0d869d466e2c9894e0cea58f0e68
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
This reverts commit 13040043b2.
It introduced a bad regression, noticeable for longer documents, as
it would cause the documentChanged(0, length) to trigger a layout of
the entire document.
The bug report for the commit (or the commit itself) does not contain
a test case, but it is regardless the wrong approach. Note that
QQuickTextEdit already listens to the contentsChange signal and
invalidates the changed parts of the document as a reaction to this,
so it should already work as expected.
[ChangeLog][Qt Gui][Text] Fixed performance hit from showing large
QTextDocuments in a QTextEdit or QTextBrowser. (Regression introduced
in Qt 5.3.0)
Task-number: QTBUG-51411
Change-Id: I6e7fbf8f62a1d68779eef5da3781de14d9fdcad8
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
This proved to be quite slow in the past due to QReadWriteLock's implementation
being suboptimal (prior to its improvement in
343e5d066a).
This codepath is exercised quite extensively by QML with enum registrations.
Change-Id: I94d1e13933bf005604dc4494e2cb5bc25ef3d387
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
The first is "exact", not "more": qCalculateBlockSize. It ensures that
there's no overflow in multiplying, adding the header size or when
converting back to an int.
The second is the replacement for qAllocMore: it calculates the block
size like the first, but increases the block size to accommodate future
appends. The number of elements that fit in the block is also returned.
Task-number: QTBUG-41230
Change-Id: I52dd43c12685407bb9a6ffff13f5da09f816e667
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Basic optimization of conversion from indexed8.
Task-number: QTBUG-35747
Change-Id: Ic9d32789769eadb05fbecfebf2d2f2c87d66610b
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
This benchmark requires QtScript1 headers, and can not build as is.
Change-Id: I98e57ca2db82270a0887462d7959ff00e352166b
Reviewed-by: hjk <hjk@theqtcompany.com>
Most libs use QMAKE_LIBS/CFLAGS, but some have other naming
conventions. Unify them into using QMAKE_LIBS/CFLAGS.
Change-Id: I39b188adc1f9a223a83b294c5315c3095a9c68de
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Our handling of plugins when Qt is build statically is
nowadays good enough, so we don't need to build the
JPEG and GIF support directly into Qt for static builds.
Let's simply always build them as plugins.
Also simplify the logic in configure, and get rid of the
no-gif, no-jpeg and no-png config variables.
[ChangelLog][Build system] JPEG and GIF image support is now
always built as a plugin. Removed -imageformat-[jpeg|gif]
arguments to configure.
Change-Id: Ic01559ff406c966807b3be8761252e8802adcdf7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Calling qMin often prevents effective vectorization, and it is only
necessary when converting from formats with mixed color-channel widths.
Change-Id: I2a0f3f3fb528d45be1fd025758f9d915ee1736c0
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Using shuffle and align storing our quint24 format can be done much
faster. This in particular improves conversions to RGB888.
Change-Id: I179748706a33a43fd6f60f5c40287317418c8867
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
I wrote a script to help find the files, but I reviewed the
contributions manually to be sure I wasn't claiming copyright for search
& replace, adding Q_DECL_NOTHROW or adding "We mean it" headers.
Change-Id: I7a9e11d7b64a4cc78e24ffff142b506368fc8842
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
Not that we require it, but since The Qt Company did it for all files
they have copyright, even if they haven't touched the file in years
(especially not in 2016), I'm doing the same.
Change-Id: I7a9e11d7b64a4cc78e24ffff142b4c9d53039846
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
From Qt 5.7 -> tools & applications are lisenced under GPL v3 with some
exceptions, see
http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/
Updated license headers to use new GPL-EXCEPT header instead of LGPL21 one
(in those files which will be under GPL 3 with exceptions)
Change-Id: I42a473ddc97101492a60b9287d90979d9eb35ae1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
The file exists but it isn't listed in TESTDATA. This is only a problem
when the target is a another system as is the case with Qt for QNX.
Tests fail because the file isn't deployed.
Noticed this while testing the changes for custom spacing of JSON
output.
Task-number: QTBUG-47437
Change-Id: I098c34d2ab9027956d9233b24f30b5192ecfe96f
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Use character literals where applicable.
Change-Id: I1a026c320079ee5ca6f70be835d5a541deee2dd1
Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
Fix usage of API that is marked deprecated.
Change-Id: Ib9a45e93084fb5b0d0d3aefd64b755dff7c696d6
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Instead, we use the binary MySQL encoding and copy the data directly
into the QVariant of the desired type. This gets rid of the temporary
string allocations and greatly improves the performance of the added
benchmark. On my machine, the results are:
Before:
0.562 msecs per iteration (total: 563, iterations: 1000)
1,922,479.330 instructions per iteration (total: 1,922,479,330, iterations: 1000)
After:
0.381 msecs per iteration (total: 381, iterations: 1000)
774,132.957 instructions per iteration (total: 774,132,958, iterations: 1000)
Note that the same could be applied to floating point data types in
the future. Additionally, special support for MYSQL_TIME structure
coult be added to get rid of the string conversions there.
To ensure everything keeps working, a new auto test is added as well
that verifies the select statements and insertions of integral data
into a MySql table works as intended.
[ChangeLog][QtSql] Improve performance when reading integer values
from MySQL databases via prepared statements.
Change-Id: I21dd9277661971ded934546f09535014b63f8eb8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Otherwise you cannot link it statically against QtCore.
Change-Id: I4ac35602cea2192974f3e96ecad35edac976ce27
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
QTextLayout::additionalFormats setters and getters using QList<FormatRange> have
been deprecated; port to the QVector versions.
Moved op== definition for FormatRange needed in tst_qsyntaxhighlighter.cpp
to a friend declaration in FormatRange itself, because MSVC 2008 doesn't find
it otherwise.
Change-Id: Ibab6589df057f02377d895079b56395859e3401e
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Completes the inplace converters so that we can rely on inplace
conversions to succede as long as the image depth is the same.
Change-Id: Ia1ae34b5de1bc16e87ff5403bdacfcae44a22791
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Cleaning up smoothscale code. Upscaling is improved using existing
optimized interpolation methods, and downscale is given SSE4.1
optimized versions.
Change-Id: I7cdc256c26850948aef7dae26fda1622be6b8179
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
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>
Improves the conversion from RGB888 to RGB32 on platforms without SIMD
versions. This includes the fallback used on non-neon ARM devices.
Besides image conversion the routine is also used for decoding JPEG.
On x86 this version is within 0.7x of the speed of the SSSE3 version.
Change-Id: Id131994d7c3c4f879d89e80f9d6c435bb5535ed7
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
There are many direct QImage conversions that doesn't need to be direct
but only are because they are faster than the generic conversion. This
patch optimizes the generic conversions and then removes all the direct
conversions that are now no faster than the generic.
Change-Id: I3dc5f44cc7f6358fd66420e9974eebaf2c7ca59c
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>