CustomDialogs example: add an example using Calendar

Also the spinbox exmample will accept when the user presses enter.

Change-Id: I47765899acfbc435e2409f7a30e54e8f041b6e73
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
Add styleData.totalWidth for TabViewStyle::tab

[ChangeLog][QtQuickControls][Styles] Added styleData.totalWidth
property for TabViewStyle::tab component.

Task-number: QTBUG-37021
Change-Id: I76c29d132602926d9dacf690b09f556292359bf6
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
TableView: fix activeFocusOnTab behavior

Autotest is included.

Task-number: QTBUG-36950
Change-Id: I94c5b5225437ce87365740ea7423b09737dd275a
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Fix initial incorrect value for Switch

Task-number: QTBUG-36910

We would sometimes get the incorrect value for switch.
This patch doesn't radically change the logic but it makes the
initial value assignment a binding rather than depend on
oncompleted. I also slightly cleaned up and simplified the
logic.

Change-Id: I001494a5f9f3a421a5c755a7fed1f9be09d918bd
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Support text alignment for TableViewHeader

task-number: QTBUG-33072
[ChangeLog][QtQuickControls][TableView] TableView headers
now respect TableViewColumn::textAlignment

Change-Id: I482e74e10b8879b367bce8165fa9310b28a06ad2
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
TableView: Make "model" property consistent with ListView

[ChangeLog][QtQuickControls][TableView] "model" property exposed
to delegates is now consistent with ListView behavior.

task-number: QTBUG-33107
Change-Id: I8315c32a9d8beda9901ed65b552f0b8a587316ee
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Set baselineOffset on Styles/Base correctly

Fixes the baselineOffset for TextField and SpinBox

Task-number: QTBUG-36529
Change-Id: I697d4c8bc2ee61929eabb54a6ec6520311a4e3e2
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Close popup windows when application state changes

Nobody is telling the popup to close. If it was, that was probably as a
side effect of the Qt::Popup flag on some platforms. Certainly not on
Windows.

We check for the application state as the application may use a popup
to signal the user about some event happening, and we don't want to close
the popup as soon as the user makes the application active again.

Task-number: QTBUG-36474
Change-Id: If41f7bec696105e3c7d8897e9af5fc075c7b8933
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Revise tst_applicationwindow

Use more reliable/applicable waitForRendering(item) instead of wait(0)
and make the window visible before testing content item geometry.

Task-number: QTBUG-36938
Change-Id: I414749019d1fca01c09ab3361c0355d231b2bcb3
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Add Calendar to testbench.

Change-Id: Id8c636c768afd9eecba5517c66371dde179fd998
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
changes to MessageDialog click(StandardButton, ButtonRole) signal/slot

After f212322a6ecb237d5fb53e56c6dafffb87e45f09 there was a warning
about failing to connect QMessageBoxHelper::clicked to this slot.
Also accept() and reject() are not signals so they should not be
called with emit.

Task-number: QTBUG-36988
Change-Id: I1752ec08cbe82cc2bd9ffc9d920c1487bc17fa76
Reviewed-by: Berthold Krevert <berthold.krevert@basyskom.com>
Reviewed-by: Liang Qi <liang.qi@digia.com>
MessageDialog: press escape or titlebar close button to dismiss

QMessageBox is a bit special compared to other dialogs, but we don't
need it to be so special in QtQuick.Dialogs.  Also on OSX, cmd-period
will dismiss the dialog, regardless whether it is a QMessageBox or
the QML implementation.

Task-number: QTBUG-36227
Change-Id: I5dd43080600e9c3774990190bb401291efb8e742
Reviewed-by: Liang Qi <liang.qi@digia.com>
Dialogs: fix compiler warning

StandardButton is a 32-bit type again.

Change-Id: I8aba4150cee169ef837891e9d72a64d48db32346
Reviewed-by: Liang Qi <liang.qi@digia.com>
Avoid warning when maximum size < minimum size

This only happens in intermediate states, where both *minimumHeight*
and *maximumHeight* is supposed to be updated.
However, since the order of the bindings is not know, we might
have intermediate states where minimumHeight > maximumHeight.

In our case minimumHeight was set first to a smaller size than
maximumHeight, this would trigger the height binding, causing it to try
to set its geometry while its minimumHeight and maximumHeight properties
were not in sync.

This also happened when maximumWidth < minimumWidth.

The output was something like this:

qwindowswindow.cpp(1306):QWindowsWindow::setGeometry: Attempt to set a
size (116x190) violating the constraints(0x200 - 16777215x190) on
window ApplicationWindow_QMLTYPE_12_QML_51/''

Change-Id: Ia4f6e340b608bb4cff5a35bc887adc4eea7efbad
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Fix gray SpinBox background on mac

This is a regression caused by removing the fillrect for SpinBoxStyle
itself.

Change-Id: Ibab509634a12aec591d2d031a0e735d602b388c6
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Fix some typos

Change-Id: Ic2e2060b57b0d74e96d6aad0ceff4679d986a26c
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
MenuBarStyle: Fix metrics, selected appearance

On Windows, this depends on qtbase's
Ia35a73274cc10b3b5a3f55573c92919f99555db0.

Change-Id: If513cefadc052cb1450554f2e6e8af2abac02734
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
MenuStyle: Fix popup margins for Desktop

Change-Id: Iacf17af64cc9df0518a7b29a4a7817d7c69d7539
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Bump version number of controls in qdoc

This fixes the imports to say QtQuick.Controls 1.2

Change-Id: I09de1740f7ae5f433c2f8c6d7f4bdbd9c6042bd4
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
MenuStyle: Adding missing 'submenuPopupDelay' property

This amends e88bdffe644e53912dfbce95117555cb6a87bfd2
API-wise.

Change-Id: I9243aa05c3c4803e1c3ee08a761e782ee8e0841a
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>