mkspec (iOS): use QTPLUGIN.platforms=-

After bbcdccd, a deprecation warning is written to
the console every time you run qmake on iOS.

This change will make use of the new QTPLUGIN.platforms=-
instead if the deprecated CONFIG -= import_qpa_plugin

Change-Id: I51e4f9d18f6abd87512a39b3236b89d5444fd6c1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
printsupport: only build cocoa backend for OS X

Cocoa is not available on iOS, so the plugin should not be
built. But recent build system changes exposed that we did.

Change-Id: I000d54b330a075abb8f4a8b28a970bb5b5edfeb5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Fix incorrect repaints with plain text edit

The plain text edit's smart repaint logic in
QPlainTextDocumentLayout::documentChanged assumes that during a change inside
just one block, the block is in the state before the edit and a call to
layoutBlock() is going to bring it up-to-date. Then only a comparison of the
bounding rect - before and after - is going to allow for smart repaints.

The assumption of the layout being in the same state as before the edit got
broken by commit cc57a2e90f18a39ce3c74b6ad0db9a64aa135ddf, which introduced
code to use a QTextCursor within a slot connected to QTextDocument's
contentsChange signal. The usage of the QTextCursor there ends up updating the
layout of the block ahead of time, breaking the assumption and therefore the
optimization, in the sense that during changes in the preedit that cause a
change of height / line count, the old bounding rect in
QPlainTextDocumentLayout::documentChanged and the new bounding rect will be the
same. This causes a repaint of only the edited block, missing repaints of the
following blocks, even though the line count effectively changed.

So what's causing QTextCursor to mess with the layout is the attempt of
updating the vertical movement x property. This patch inhibits the update,
marking it as dirty for initialization later. This means that slots connected
to this low-level signal cannot rely on the cursor's visual x position, but
that doesn't seem useful anyway and isn't required for commit
cc57a2e90f18a39ce3c74b6ad0db9a64aa135ddf.

Task-number: QTBUG-38536
Change-Id: I5fae12d646a4b2d2cc22b9f2d021e5dc8cfdda94
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Fix assert on justification of QTextLine with only spaces

In the justification code, we unconditionally subtracted one
from the line_length, but then compared the result to 0 afterwards,
so we did not support when the line_length is 0 initially, which
can happen if it only consists of spaces (in which case
trailingSpaces will be non-zero and line_length will be zero.)
The fix is to bail out for both strings of length 1 and length 0.

[ChangeLog][Text] Fixed an assert when justifying a QTextLine
which only contains spaces.

Task-number: QTBUG-38520
Change-Id: Ib04993f47eb2f9f7fc49c4a5400f18f9682a72f2
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>