Fix the update of TabView.currentIndex when inserting/removing tabs

- Update currentIndex when adding or inserting tabs.
- Make sure that we update the current index before updating the array
  to avoid a state of currentIndex > count -1 when removing the
  last tab, where a property binding on TabView.count could try
  fetching a tab past the array limit through TabView.getTab.
- Only decrease currentIndex when removedIndex <= currentIndex to
  keep the current tab active when possible. Activate the next tab
  instead of the previous one when the current tab is removed to make
  it more instinctive to remove multiple tabs successively.
- Keep the current behavior of leaving currentIndex to 0 when
  removing the last tab.

Change-Id: I030b86a03ce73f1177b1f04857abbdc2f7ec5835
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Fix typo and add missing period to GridLayout documentation.

Change-Id: I200601a11935c3054c4b876fb9bf2e29ecf48c2d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
TabBar: fix a typo

Task-number: QTBUG-38819
Change-Id: I2ca82e5f5aa64f515225f7da262adb4d9b239802
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Doc: modified wrong default value

Task-number: QTBUG-38772
Change-Id: I8e9c0c6e510e264f1bd262961056489c75fddf83
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Fix TableViewStyle::rowDelegate docs

Change-Id: I27b0347192def2ebfd761401a037f36d7207b2f5
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Use RotationAnimator in the BusyIndicatorStyle example snippet

Using NumberAnimation is a bad example, because it won't actually
animate when the app is busy.

Change-Id: I877a7226c5985f446f6ed6c6f6e709f2296b39ca
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Fix CalendarStyle's layouting and grid cell calculation.

 - Wrap all panel items within a container, so that the frame width
   checks happen in only one place, and the other items don't need to
   care about it.
 - Move the logic involving grid line width into CalendarUtils, so
   that the style code can be for styling and not maths.

Task-number: QTBUG-38847
Change-Id: I99a1f131b9cd608f3f7a7627d51a75780a6cbac2
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Fix selection handling in texteditor example

Task-number: QTBUG-31784
Change-Id: I7122abbfd346edd85f17c54dfde37db93a1ba0fc
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Don't allow navigation to previous/next month when dragging mouse.

When dragging the mouse over the calendar and a date from a previous
month is hit, it will change the visible month to that month.
This becomes worse when dragging the mouse between in the start/end of
the calendar, because there are usually several days shown from the
previous month, and the calendar quickly goes back several months.

[ChangeLog][Calendar] Calendar no longer selects dates
in the next/previous month when dragging the mouse.

Task-number: QTBUG-38848
Change-Id: I0b9bc727a05397a8e4f1280e16c91e39e160bf4a
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Scroll the parent mouse areas when reaching the bounds of a ScrollView

Change-Id: I18da235e81fa7547b78b623257226dd4a745b518
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Remove redundant button clicked handler in QQuickMessageBox

Change c286b4fccb2d83fcc01b21913b95c5e4f21f2982 added the
QQuickAbstractMessageDialog::click() handler, which made the
QQuickMessageDialog::clicked() handler redundant.
(cherry-picked from qtdeclarative/a5669568904b37b1d6b297e7190d18306e198604)

Change-Id: Ifd770a3c67b35fd9a4929fc55b9e5298c36fb960
Task-number: QTBUG-35933
Reviewed-by: Liang Qi <liang.qi@digia.com>
Dialogs: avoid setting invalid geometry

QRect::setX() and setY() can change the width and height, even to a
negative value, which will make the dialog's intended geometry invalid.
The intention was that QQuickAbstractDialog::setX() and setY() should
move the window, so it should be done with QRect::moveLeft and moveTop.

Task-number: QTBUG-38898
Change-Id: I59104395ed39b09f6b7a99eb177820edb5e46cf6
Reviewed-by: Liang Qi <liang.qi@digia.com>
TableView: fix the position of "filled" rows

On desktop the content cannot be scrolled when there are empty filled
rows, but on touch the content can be still flicked so the empty filled
rows must move together with the content.

Change-Id: I82e27d26a332d54c051e5d7bf9e1e0ab8e205f76
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
TextFieldStyle: more fool-proof size calculation

This ensures that such style gets a sensible default size:

    TextField {
        text: "Hello"
        style: TextFieldStyle {
            font.pixelSize: 30
            background: Rectangle { color:"lightgray" }
        }
    }

Change-Id: I370d8ad324cda09c9b085191ab452c4f8994d1d9
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Fixed QML binding loop warning.

Change-Id: I1339949afa6aeb659baf7186cbcb7a714d9826a3
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Merge remote-tracking branch 'origin/release' into stable

Change-Id: Ibe2ec06eabd5a60a5f9a98008eba6079fac048bd
TableView: cleanup unused Text left over

It has gone unnoticed for a long time ever since 47ef1a5f. As
far as I can see, it never was actually used for anything...

Change-Id: I28045ca8ba3ecec6869aed1eeebcaab7c2866e93
Reviewed-by: Caroline Chao <caroline.chao@digia.com>
Merge remote-tracking branch 'origin/stable' into wip/tizen

Change-Id: I9292bb9319c5a5cad8904a63803464fcad1aa07f