Revert "QWidgetTextControl: Suppress drag selection for OS-synthesized mouse events."

This reverts commit cf0d96f4c8584a7eb9eeca304932f6ea88894b27.

It broke text selection on iOS and was never tested on that platform.

Task-number: QTBUG-43101
Change-Id: I9f224a3838a1f741bc9a9c24f16923ef2018ddf3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Revert "Use single finger pan to scroll text edits on touch screens."

This reverts commit 2ffa46054d13c639cf9f7846a74ad3ebd07b9f5c.

It completely broke text selection in text edits on iOS, and wasn't
even tested on that platform before landing. It's also changing
behavior in a patch release for multiple platforms, from being
able to both scroll and select text, to only being able to scroll,
which would be considered a feature-regression and an automatic
-2 on the original patch.

This means QTBUG-40461, a P2 regression from Qt 4 on Windows, will
have to be re-opened, so that we can fix it properly.

Task-number: QTBUG-43101
Change-Id: I26a2bafb4500b1ff4dc3fb942f197d11038b630b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Collate calls to updateTextureFilter in updateBrushTexture

Change-Id: Id13d5bc122c4f9cc8f44ff82df345a50f2944118
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
Windows: Bring FreeType rendering up to par with other platforms

The text was very washed out, almost white on small font sizes.

This ifdef was introduced to cater for GDI differences between Vista
and Pre-Vista, it's GDI specific, nothing to do with FreeType.

Text now looks good, and md5sum of the rendering is the same as on Linux.

Task-number: QTBUG-42564
Change-Id: I2e06b83b80df093331454fe1b780d26462db597d
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
FreeType: Fix font rendering with fonts with embedded bitmaps

Only reproduced with Windows font Calibri. This font has both
outline (vector) and bitmap glyphs. QFontEngine_FT has an hack
to get metrics from EBLC table, but this might fail, resulting
in a 0 ascender and descender, meaning QFontMetrics::height()
will be 0, meaning totally broken text.

This patch checks for that failure, and fallbacks to the outline
metrics instead of the bitmap ones.

Task-number: QTBUG-42898
Change-Id: If33fc3404d0c7f84557f8c4a5ae71b30f78d60a7
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Don't make invalid assumptions about memcmp()

In qtranslator.cpp match()

Task-number: QTBUG-39757
Change-Id: I49e3ccc0ce900564bbe14609bfda47688382d5f3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Windows: Handle WM_WINDOWPOSCHANGING during window creation.

Fix warnings:

QWindowsContext::windowsProc: No Qt Window found for event 0x46 (WM_WINDOWPOSCHANGING), hwnd=0x0xde0408.

occurring when using Active X controls.

Factor out message handling to a static function which can be used
during window creation when QWindowsWindow does not yet exist.

Task-number: QTBUG-36318
Change-Id: I3ce56fd377e3392b0dd22d3d26a7048065380f13
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
QDockWidget: Prevent repetitive unplugging of floating dock widgets.

When calling QDockWidget::setTitleBarWidget() from within signal
QDockWidget::topLevelChanged(), a nested call of
QDockWidgetPrivate::setWindowState(unplug=true) is triggered, leaving
it with Qt::X11BypassWindowManagerHint set and thus invisible/off
screen.

Force the unplug parameter to false if the widget is already
in floating state.

Task-number: QTBUG-42818
Task-number: QTBUG-38964
Change-Id: I6aff61e4ee1501f5db281566b66db66c19351410
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
Stabilize tst_QWindowContainer.

Fix window/widget leaks, observe available geometry.

Change-Id: I19784d34a62c6e05dbc403852364cfb5e4d12dd5
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
Fix loading of web fonts with broken hinting bytecode

The Fira Sans font by the Mozilla Foundation has bytecode that goes
into an infinite loop. Fortunately FreeType catches the case, but we
fail to render any glyphs and spends too long trying the bytecode on
every glyph.

This patch instead switches the font to auto-hinting when this error is
encountered.

Task-number: QTBUG-41034
Change-Id: Icd044b41396a06fb435bc189cdbd71d703107de6
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>