Commit Graph

21104 Commits

Author SHA1 Message Date
Nico Vertriest
b74e046174 Doc: corrected autolink issues qalgorithms.qdoc
Task-number: QTBUG-40362
Change-Id: Ia609b68b52472342d791a032974a3d866e8d3266
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-12-05 15:32:43 +01:00
Friedemann Kleint
0a91f15878 Diaglib: Fix another typo in .pri file.
Change-Id: I2888c4fb9947d61285a8a570661a29e61b10bbce
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2014-12-05 15:32:37 +01:00
Simon Hausmann
8c0014213b Merge "Merge remote-tracking branch 'origin/5.4.0' into 5.4" into refs/staging/5.4 2014-12-05 16:45:27 +01:00
Allan Sandfeld Jensen
c43133c81e Make no_debug_info also strip out -gstabs
Since QtWebKit started using stabs on some platforms to reducing
memory pressure during linking, the tricks to strip out debug-info
in the internals no longer worked because no-debug-info doesn't strip
the -gstabs compiler and linker flags.

Change-Id: I151088f29058b8fe50cba9aa3ec8ecd84b85d7d8
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-12-05 14:51:33 +01:00
Paul Olav Tvete
8015ffef1e Fix QOpenGLWidget/QQuickWidget GUI freeze
A window with a renderToTexture child uses the OpenGL path, but when
we open a popup or dialog, that uses the raster compositor, which opens
a separate surface. This patch fixes two issues when combining GL rendering
with the raster compositor:

1. GL-rendered widgets were counted as part of the raster-rendered region,
meaning that we did not punch a hole in the raster surface.

2. We did not destroy the surface when no longer needed.

Task-number: QTBUG-41467
Change-Id: I2a2a0e860cce065b330df1c864d51fd02103aa1b
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
2014-12-05 14:25:09 +01:00
Gabriel de Dietrich
a43684c0da QMacStyle: Fix 32-bit build
Again one of those CGRect vs. NSRect issues.

Change-Id: Ia933cd6f002585e21247d2f9f85d2451db6dbaa0
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Timur Pocheptsov <Timur.Pocheptsov@digia.com>
2014-12-05 13:34:03 +01:00
Tor Arne Vestbø
3f1cb33d35 Reformat QOpenGL2PaintEngineExPrivate a bit to make it easier to refactor
Change-Id: I99f7192008ae8ea3a16f5300e5e4ebdde50847af
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2014-12-05 13:22:19 +01:00
Simon Hausmann
7644faa881 Merge remote-tracking branch 'origin/5.4.0' into 5.4
Change-Id: I0cd11cbe95693b78450ea81a0187760f4a6a8b5f
2014-12-05 11:53:33 +01:00
Eskil Abrahamsen Blomfeldt
0fa5310425 Android: Enable -fno-builtin-memmove in arm builds
On some devices, a miscompilation of libc.so has caused it to
return the wrong value. Instead of returning the dest pointer,
it returns dest + n. When compiling with optimizations turned
on, gcc may use this return value for subsequent accesses to
dest after the memmove() call, causing memory corruption.

This caused problems e.g. in QVector::prepend() which would
overwrite the whole vector with the new value.

Setting -fno-builtin-memmove disables the optimization and
works around this bug with very little risk or impact.

More information in:
     http://code.google.com/p/android/issues/detail?id=81692

[ChangeLog][Android] Fixed device-specific crash on Samsung
Galaxy Tab 3 Lite 7" and some other devices.

Task-number: QTBUG-34984
Change-Id: I0c1347149eb5fe1c298758fe7de81aca4137f652
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-12-05 08:13:56 +01:00
Oliver Wolff
451668d252 WinRT: Only set keepalive socket option in certain socket states
The keepalive socket can only be set if the socket is not connected
(see
http://msdn.microsoft.com/en-us/library/ie/windows.networking.sockets.streamsocketcontrol.keepalive)

Task-number: QTBUG-38623
Change-Id: Ia40dc66f071a8109538e4be7a8f420de81d5be8d
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
Reviewed-by: Andrew Knight <andrew.knight@theqtcompany.com>
2014-12-05 08:00:44 +01:00
Giuseppe D'Angelo
8920200c97 QColumnView: don't set an invalid index as the current one
When any item in a QColumnView gets selected, the next column gets
normally set to show the children of that index. When we are on a leaf
of a tree model, the next column will have an invalid root index, yet
we set that root index as the "current index" for the current column.

Due to the special handling for invalid indexes in
QAbstractItemView::setCurrentIndex, this ends up breaking the current
item AND the current selection in that column. Further clicks inside
the column for instance trigger the entire column (up to the clicked
index) to get selected, because of that broken first setCurrentIndex.

The simple fix is to stop doing that when the next column has
an invalid root index.

Task-number: QTBUG-2329
Change-Id: Icd10c0b958e25cd868536e1315561787977b68bd
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2014-12-05 07:57:46 +01:00
Andy Shaw
c9f9eddc0f Add missing documentation for some variables
Task-number: QTBUG-5109
Change-Id: I38e12b957cad099d2f815a0d192cf3ab9fee52e5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
2014-12-05 07:39:17 +01:00
Jan Arve Saether
e682ea6f78 Draw the accessibility focus rectangle properly
Previously, the accessibility focus rectangle was only visible when it
overlapped with the m_editText View of QtActivityDelegate. The reason for
this is not completely verified, but this is the most likely reason:

  * The SurfaceView and QtLayout (ViewGroup) does not do any drawing
    themselves. Due to this their default value of the View::willNotDraw
    property is true.  Because of this Android might assume there is no
    content for the focus indicator to surround. (This was verified with
    setting the willNotDraw property to false on the accessibility view);

  * Another possible reason could be that overlays does not work for
    SurfaceView. It is documented that overlays does not work for
    SurfaceViews, so therefore it tried to use the overlay of another
    view. For some reason it picked the m_editText overlay instead of the
    QtLayout overlay.

    See here about overlay:
    http://developer.android.com/reference/android/view/View.html#getOverlay()

The solution is to add another View that covers the whole screen, which
will be used solely by android to draw the accessibility focus indicator.

In addition, we change the QtAccessibilityDelegate to no longer have the
SurfaceView as a host, but have the m_accView as a
host (the host can be freely changed, since all accessibility nodes are
virtualized through the delegate anyway)

For the record, this will be the current ordering of views in QtLayout:
(back-to-front order):
                                Qty     Default Qty
* Surface View(s)               >= 1    1
* Accessibility View            == 1    1
* Native View(s)                >= 0    1
* m_editText View               == 1    1
where the m_editText migth be interleaved among the Native Views.

[ChangeLog][Android][Accessibility] Fixed an issue where the accessibility
focus rectangle was not drawn properly

Task-number: QTBUG-38869
Change-Id: I64d6b6ec45b27d0d93ac9dd840de764c18c55d04
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2014-12-05 06:15:52 +01:00
Friedemann Kleint
2df293267e Windows: Skip calculating margins for Qt::FramelessWindowHint.
Always skip calculating style-dependent margins for windows claimed
to be frameless by Qt. This allows users to remove the margins by
handling WM_NCCALCSIZE with WS_THICKFRAME set to ensure Areo snap still
works.

Task-number: QTBUG-40578
Change-Id: Ice7771df8fbf59b370568219d10c12ce04e99628
Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2014-12-05 06:10:01 +01:00
Andrew Knight
5367fa3562 winrt: Fix window resize
The fixed-size EGL display must be updated on PC as well as Windows Phone.

Task-number: QTBUG-43112
Change-Id: I0ba90370b67e8c065843e5754579e341b647266d
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2014-12-05 05:37:01 +01:00
Allan Sandfeld Jensen
30772c7270 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>
2014-12-04 20:30:55 +01:00
Friedemann Kleint
82d54a6593 Stabilize tst_QWindowContainer.
Fix window/widget leaks, observe available geometry.

Change-Id: I19784d34a62c6e05dbc403852364cfb5e4d12dd5
Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
2014-12-04 20:18:38 +01:00
Friedemann Kleint
8860522d7e 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>
2014-12-04 20:18:21 +01:00
Friedemann Kleint
50d29a695a 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>
2014-12-04 20:18:13 +01:00
Albert Astals Cid
247607a1af 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>
2014-12-04 19:22:15 +01:00
Sérgio Martins
1edc7554de 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>
2014-12-04 19:21:15 +01:00
Sérgio Martins
33739ccb95 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>
2014-12-04 19:20:58 +01:00
Tor Arne Vestbø
36818ae9ef 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>
2014-12-04 18:51:39 +01:00
Tor Arne Vestbø
fd29be6a6b Revert "Use single finger pan to scroll text edits on touch screens."
This reverts commit 2ffa46054d.

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>
2014-12-04 18:51:39 +01:00
Tor Arne Vestbø
20d10d90f2 Revert "QWidgetTextControl: Suppress drag selection for OS-synthesized mouse events."
This reverts commit cf0d96f4c8.

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>
2014-12-04 18:51:38 +01:00
Simon Hausmann
bd5743f1d8 Make tst_qwindow::positioning more reliable
Don't check for absolute counts of resize events but just check if we
were resized. Also use QTest::qWaitForWindowExposed instead of QTRY_COMPARE
and checking for QEvent::Expose.

Change-Id: Ie383493a8ce6d88cad50bd6375d432ad1578449c
Reviewed-by: Jørgen Lind <jorgen.lind@theqtcompany.com>
2014-12-04 12:00:43 +01:00
Friedemann Kleint
8e9d78e43e QMenuBar: fix extra indent on the right with a TopLeftCorner widget.
When setting a left corner widget on a QMenuBar, the first
action rectangle is offset by its width and thus the width
should not be added to the size hint. Use QSize::expandedTo()
instead.

Task-number: QTBUG-36010
Change-Id: I660e3facbd0aeb5fb84fac8923db3e0c7998309d
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2014-12-04 06:33:03 +01:00
Thiago Macieira
9fb4c2c412 Configure: Fix detection of GCC 5
$ gcc-5 -dumpversion
5

No dots.

Change-Id: I5dd547f257718c981e7be64fca3eec980136ba3e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-12-04 00:41:09 +01:00
Thiago Macieira
5d8baf9056 Change misleading error message in QDBusReply
"no signature" is misleading and even led me to re-check the code to see
if it meant that the reply failed and no signature could be obtained.
Saying that the signature was obtained but is empty is better.

Change-Id: I1381cf53b334798125d36db0934105d15b63b84f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
2014-12-04 00:41:06 +01:00
Tor Arne Vestbø
0f88c5c1b9 qmake: Add .qmake.stash/super to QMAKE_DISTCLEAN when owned by project
Running 'make distclean' should remove all files generated by qmake,
including .qmake.stash/super. These files are considered owned by
a particular project (and hence a candidate for distclean), if it
lives in the same directory as the output dir of the project.

Task-number: QTBUG-42678
Change-Id: I224e9bac039eeacb6561e18acc7f8e867da5dab8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2014-12-03 22:06:15 +01:00
Tor Arne Vestbø
b1652b8697 Simplify GL2PaintEngine::updateTextureFilter, it doesn't need target
Change-Id: I8b71c33adb37c166bf4fc6dc8c2e7418d60fbf81
Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@theqtcompany.com>
2014-12-03 22:06:15 +01:00
Jeongmin Kim
165b1c7da1 QHttpThreadDelegate : Fix QHttpThreadDelegate don't read response data about Synchronous error reply.
The App might use response data of Synchronous 401 reply. (example : specific error info of code, string as json)
so, Added a function to read it for Sync.
Async is already OK. Sync path is different from Async path.

Change-Id: I683d4b6b40f600793d2545811dcd6644515de79c
Task-number:QTBUG-43030
Reviewed-by: Jeongmin Kim <jm86.kim@lge.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@theqtcompany.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-12-03 13:45:06 +01:00
Andrew Knight
c609a83426 ANGLE: Fix handling of shader source with fixed length
This is a cherry-pick of upstream f60fab6d154f4c9bf599e92976cd8cee7f8633e0
(See https://chromium-review.googlesource.com/231612)

Task-number: QTBUG-42882
Change-Id: I7b4bdc4b68a1b93ff514f09ce35dbf4e9360af9b
Reviewed-by: Marko Kangas <marko.kangas@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
2014-12-03 13:45:00 +01:00
Andy Shaw
2ca57e39e3 Respect the size hint signal for the column and row delegates
The sizeHintChanged() signal from the column and row delegates need to be
connected to the doItemsLayout() slot so that the view is updated when the
size hint changes.

Additionally doDelayedItemsLayout() is called to ensure that this is
up-to-date as the size hints may have changed when the new delegate was
set on the row or column.

Change-Id: I458293f05ce9ef40a03bdbcab1a6e7a10f648c89
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Kevin Puetz <PuetzKevinA@JohnDeere.com>
2014-12-03 13:31:07 +01:00
Eskil Abrahamsen Blomfeldt
ab6d645850 Android: Fix broken system palette
When we overwrite the default palette, we have to make sure
we don't overwrite default values with black for all the
colors that are not retrieved from the json file. We would
for instance get black as both the base color and text
color which would make some components unusable.

Change-Id: I1079a70a0ac7eb379ed5e8d92c6b39c2ea77ba49
Task-number: QTBUG-42812
Task-number: QTBUG-42998
Reviewed-by: BogDan Vatra <bogdan@kde.org>
Reviewed-by: J-P Nurmi <jpnurmi@theqtcompany.com>
2014-12-03 12:29:09 +01:00
Topi Reinio
457496b830 Doc: new template for qt.io online style
An online documentation template that follows the
style of qt.io site.

Update the url variable for Qt modules to point
to doc.qt.io/qt-5/.

Task-number: QTBUG-42086
Change-Id: I5428a02cd503aef2217efd7361f4c8b7b5895a52
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2014-12-03 12:20:07 +01:00
Topi Reinio
1ed09b486e Doc: Update external links to point to doc.qt.io
Task-number: QTBUG-43062
Change-Id: Ic630f0c7af20ab5ffa88a71a6ab99d42250cf272
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@theqtcompany.com>
2014-12-03 11:21:14 +01:00
Sérgio Martins
e7e6d6f95a QFontEngine_FT: Don't check for null after dereferencing.
Must have been a copy paste mistake, the check is used in other places
to make sure we don't unlockFace() without a lockFace(), but here
we're certain lockFace() was called first.

Makes Coverity happy.

Change-Id: I679129727b29a40d780f4fa903f44f7cbc9ec8cf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-12-02 18:22:06 +01:00
Joerg Bornemann
98d130fc46 fix rc compilation in vcxproj files
We don't need to modify ResourceOutputFileName. The default is fine,
and $(InputName) evaluates to nothing in VS >= 2010.

Change-Id: Ib203d36261e1b5449c5a139b1950bd0d66197297
Task-number: QTBUG-43026
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-12-02 12:27:10 +01:00
Laszlo Agocs
69d3694831 Pass cflags, not incdir, to libudev config test
The compile.test script expects -I... parameters. Passing just the
include path is therefore wrong. Pass cflags instead.

Change-Id: I0f9b155d1e710fe7d77c64a867a89290d4f31db3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-12-02 12:13:32 +01:00
Jan Arve Saether
35222edfc8 Remove unneeded call to m_editText.bringToFront()
There is no need to call bringToFront() when the item was just made to
be the last child in the two previous lines. (Child views are ordered
in stacking/paint order)

Change-Id: Ie9fbe5de6dce2bbc96cd44a8a6a779504cd0becd
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2014-12-02 12:01:41 +01:00
Jan Arve Saether
438b65bada Make sure that created surfaces are stacked on top of previous ones.
The old code would stack the new surface just below the topmost surface.
It also did not consider if the m_editText was added to the layout or
not (thus, m_layout.getChildCount() - m_nativeViews.size() - 1) was only
correct if the editText was added.

Spotted by plain code reading while investigating some accessiblity
issues.

Change-Id: I12c9f373a471c0a7ee624a47232e8952d69c9067
Reviewed-by: Christian Stromme <christian.stromme@theqtcompany.com>
2014-12-02 12:01:29 +01:00
Tor Arne Vestbø
afae4ee0b1 iOS: Guard against UIGestureRecognizer messing with self
We pass in self to initWithTarget, so we need to be sure that the
init doesn't return a new self.

Change-Id: I90d0d10d2fd1a5d38ef1ff3f23169dcce00b28e2
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2014-12-02 10:57:15 +01:00
Tor Arne Vestbø
df75cb4c09 iOS: Properly support QInputMethod's visible and animating properties
We now emit and change the 'visible' and 'animating' properties of the
QInputMethod according to the documentation, which means the 'visible'
property will change immediately when the keyboard is about to become
visible, or about to hide, and the 'animating' property will determine
if the visibility-change is just starting out, or has ended.

The keyboard rect will at all times reflect the currently visible area
of the virtual keyboard on screen (in focus-window-coordinates), not
future state after the animating completes. Getting the future state
is a missing piece of the QInputMethod API, and could be solved in
the future by adding arguments to the animatingChanged signal that
allow platform plugins to pass on the before- and after states.

The logic for determining the keyboard state has been moved into
a central function, updateKeyboardState(), which allows us to change
and emit property changes atomically. There is still some parts left
of the old approach, but these are left in to make further changes
to the code easier to diff and understand in isolation.

Change-Id: Ica52718eba503165ba101f1f82c4a425e3621002
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2014-12-02 10:57:01 +01:00
Tor Arne Vestbø
44e9e7fe19 iOS: Simplify view management in QIOSKeyboardListener
We don't need to keep track of the view-controller or add ourselves as
a gesture recognizer inside QIOSKeyboardListener. In fact, leaving the
call to removeGestureRecognizer in [QIOSKeyboardListener dealloc] will
result in QIOSKeyboardListener never being released, as the view that
we add the recognizer to will keep a strong reference to the recognizer,
so dealloc is never called unless the view is also released, which is
unlikely to happen. We now fully control the lifetime of the recognizer.

Change-Id: I6755e8cdfcc8f1062314db51aa54a2b7ecd1b967
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2014-12-02 10:56:54 +01:00
Tor Arne Vestbø
c59c8ddf1f iOS: Refactor QIOSKeyboardListener implementation and usage
QIOSKeyboardListener takes care of both maintaining the virtual keyboard
state, and acting as a gesture recognizer for the hide keyboard gesture.

We make this explicit though a union in QIOSInputContext, so that we can
access each 'mode' separately. This improved code readability and allows
later refactoring of the state and gesture into separate classes without
changing the call sites.

Change-Id: Icc60f4a542983cda7ca0fd6622963d32d1e90db9
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@theqtcompany.com>
2014-12-02 10:56:47 +01:00
Tor Arne Vestbø
1018502722 iOS: Use DISTCLEAN_DEPS instead of custom distclean target
Change-Id: I1fb6dc4c9ef3623f58a9c8412499df7b9f9ff9bf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
2014-12-02 10:54:46 +01:00
Sérgio Martins
9d2edfe524 Fix build due to source incompatible change with FreeType 2.5.4
http://git.savannah.gnu.org/cgit/freetype/freetype2.git/commit/?id=b3500af717010137046ec4076d1e1c0641e33727

../gui/text/qfontengine_ft.cpp: In member function ‘QFontEngineFT::Glyph* QFontEngineFT::loadGlyph(QFontEngineFT::QGlyphSet*, uint, QFixed, QFontEngine::GlyphFormat, bool) const’:
../gui/text/qfontengine_ft.cpp:1126:39: error: comparison between signed and unsigned integer expressions [-Werror=sign-compare]
                        for (int x = 0; x < slot->bitmap.width; x++) {

Change-Id: Idb58f9e5895aac8c02163870d7c7d4a49237086b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-12-02 10:47:15 +01:00
Albert Astals Cid
68cab0b250 QNetworkReply::abort will also call finished()
Change-Id: I86e493178bf523c47eed36015354c0fbbebd56d2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-12-02 09:11:25 +01:00
Friedemann Kleint
03c4b52e13 QLayout: Observe contents margin when positioning the menu bar.
Task-number: QTBUG-38152
Change-Id: I53ea6bce33057251265a7eca1651aeabca314ba9
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
2014-12-02 08:36:59 +01:00