Make sure that QPixelFormat is constexpr

by declaring the array of formats constexpr too.

Change-Id: I5c8e23ef9dc0fcac9c246f48dbee24c390d4583c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
QPalette: add move constructor

As with many other implicitly shared classes, efficient move semantics
requires setting the d-pointer to nullptr, which then needs to be checked
for in the dtor and the copy assignment operator.

Change-Id: I654d181a1dfdd9a16e2f9fb96b57475cdd0b4561
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Add a test for some copy semantics to QPalette

It isn't a thorough check of all the mutable methods for detaching, but a start.

Change-Id: I523fd30d3459186654e12fd25c384ed990ab7a00
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Windows: Refactor QWindowsDragCursorWindow().

QWindowsDragCursorWindow is a helper window used to display the drag
cursor when doing DnD by touch, in which case Windows hides the mouse
cursor. Base it on QRasterWindow and fix the size calculation for
device pixel ratio scaling.

Task-number: QTBUG-38858
Task-number: QTBUG-38993
Change-Id: I462ece3e5c8fe8be914e039ba391a28a77e0d771
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Restrict tooltips triggered by mouse move events to widget area.

Tooltips may occur outside the widget area when it has mouse grab.

Task-number: QTBUG-40261
Change-Id: I68c1e28ad264fc5aaeb7d96273342f1d4bca8ce6
Reviewed-by: David Faure <david.faure@kdab.com>
Implement QStringRef::split

[ChangeLog][QtCore] Added the QStringRef::split() function

Change-Id: I28709c9761785dea7be4e7d621ecf4e1ae007a72
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Add missing devicePixelRatio multiplication in QOpenGLWidget size checks

Change-Id: I142cbe536f90eca242d08b34e5f9042076525c7b
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Document the destroy/create behavior of QOpenGLContext::create()

This is not obvious since in some other classes with similar design subsequent
create() calls are ignored. In some others it results in a warning. In case of
QOpenGLContext it leads to recreating. Therefore it must be documented.

Change-Id: I16efa73ebae15b3ffc26832d8d5cc2cd5d0ed469
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
QProgressDialog: fix setBar() not properly adopting the new QProgressBar

The "adoption" code is taken from setLabel().

Task-number: QTBUG-40503
Change-Id: Id512b28eb756b4a80e5701e599e2cbdf5346ff62
Reviewed-by: David Faure <david.faure@kdab.com>
QProgressDialog: Extract Method QProgressDialogPrivate::adoptChildWidget()

The same code was used in three methods. Collect it in one place.

Change-Id: I0e3bf14474590eb99e94d240aad8158fd8fbe033
Reviewed-by: David Faure <david.faure@kdab.com>
QProgressDialog: Extract Method QProgressDialogPrivate::ensureSizeIsAtLeastSizeHint()

The code was used in five different places, time to centralize.

Change-Id: I32338bdae247169a180f59314c50a9b855cae5f0
Reviewed-by: David Faure <david.faure@kdab.com>
Micro-optimize QProgressDialogPrivate::ensureSizeIsAtLeastSizeHint()

QWidget::isVisible() is an inline call, but sizeHint() is a virtual function.
Use QSize operations to call each one only once.

Also reduces the number of q-> qualifications needed.

It must be noted that this change is not entirely behavior-preserving:
If sizeHint() returns a negative component, and the dialog is not
visible, resize() will be called with that negative component now,
instead of zero as was the case previously.

I believe this is not a problem, because the way sizeHint() is currently
implemented, the width cannot be less than 200 and for the height to be
negative, the sum of label, bar and button size hint height would need
to be negative, which is next to impossible.

Change-Id: Ie8ba110e193532921eb4732a0393a377e38d7f7e
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Add the QTabBar::changeCurrentOnDrag property.

This property indicates that the current tab will change whilst dragging
over the tabbar

[ChangeLog][QtWidgets][QTabBar] Added changeCurrentOnDrag property.

Change-Id: Ib7d5a7613c9cd8432b84c523f66c02cd6c3c3c81
Reviewed-by: David Faure <david.faure@kdab.com>
Remove specific maemo/meego codepaths

We no longer support the maemo/meego platform, so we can remove the
specific code for that platform.

Change-Id: Ia7f0730eba2d96794b97b7ca4753f63a2d7bc2a8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Be consistent in GrayScale vs Grayscale naming

The enum GrayScale was renamed Grayscale without similarly changing the
helper class for the same enum.

Change-Id: Ie1b34a68654f22a843ce4cfc2ddc1bf06af8dea1
Reviewed-by: Axel Rasmussen <axel.rasmussen1@gmail.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Add debug operator for QTouchEvent::TouchPoint

dfde72e4361d82a782cb4da08ddcd0d8e8c40b07 added debug support for
QWindowSystemInterface::TouchPoint, which is useful only near the
QPA interface; but in qtdeclarative it's useful to be able to log
individual touch points too.

Change-Id: I237d354d7018e6326e586ae3355c8aa6f781eff8
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QPlatformMenu: add overloaded function 'showPopup' that takes a target rect

When showing an edit menu on touch platforms, you need to specify a target
rect for where to place the menu. The target rect is normally a rectangle
that encompasses the whole text selection. Using this information the OS
will place the menu so that is doesn't obscure the selection itself, or fall
outside the screen (or overlaps e.g the keyboard). Since we don't know the
size of the menu, or if the OS will end up placing the menu above or below the
pos we give it, we need to do it the correct way and forward the whole target
rect instead.

Change-Id: I638586e9d0dd14c430a22c403c6dce099192a075
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>