Remove old symbols from QOpenGLContext

Task-number: QTBUG-38564
Change-Id: I39a0482e4411cdc644ed34813626c39dacb5b6af
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Fix identical sub-expressions in comparison

Found by static analyzer (see http://www.viva64.com/en/b/0251/).

Change-Id: I611def790a98abf7574e96e6039f10714316d81e
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
[QtSql][QSqlTableModel] fix failure to refresh in selectRow()

Caused by missing braces, leaving the break outside the scope of the if clause.

Task-number: QTBUG-38509
Change-Id: I6b0a7f34512a3a9b0fbd790116f81f54f4a91cf0
Reviewed-by: Tobias Koenig <tobias.koenig.qnx@kdab.com>
Reviewed-by: Mark Brand <mabrand@mabrand.nl>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
iOS: Send application state changes synchronously

The user might have a limited time to react when the application is
suspended, so we need to send the event as soon as possible.

Change-Id: Ib6c342f5426cf15e36ba4ef57edf30878f86d1c9
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Doc: Remove Qt Core documentation dependency to Qt QML

When generating documentation, the Qt namespace declared in Qt Core
collides with the Qt global object declared in Qt QML. This caused
the C++ Qt namespace documentation to go missing.

This change works around the issue by removing the dependency
between Qt Core and Qt QML.

Task-number: QTBUG-38630
Change-Id: Ifd250a19c476bc30e2a2ed561573c8b6b3b2dba5
Reviewed-by: Martin Smith <martin.smith@digia.com>
Avoid reentering processMouseEvents on embedded

Task-number: QTBUG-38597
Change-Id: I168c9401863bace711d0d8409bf3da30a34185bd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
centralize auxiliary lib creation

this covers convenience libraries which are linked into dlls (if we are
not building statically) and "proper" (installed) builds of 3rdparty
code.

Change-Id: I2f00248c0baa0e73346e477724bf49bbc62ba925
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Fix font fallback handling with Harfbuzz and CoreText

Comparing CGFontRefs is not reliable it seems, CFEqual on them appears
to compare pointers and there's no guarantee that CTFontCopyGraphicsFont
returns the same pointer all the time.

So instead let's compare CTFontRefs, which we keep around and also provide
as input to CoreText shaping.

Task-number: 38363
Change-Id: I6073ea88f0c9f5ebf49d17cba0d76041ade32570
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
install convenience libraries when building statically

we don't link static libs into other static libs, so the intermediate
libs need to be installed and resolved at app link time.

Task-number: QTBUG-32519
Change-Id: I0558140f98a6938b03306df7f800d66f8a19a7cd
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jeremy Lainé <jeremy.laine@m4x.org>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Fix double release in QTimeZone on Mac

m_nstz is released in the destructor but
not retained when using the QTimeZone(QByteArray)
constructor.

Task-number: QTBUG-35890
Task-number: QTBUG-37582
Change-Id: Ia569830bcd3c2f2cea04ad6696e681c4f2a3c137
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Revert "Mac: fix bugs for font selection in QFontDialog"

This reverts commit 3c09f6bc9aee0c97427fe8da6efdc73b4ac473aa.

After fbaa6d3ca6fc2693c5c8a1cd8e565803adc97730, OS X/iOS no longer
uses localized font names.

Task-number: QTBUG-38548

Conflicts:
	src/gui/text/qfontdatabase.cpp

Change-Id: Id7f7e1976e4ffc30c5c18cf57e2acb3aebafc301
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
iOS: Send updated expose events on application background/foregrounding

When an application has background processing enabled, for example for
communicating with an external accessory or getting location updates,
it might trigger code that does UI updates, which will kill the app as
doing UI in the background is not allowed on iOS.

We guard against this by propagating the backgrounding as updated expose
events with a non-exposed region and isExposed() returning false. This
means clients who correctly use QWindow::isExposed() to guard their
drawing code (including the scene-graph), will live to see another day.

Task-number: QTBUG-36956
Change-Id: Ib708394d33093affe68c9f2c7abde7e54be5ec74
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
QCocoaPrintDevice: Compile on Mac OS 10.6

MAXPATHLEN is not defined, use PATH_MAX.

Change-Id: I5a8febce66584c15bdfe81df64fe3f1954972a47
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Logging: Mention 'best practices' for using QLoggingCategory

QLoggingCategory objects are meant to be mere 'handles' for the
registry. It's therefore not recommended to
- manipulate them directly (via setEnabled()), except in a filter
- export them across module boundaries
- subclass them

Subclassing QLoggingCategory also breaks compilations in a certain
circumstances (no variadic macros).

Task-number: QTBUG-37283
Change-Id: Ib12fb43d955902c7fa4583296d64afc5eca01200
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
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>
Cocoa QPA Menu: Clear menu items' Cocoa ancestor on destruction

Valid for both the item and the menu destructions.

Task-number: QTBUG-38685
Change-Id: I024b93c8bb8facefeaad5e8b6c7be6bf049898ea
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Fix more double release in QTimeZone on Mac

Several objects are released without being retained.
This causes double free crash.

Task-number: QTBUG-37582
Task-number: QTBUG-35890
Change-Id: Ic64419c22ab555ba77ada1864feaff247798d3ad
Reviewed-by: Jake Petroules <jake.petroules@petroules.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>