This requires being able to compile the SSE4.2 instruction at compile
time without changing compiler command-line flags. This code will get
enabled for GCC 4.9, ICC and MSVC.
Change-Id: Ifb9158ff7f49e6ae581297893cd1e21dd5ce3573
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
GCC 4.9 now allows us to #include any and all intrinsics headers, not
just the one for which we're compiling code, a behavior that ICC and
MSVC have had for some time. With that, we're able to have the functions
for different targets in the same source file. See the GCC manual:
http://gcc.gnu.org/onlinedocs/gcc/Function-Multiversioning.html
This functionality is notified by the QT_COMPILER_SUPPORTS_HERE(XXX)
macro, which indicates that all the intrinsics from
QT_COMPILER_SUPPORTS_xxx are available and enabled. To complement, a
QT_COMPILER_SUPPORTS(XXX) macro is also added.
Unlike ICC and MSVC, GCC requires a special function attribute, which
will also cause code optimization. That's the QT_FUNCTION_TARGET macro.
Note: because of the absence of the target attribute, ICC and MSVC will
not generate instructions with the VEX prefix unless they only exist
with the VEX prefix or if -mavx / -arch:AVX are enabled.
Change-Id: I0c1880c20324bd8e0fc68a863e36d1fa7755dff0
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
We'll use the master depends header for the module as the precompilation
header. We could use the master include, but tests show that
precompilation benefits taper off for big precompiled headers. The
important part is to get the Standard Library headers precompiled.
Each module can still override which header to precompile by setting
PRECOMPILED_HEADER after load(qt_modules). It can also turn off
precompiled headers by setting that to empty or by CONFIG -=
precompile_header.
Testing a few build times shows the following improvements (GCC 4.8 with
-O3 and C++11):
QtPrintSupport: 14.7%
QtOpenGL: 22.7%
QtDBus: 29.5%
QtSvg: -2.4%
QtXmlPatterns: 26.1%
QtQml: 21.6%
QtQuick: 25.0%
QtMultimedia: 9.0%
QtSerialPort: -30.0%
QtHelp: 5.6%
The numbers also show that precompilation is worse for small modules.
Change-Id: I3793fafcedaff5456527cd6b3777ffd162975c36
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Task-number: QTBUG-39215
Change-Id: I8d4155aa4db5d807d1846c5741c01693af24f846
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
QMacStyle now uses proper system colors when drawing status bars.
Change-Id: I618e485a2a68a484f7c8cb5635cd2bf529126c02
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Indeterminate progress drawables can consist of multiple layers that
don't necessarily have an ID. Ensure that the extracted file names
contains unique IDs to avoid extracted layers overwriting each other.
Task-number: QTBUG-35081
Change-Id: I3dc48bf363510ded9b955aa51fa479c607541169
Reviewed-by: BogDan Vatra <bogdan@kde.org>
The indeterminate drawable is used for QtQuick Controls BusyIndicator
Task-number: QTBUG-35081
Change-Id: Iecdc6e80444b5134ec1fa61916c7ac1612cd275f
Reviewed-by: BogDan Vatra <bogdan@kde.org>
When allocating (mutable) storage for a texture, OpenGL mandates that
the client-side format and pixel type "match" the internal format.
That needs to happen even if we are not actually uploading anything
(because we're passing NULL as the data parameter and no PBO is bound).
This means that we need to pick a compatible format/type and not just
pass GL_RGBA / GL_UNSIGNED_INT. In turn, it implies adding new
enum values to the various format/type enums.
Change-Id: If40c63b1d44764b3be131dd1b41d13983a19ae45
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
I show this example during trainings, and parent() is too much like
QObject::parent(), QModelIndex::parent() and our model's parent()
[which calls this method], so it's less confusing if this is called
something clearer like parentItem().
Change-Id: I101342051349d94c4a3bc3d4bc332194d6779293
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
To extract the target of a given texture object. Somehow this
accessor was missing.
Change-Id: Ie43366bed3627a20204600e68e426b55abf37af6
Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
...and check the returned value where it may cause undefined behavior
(i.e. negative amount of items or iteration from -1 to n).
Change-Id: Ib7bd9ab178526df45b792ad48b91ebbab6be861a
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
The linker complains that some symbols were compiled with different visibility
settings when linking host_build tools such as the import scanner. As it turns
out, we do CONFIG += hide_symbols for static libraries (such as bootstrap or
qmldevtools) but naturally not for the final program source code. It appears
symbol visibility is not of importance for static libraries in host builds (as
opposed to static libraries later linked into shared libraries), therefore this
patch removes that.
Change-Id: I237a2d8669374eb059dc91b5378f6e3ec93d67a6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
The dynamic builds (-opengl dynamic) are now functional on Windows.
In such a build no components in Qt link to any OpenGL libraries directly
and qmake will not automatically add any such libraries to the
applications' makefiles. Instead, the libraries are chosen and loaded
during runtime and applications are expected to use QOpenGLFunctions
instead of direct OpenGLfunction calls.
Set the environment variable QT_OPENGL to desktop or angle to skip testing
and force the given implementation. The application attributes (AA_UseOpenGLES
and such) are also taken into account.
The testing logic is same as before: We try to load opengl32 and
resolve a shader related function. If this fails, ANGLE is chosen. This
allows utilizing full desktop OpenGL on systems that have proper drivers,
while a transparent fallback to ANGLE will be done automatically for
systems that don't. The latter includes also remote desktop connections.
Software rendering via Mesa llvmpipe is supported too. The fallback is
automatic on systems where the desktop test fails and ANGLE fails to load
or initialize (e.g. due to missing libs like d3dcompiler), as long as a
suitable patched build of Mesa is available.
[ChangeLog][QtGui] Dynamic OpenGL implementation loading is now supported
on Windows. This requires Qt to be configured with -opengl dynamic.
Task-number: QTBUG-36483
Change-Id: Ie8bb25a6d55b3a1609b00150aeccd909aec27313
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
When Ministro is not in use, we need to extract style
information on startup in order for the native Android style
to work.
The code to extract data from the device is contributed from
the Ministro project.
[ChangeLog][Android] Enable using native style also when
Ministro deployment mechanism is not in use.
Task-number: QTBUG-36019
Change-Id: I2afef5219b4e8fbb2f3e387cbc5e570da1f41011
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
QOpenGLContext::versionFunctions returns 0, if a QOpenGLFunctions object
for a legacy OpenGL version is requested while using the core profile.
This leads to a crash QOpenGLContextPrivate::maxTextureSize()
Change-Id: I32845643094336cebcc666806a411524fe3e869b
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Instead of sometimes ending up inside Content/Resources. The two build
phases PBXCopyFilesBuildPhase and PBXResourcesBuildPhase have different
semantics of where to place the files. For the former we use the root of
the bundle as the destination, and this is how QMAKE_BUNDLE_DATA is
documented and used, as well as how unixmake2.cpp implements it. The
latter on the other hand, always ends up in the resources subdirectory
on OSX.
Task-number: QTBUG-35318
Change-Id: I45bbd0dfe7ea78ae330ecb0c91efa74e1c76c9eb
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
The ICON qmake variable is implemented in the Xcode generator through
the ProjectBuilderSources::files() function, where we append the icon
to SOURCES (for some reason). This means we can't exclude non-object
sources when writing out PBXBuildFile entries, as the icon file entry
is referenced later on in the bundle resources phase.
This is a partial revert of 66f6e5b162 which introduced the broken
logic.
Change-Id: I120d2325165a1eefd3961a9162e9e5eb3a576c36
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Change-Id: Ib199b4093d86d1596b630223d0734171ba0d82c5
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
This injected quite some code on every use of qDebug and friends,
while not giving any measurable performance benefits.
Change-Id: I7b51f99130f18f1252da01e313f7b97c43a5480d
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Implementation will be added for Qt 5.4.0 as it cannot be done
sooner.
Change-Id: I4d2626416fae99339988cd994653ce7ec753f081
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QSqlResult::bindValue(int index, ...) is increasing the memory usage
when called multiple times for same index
Task-number: QTBUG-33169
Change-Id: I4f26125f6bb994bb430dc054df5761b6ddf03075
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
This fixes an issue where, if characters were removed from several
blocks in a single edit, the document layout would end up being
corrupted since the document layout manager wouldn't re-layout the
proper number of text blocks.
Task-number: QTBUG-30051
Change-Id: Idf3a6f567120e6a5dbebf1f65f685d374219328a
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
AVX2 brings the new PMOVZXBW instruction that extends from one 128-bit
SSE register to an 256-bit AVX register. With that, the main decoding
code is just two instructions (the loop requires a couple more to
maintain the offset counter and do the end-of-loop check).
This buys us another 4% performance improvement in the fromLatin1 code,
calculated on top of the VEX-encoded SSE2 code (which is already a little
better than plain SSE2).
Change-Id: I675fa24de4fa97683b662f19d146047251f77359
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Once LayoutData::items gets cleared, accessing (or re-using)
SpecialData::resolvedFormats may lead to a undefined behavior,
so clear SpecialData::resolvedFormats right after LayoutData::items.
Change-Id: Ib389f0029a0562f5d2837f62f76197510a0db099
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
When syncing between QAction and native NSMenuItems, the ampersands
(mnemonics) were removed twice. This lead to double ampersands being
removed instead of replace with single ones.
Task-number: QTBUG-37933
Change-Id: If1d9cd247b467472647b22b38460b44b03f13d82
Reviewed-by: Liang Qi <liang.qi@digia.com>
it's a precursor of lupdate from the stone age.
[ChangeLog][Tools] The obsolete findtr script was removed.
Task-number: QTBUG-30900
Change-Id: Ic3efdc44df084573aec2512d8f86101832253d77
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
... because it fails on the new network test server. The Socks5 tests
in QUdpSocket have already been disabled by commit
aa3eaf9d2e .
Task-number: QTBUG-35490
Change-Id: Ib062adb422ff6e5538f14d15a266d79c3bb53956
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
It's a common need to assign a variable to something when entering a
code block, and then revert it upon exit. qscopedvaluerollback can
be used for this. But as a convenience, this patch adds an
extra constructor so that you can "protect" and set a variable
in one go instead of using two lines.
Change-Id: If4b89d3a5ba32ef2304bda058b1b6050932612ed
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
The existing waitForNotified method has the design limitation that it
doesn't allow the tracking of multiple I/O operations on a single
file handle.
Therefore we introduce an additional method waitForAnyNotified that
returns a pointer to the triggered OVERLAPPED object.
Change-Id: I536ed7f6828daa2b0ce03f2d662eeb10aa89ca99
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
The data given to putenv(3) becomes a part of the environment, as
described in SUSv2, so If the data is unintentionally modified or
deleted the consequence can be fatal.
In previous versions of Android, the putenv(3) implementation made a
copy of the data, so this bug has gone unnoticed.
Task-number: QTBUG-39042
Change-Id: I20559c848fded10eeae54c4700ba0f4669fe49fc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
If the project has a custom Info.plist assigned to
QMAKE_INFO_PLIST, we should leave it as-is without
scanning and replacing contents inside it. Since we
always copy the file to the build folder at qmake
time, any later attempts to modify the source file
will not have any effect.
A better solution is to just reference the custom
plist directly from the Xcode, without modifying it.
This change will also stop unixmake2 from assigning the
default plist to QMAKE_INFO_PLIST, since we need to
know in the xcode generator if the variable was set in
the project or not.
Task-number: QTBUG-38260
Change-Id: I3c488b2960170c544d94f9db89d3ca95ee290bdd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Qt sometimes report that the selection anchor is placed before
the cursor when querying it for current selection. We need to
accomodate for this when reporting current selection back to
iOS, since it expects the range to always be positive.
When pressing backspace, iOS will select the letter that should be
deleted, and then call "deleteBackwards". If holding down backspace
for a while, it will start selecting whole words instead.
Since we reported negative ranges during this process, it caused
artifacts and stray letters to be drawn.
Task-number: QTBUG-39073
Change-Id: Ida9518307adce915adf49160b541a2f88637a0da
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Any bootstrapped tool is a development tool, by definition. So the
effects of seeding the hash with a random number can cause the same
source input to produce different binary results, which can throw some
caching tools into disarray (like the Open Build System).
There should be minimal fall out from the reduced protection against
DoS. Since those are only development tools, "specially crafted" input
implies the developer is DoS'ing him/herself.
Note: the change to qhash.cpp applies to moc and rcc, which are always
bootstrapped.
Change-Id: I061ab52036e40627c0703f1bf881455cbf848f43
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
formats() -> formatCollection()
additionalFormats -> formats
QTextEngine has three different code paths: in context of QTextDocument,
additionalFormats are currently _additional_ formats;
though in QTextLayout, they are the only formats in use;
and the QRawFont-related path shares the QTextLayout's behavior.
This is a preparation step to consolidating these three into a single one.
Change-Id: I427ccc3c2f672ce090899bb0a0995972315daafa
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
of course all helper libraries are built statically, so the criterion is
not useful. what is interesting is whether the whole qt configuration is
static, as that determines what will happen with the helper library when
linking the final "actual" artifacts.
Change-Id: I96980c645cb478b2f7a30688b49cb51bec8c9f08
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
"htmlTitle" never diverges from "fullTitle".
Change-Id: Id1ce9005311bd86aa9803836168a2bebae6db65d
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Change the cursors Qt provides to use freely scalable pixmap cursors
and scale them to observe system metrics. Make it possible to
use pre-saled bitmap data later by passing the system cursor size
and the intended target size into the creation function
createBitmapCursorFromData().
Task-number: QTBUG-37862
Change-Id: I23899a77f86d0b08b858a81870a57b2e6570ebbe
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>