Add convenience method QTextFormat::isEmpty()

Change-Id: I30e74de6853908d1fec399131637848e3c2faabe
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reduce code duplication

Change-Id: I077963fcb910fa705b087e35e99cd07436c034b1
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Make conversion of semi-transparency to opaque formats consistent

Currently the non-standard opaque formats all perform inverse premultiply
on semi transparent pixels when saving. This is only performed on RGB16
and RGB32 when explicitly converting to the formats, but not when drawing.

This patch changes the conversion to be consistent across the board so
less common formats are treated the same as the most common ones. This
also makes drawing and converting to the these formats much faster.

Task-number: QTBUG-36143
Change-Id: I877ddb1c1dbb4d2dd9b4b9192525e50375a1ae60
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Add support for using -isystem in qmake

This commit will make qmake use -isystem automatically for any
compilers that declare support for it for any paths that are listed in
QMAKE_DEFAULT_INCDIRS.

Change-Id: I36fefc6d5bba61671f65669f0ea42704b3c3cf31
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Don't scan system includes for dependencies and don't list them

Assume that C and C++ headers found in system paths will not change,
so we don't need to tell Make about them, nor do we need to scan their
contents either.

The previous qmake behavior matched gcc's -M switch; it now matches
the -MM switch:

       -M  Instead of outputting the result of preprocessing, output a
           rule suitable for make describing the dependencies of the
           main source file.

       -MM Like -M but do not mention header files that are found in
           system header directories, nor header files that are
           included, directly or indirectly, from such a header.

This goes hand-in-hand with our use of -isystem to pass system paths
to the compiler.

Change-Id: I3346b6da496fe6495ac89c5286d066b343116f0e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
re-import qlalr into qtbase

we have a bunch of qlalr-generated sources all over the place. it would
be much nicer to actually generate them at build time, rather than
checking them in. this obviously requires building qlalr early on ...

this commit restores the sources at their pre-modularization location
and makes no attempt at integrating them into the build process yet.
this is a measure to overcome git stupidity.

this imports qt/qlalr at commit 4071d86e82b299f26e335a7faf662b5a676e2279
with some style fixes on top.

Change-Id: I83472bc492440ecb96a8a0d5bf74cf968a1e17d2
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
fix includes

use style suitable for bootstrapping. while we're at it, order the
includes the usual way.

Change-Id: I4fe96bfb73442c8a5de6dfe52d1a8c7eb22104c8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
port to std::algorithm

Change-Id: I537b9ffc3eed0891bed0fcae3e0d79d70cc46cec
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
move and build qlalr

Change-Id: I852e1a33fc056a52f6dbba8aaf7dd75274bbe815
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
introduce qlalr feature

this makes it possible to compile grammars at build time.

Change-Id: Ia74383c4f29873ee7324bd5f14d72ef14faef460
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Revert commit 0893d2d7e5cadcbea5caca8a027ae3e28b6c5410

Commit 0893d2d7e5cadcbea5caca8a027ae3e28b6c5410 causes a lot of build
warnings on Windows with MSVC.

Change-Id: Ic857b36bf77d4f536a45cec337f4b813b9974107
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Make xcb QPA plugin link on FreeBSD

dlopen, etc. are defined in libc on FreeBSD.

Change-Id: Iad47113ec77029f8e300e4f08f454d70b3070b5a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Android: Don't crash on 100+ combo box items

Local references are valid until the original native method
returns (if it's a Java thread), or until the current thread
is detached from the VM. This means that we have to manually
manage local references and delete them when they are no longer
in use, otherwise we will leak memory and flood JNI's local
reference array.

[ChangeLog][Android] Fixed crash on populating large combo boxes
or menus.

Task-number: QTBUG-36074
Change-Id: I7095bd1472f759be98183737a8d3912fa9763f30
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Do not close string data by a double null terminator.

There is no point in saving \0 twice. Any code that could relay on it
is broken anyway, because moc saves \0\0 for an empty string.

Change-Id: I28fa4f78aae8c883c088df43ec89d608a99b3bdd
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Remove duplicated code from moc generator

Change-Id: I0d603ac39068f796fc7397a74230d544a16e0371
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Document qRemovePostRoutine() function and update qAddPostRoutine() doc

The qRemovePostRoutine() function has been added as publicly exported
function in Qt 2.2.0 with behavior equivalent to that of today. It has
never been documented for unknown reasons, possibly simply forgotten.

This function provides needed symmetry for the already documented
qAddPostRoutine() function and is used in some real world applications.

Change-Id: Ied4709505d8335c883e9791ea634df8fb406d995
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Nico Vertriest <nico.vertriest@digia.com>
Add missing header guards

Change-Id: I515313289c0a4af0f675131760ad4ccd0c6e6149
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Rename a test class to a bit more verbose name.

That way we can avoid name conflict with a namespace defined in
a different moc test

Change-Id: Id631d7c5556c9d6940e16dc53eb438dbcd0095eb
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Use pkg-config to find the prefix for X11 install

Needed to run the XKB extension where we used to expect X11 to be
installed in /usr. In FreeBSD, for instance, X11 is installed in
/usr/local like all the other not out-of-the-box packages.

Same thing goes for the compose platform input context plugin.

Change-Id: Ib7ace3117eaacc6e150394450d1330cba654ba8a
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Fix eglfs compilation on raspi

For some reason the Raspberry Pi hook includes qeglfscursor.h even
though it is not necessary. Remove this because the file got moved to
eglconvenience.

Change-Id: Ia65f5a8366d750f93eacee49004219e664b52af2
Reviewed-by: Andy Nichols <andy.nichols@digia.com>