QMainWindow: Observe left contents margin when positioning status bar.

Task-number: QTBUG-38152
Change-Id: I4c762a113dbfe47472d1087aa34c0e327083ee16
Reviewed-by: Jan Arve Sæther <jan-arve.saether@theqtcompany.com>
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>
QNetworkReply::abort will also call finished()

Change-Id: I86e493178bf523c47eed36015354c0fbbebd56d2
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
iOS: Use DISTCLEAN_DEPS instead of custom distclean target

Change-Id: I1fb6dc4c9ef3623f58a9c8412499df7b9f9ff9bf
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@theqtcompany.com>
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>
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>
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>
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>
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>
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>
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>
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>