Fix instances of !var & const that should be !(var & const)

GCC recently started warning about these.

Change-Id: I7b30c79f7f2b66b99e54354224700d54ace6ebec
Reviewed-by: Jens Bache-Wiig <jensbw@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Get rid of some duplicate code in QFontEngineFT

This removes some code duplication in the QFontEngineFT and
it also removes the condition that loadTransformedGlyphSet()
will return 0 if the font is too large to be cached, since
this is handled by setting outline_drawing on the glyph set which
will fall back to painter paths.

Change-Id: I2fe6a963e854cdd7c6015154547dc06325cbe3b0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
iOS: Clean up QPlatformInputContext subclass header

Implements isValid(), which should be returning true for subclasses,
and re-orders and adds Q_DECL_OVERRIDE where appropriate.

Change-Id: I03519bf674b6f7b7ccc07a7154c9a1fb9a8105f2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Add missing host_build CONFIG for qlalr

Change-Id: I6eddd2afd9eb4dac0b28329003dbd3b6d05d3fd1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Don't say "Neon... auto" when ARM Neon isn't detected

Just say "no".

Change-Id: I382d612ad0a7f4031b1891e7e4d9158db07badf1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
[QStaticText] Fix potential font engine leaking

Never assume the engine is still cached but rather delete it
if we are the last consumer.

Change-Id: I4e3c796d45c53f42722a437482d71e2dae14cad2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Don't assemble QRawFont from QFont manually

Always prefer QRawFont::fromFont(..)

Change-Id: Ic33f7d3a468f926418b39887f572829af93f8c1d
Reviewed-by: Pierre Rossi <pierre.rossi@gmail.com>
Fix potential access to uninitialized member

If GetTextMetrics() failed, there is no guarantee that
TEXTMETRIC is initialized with any safe values.

Change-Id: Idb5e3bc1bc2451368950978365487c908ce529e7
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
[QAndroidPlatformTheme] Get rid of static QFont

QFont is not POD and shouldn't be instantiated statically,
otherwise we could end up with UB during qApp destruction.

Change-Id: I2372c7a643eb3007957ab2b798732c1a18fd0ae5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
[QPainter] Fix QTextItem painting with extended paint engine

Multi QFontEngine should be handled just like all other cases
covered several lines below.

Change-Id: If3dd9a2e38a5f6f61b113576cb188da378fc9efb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
QDistanceField: a zero glyph index means the glyph was not found

In qt_fontHasNarrowOutlines, if we proceed to call alphaMapForGlyph
when the glyph does not exist, there will be a failed assertion.
The docs for FT_Get_Char_Index say that zero means the glyph was
not found.

Change-Id: I371e9a2797a34fa3ebeae44531af51e24dadad79
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Windows: Respect hinting preferences with FreeType engine.

One of the fontEngine()'s methods was missing hinting. This bug only
manifests on Windows because on Linux QFontConfigDataBase already sets
hinting on both code paths.

Task-number: QTBUG-42534
Change-Id: I3a66a9d4aaa5e390fee305a3d5aacfeba38a1fc3
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Improve diaglib.

- Fix prototype for glinfo() for Qt 4
- Add more event types and object type flags to event filter.

Change-Id: Ia4160b40486d054e860a339e7b5c9c28695330ae
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
don't use QCursor if QT_NO_CURSOR

to support configure -no-feature-CURSOR

Change-Id: I8e7f9a7f80d3d44a1f8e25b909d552351b5f37e4
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
sqlite: don't use deprecated QSqlError constructor

so that it can build with configure -no-feature-DEPRECATED

Change-Id: Id2decc05974bad249c79936d99ab63d3cfc375ad
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Android: replace qFind with std::find

qFind is deprecated, so these cause build errors with
configure -no-feature-DEPRECATED

Change-Id: Iefcb061d5e8ce256445528f601ead4c9d5d1dfd2
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
XCB: send leave event on grab

When a popup is opened it grabs the input, but the leave event to the other
windows needs to be sent.

Remove the popupEnterLeave test as it did not test any code. The Popup
never gets any enter or leave events so it will succeed always succeed

Task-number: QTBUG-36862
Change-Id: I625c616eeb74b5168af7b751485e2a9a53b76cd3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Widgets, iOS: don't tell the input panel to hide on focus out

On iOS, autoSIP is handled by the platform plugin. We therefore
avoid letting widgets tell the input panel to hide on focus out
so we can gain better control over this from the plugin.

Note that we could also set QApplicationPrivate::autoSipEnabled
to false and achieve the same. But since autoSIP is logically set
on iOS, it's better to report it as set in case the app asks.

Change-Id: I96c68bc446a1e299fd57afe03a9e273491df08a7
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
iOS: only skip activating the most simple popup types

The current approach of not activating transient windows with the
popup flag set was found to be too restrictive, as it would
e.g stop transient dialogs from being able to contain editable
controls.

This patch will restrict the number of popup types that we
skip activation for to only contain a few subtypes.

Task-number: QTBUG-41613
Change-Id: I381a5a79fb4f7082da18a6b4e06a7255ff400b1a
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reorganize devicediscovery header

As pointed out in 13b939c7f41bceb2061e549923eab242326e9bb5 the approach
qdevicediscovery_p.h takes is just wrong. The defines it relies on will
often be missing when the header is included from random places in qtbase.
This results in different class layouts. It was working only because the
interface of the class is very limited and the public part was matching
regardless of having the macro defined.

This is now corrected by introducing subclasses and a common, non-variated
base class. QDEVICEDISCOVERY_UDEV is removed completely.

Change-Id: I9c83b5b041440a3a6ea3a604eee4a325d4d74439
Reviewed-by: Louai Al-Khanji <louai.al-khanji@theqtcompany.com>
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>