Compile windowflags/windowgeometry manual tests against 4.8.

Change-Id: I3611fe752168729f3605e0f451d487ca3e10d09d
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Add an empty dist/changes-5.1.0 file

Change-Id: I687fb48b125f108d7ffb3f042d7e8d5d79d67945
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Repair QGraphicsWidget focus chain when used with ItemIsPanel.

Add handling of the focus chain to QGraphicsItem::setFlags(), so that
the focus chain is repaired (panels pop out of the chain and non-panels
merge back in) when the ItemIsPanel flag is toggled. Add handling focus
chain to QGraphicsWidgetPrivate::fixFocusChainBeforeReparenting for
panels.

Before this fix, you must enable the ItemIsPanel flag before adding
the item as a child to a parent panel, and you lose focus when using
the tab key to focus around a panel after it has been reparented into
another panel.

Task-number: QTBUG-28187
Change-Id: I1d0d81a90697eaf715a8a337c8bf6c2159329e68
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
qdoc: Fix warnings about unused variables.

Change-Id: Ic75518aaea3a080aee656637335f358304191b94
Reviewed-by: Martin Smith <martin.smith@digia.com>
Remove some dead code from QLabel::paintEvent()

The code removed was in a if (d->control) block and therefore d->control
was always going to be true thus rendering the nested if invalid. The
case that this would account for is already handled in the else for the
parent if so this code is in effect not needed.

Change-Id: I799383e238560a8a8e3d7dc073d3b1ee74269f90
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
add auto-detect system language in i18n example

It makes this example more complete since we move
linguist related examples into qttools

Task-number: QTBUG-28434
Change-Id: Ic6bbbd2702b5a0a304b5e8ce59da37ef95e4b42e
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
tst_QDialogButtonBox: fix typos

Change-Id: Iaf1b0ec47894cce7c5be702b2fad3106249cffd2
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
QNX: QQnxCursor implementation.

Implementation of QQnxCursor, a QPlatformCursor subclass. Due to the lack of a
proper cursor API from the underlying OS, this class only caches the current
cursor position to make sure that the QCursor class works properly.

Change-Id: I55031184a009f3b26ad4af36b1975204e8fa80dc
Reviewed-by: Sérgio Martins <sergio.martins.qnx@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Nicolas Arnaud-Cormos <nicolas@kdab.com>
No reason to dynamically resolve NotifyWinEvent anymore

It has been available in user32.dll since
Windows2000/Windows Server 2003

Change-Id: Icbfc63e944bc9e8098e3b01fd57dc7aa45bcd345
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
QNX: adjust settings for separate debug info feature

Patch-by: Greg Bentz
Task-number: QTBUG-28247
Change-Id: Ibd1f959969a8678b828c8e8de8be0a200a632b22
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Reviewed-by: Greg Bentz <gbentz@rim.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Elaborate shortDayName(), etc using default locale.

QDate::toString() should explain QDate::shortDayName() and
QDate::shortMonthName() will be localized name using the
default locale from the system.

Task-number: QTBUG-28522
Change-Id: I027a72773b5772bf00344f14a4b522e41c9e63db
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Make sure panels always gain focus when activated or tab is pressed.

This changes behavior, but I would argue it's a good change. If you
create a panel and activate it (e.g., by simply showing it or reparenting
it onto an already-visible item), you expect the panel to gain focus /
which is sort of the whole point of activating it. Prior to this change,
you had to have explicitly called setFocus() on one of the panel's
children, which would give that item subfocus, for that item to auto-
gain focus when the panel was activated. This change makes it more
automatic. If the panel itself or any of the widgets in its focus chain
can gain focus, they will gain focus when the panel is activated.

So the new logic is - if the panel already has a focus item, so if
someone explicitly set subfocus on an item before the panel is shown,
that item gets focus. Otherwise, if the panel itself can gain focus
(e.g., someone makes a line edit / text edit panel), it gains focus
when activated. Otherwise, we search the focus chain until we find
the first item that can gain focus. This last case is the file dialog
case, where the dialog itself can't gain focus but typically the
first item in the focus chain is the primary focus widget, such as
the search field or the directory list view.

The change also fixes this for the first Tab. If you clear focus on
a panel, the user expects to be able to press Tab to regain focus.
Prior to this change that didn't happen. Now, the panel or the first
in the focus chain that can get focus gets focus on first tab.

Task-number: QTBUG-28194
Change-Id: Id7ec1741d0d5eb4ea845469909c8d684e14017f1
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Fix building of the painting examples that use shared code

Task-number: QTCREATORBUG-8437

Change-Id: I66031184a009f3b26ad4af36b1975204e8fa80dc
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Add new signal: QGraphicsScene::focusItemChanged().

This signal is emitted by QGraphicsScene whenever focus changes in the
scene (i.e., when an item gains or loses input focus, or when focus
passes from one item to another). You can connect to this signal if you
need to keep track of when other items gain input focus. It is
particularily useful for implementing virtual keyboards, input methods,
and cursor items.

Task-number: QTBUG-10570
Change-Id: I9cbbd9a2d15d6f568e1597c2c33ec049eb70f793
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Deactivating an inactive panel no longer causes unwanted deactivation.

QGraphicsItem::setActive() is by design not guarded against calls that
do not change the current activation state of the item (e.g., calling
setActive(true) on an active item or calling setActive(false) on an
inactive item). This is to ensure that it's possible to set explicit
activation state on items, either before they are added to a scene, or
while the scene itself is inactive.

Before this fix, calling setActive(false) on a panel item that is not
currently active would by accident clear activation from any other
panel that might have focus. After this fix, activation is only cleared
if the item setActive() was called on itself is the active panel, or
is the panel that will regain activation once the scene is reactivated.

Task-number: QTBUG-28544
Change-Id: Ic4752f1e4400f9a0660bc968834747610212bb52
Reviewed-by: Bjørn Erik Nilsen <post@bjoernen.com>
Reviewed-by: Andreas Aardal Hanssen <andreas@hanssen.name>
Reviewed-by: Yoann Lopes <yoann.lopes@digia.com>
Change behaviour of selectRow, selectColumn, unselectRow, unselectColumn

According to the comments of selectRow and selectColumn, the expected
behaviour of this method was to select a row or a column and unselect
any cell that were previously selected. However the actual behavior
was to select only one cell and not deselect any cell.

Moreover, according to the specification there's no simple way of
selecting multiple rows or columns as when one of the methods is
called for selecting one row or column the others should be
unselected.

The specification was changed not to require the rest of the cells
to be deselected, although they might be deselected if the
selectionMode requires that in order for the new row/column to be
selected.

The implementation of these methods was changed in QAccessibleTable
and QAccessibleTree to select the whole row/column and take into
acount selectionMode and selectionBehavior.

tst_qaccessibility.cpp was modified to test the new behaviour of
the methods.

Change-Id: I29635d014792169302435e81704e02c16f951238
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Remove usage of qt_mac_get_scaleFactor() as it is no longer needed

qt_mac_get_scaleFactor() uses a deprecated function, but as this
function is no longer needed internally anyway, just remove it.

Task-number: QTBUG-28574
Change-Id: I4e3cd2383ecc56aa6f9e3931a1806c62b1cedeb5
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Add QChar::Script enum

...where the values are not aliased to Common script.

The old QUnicodeTables::Script enum was retained for compatibility reasons
until Qt internals are updated to use QChar::script().
Using QChar::Script instead of QUnicodeTables::Script would improve both
the text analysis (itemization, boundary finding) and the text shaping quality.
This also a required step for switching to Hurfbuzz-NG.

/* This adds 6668 more .rodata bytes */

Change-Id: I5aa3d12c550528d0052542436990f8d0779ea8e5
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
QMessageBox: Add property 'textInteractionFlags'.

Change-Id: Ia7a4801599f18a1202aa89f54e48066e3d271bfb
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Fix typo in QWidget::setLayout() documentation.

Change-Id: I4882f01b980d7b89e54be2eeacc3a83fd014d0fe
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>