Cocoa: Improve expose event handling.

Send expose events on window and view show/hide
notifications. Implement QCocoaWindow::isExposed.

Close all windows on quit. This allows sending (de-)expose
events for those windows while the event loop is running.

Remove the flushWindowSystemEvents call in setVisible.
This function is called from application code. Flushing
window system events here is wrong since it can lead
to events being processed in the middle of the user
code call stack. flushWindowSystemEvents should only
be called as a result of (native) window system activity.

Skip one of the tst_qtooltip tests which becomes unstable/
fails in the CI system as a result of this change.

Task-number: QTBUG-29583
Change-Id: I3fb8b3f77e2b2e19dfeafba5d7dfcef602891d37
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
qdoc: Don't document QML signal handlers

qdoc now ignores QML signal handler comments
and does not report errors for missing QML
signal handler documentation.

Task-number: QTBUG-29993
Change-Id: If2daae80944c8b85312d38d4ee8c07ebe1f79001
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Fixed potential access violation in QPixmap::copy() for <32 bit pixmaps.

QImage is supposed to maintain the invariant that each scan-line begins
on a 4-byte boundary, so we need to verify that this is the case before
using the optimized path of short-cutting QImage::copy() by referencing
the source image's bits directly.

Task-number: QTBUG-14766
Change-Id: I0a178aeb2f34cc64f98deae9470b55b5c53fcb06
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Mac: Fix inactive window appearance

The inactive palette values were set to be the same as the disabled
palettte whereas, on Mac, they are the same as the active palette.

Also, some of the logic to draw inactive looking widgets was a bit
dubious. Add to that the fact that HITheme is not responding to
kThemeStateInactive as expected, or so it looks.

Task-number: QTBUG-29860
Change-Id: I5d67765a9411a40449a8a4440276b2fad167f7c4
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
QIcon: ensure that QIconLoader is initialized

Make sure that QIconLoader is initialized when QIcon::themeName()
is called. Otherwise, themeName() may return the wrong value.

Change-Id: I54621e31da24bdbe745e7d6ae6a1d58cb4190cd7
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
require modules to define their version

otherwise they would inherit it from qtbase, which may effectively
result in a lie if building against a different release.

for convenience we define the version centrally per repo.
qtbase is special, in that we use the version defined in qglobal.h to
avoid defining it redundantly (the instance in qglobal.h is currently
needed to bootstrap qmake; the configures would need some work to change
this).

Task-number: QTBUG-29838
Change-Id: Ie9a5b0ff0d64b69ff2d34af2f7c42d6278e957cc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Correct sentence in QNetworkProxy::setApplicationProxy() documentation.

Change-Id: I46fa7f814901cbe6a1f8f003f461bf1eee6f8bde
Reviewed-by: Shane Kearns <shane.kearns@accenture.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Jonas Gastal <jgastal@gmail.com>
Cocoa: Fix shadowless popups

The window shadow was never invalidated after setting the transparency
mask. We now do it right after the first draw after setting the mask.

Change-Id: Icc5c6002d25abeb25d58ee4d1f868e928121ae9b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Cocoa: Pick right rectangle when rendering window mask

Ususally, the object setting the mask knows better than the window,
since the latter may not have had its size set by then.

Task-number: QTBUG-29856
Change-Id: Ib24d452a98a76b57f5d9236d5fa1ba4755cf0840
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
remove some cryptic code relating to output directories

the purpose of it is truly elusive - the output directory is maintained
by the surrounding code anyway.

Change-Id: Id1a481d85a7b83ab0676ef650c900414d0ba83b3
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Correct QLocale(const QString &) documentation.

Change-Id: I6430ff2636083204fa12437980626260f848e269
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Attempt to stabilize tst_qgl::graphicsViewClipping().

Make sure the graphics view is exposed and has been painted before
trying to grab the framebuffer.

Task-number: QTBUG-29943
Change-Id: I2945cb78b58265864744a0d5fc99fb430306b578
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Fixed dashes being rendered differently depending on system clip.

We need to clip lines to the unclipped device rect in the case of
dashing, since otherwise the dashes will be shifted and rendered
differently when partial repaints are done.

Task-number: QTBUG-24762
Change-Id: I3599b54baa552acc20bf8cc2e12f846b45f6019e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Stabilize tst_qclipboard.

If the process terminates while QApplication::processEvents()
runs, the subsequent waitForFinished() returns false and the test
fails.

Task-number: QTBUG-29951
Change-Id: I41f461358920ad430951613dd919885f68ae212c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Update the documentation for C++11 initializer lists support

The documentation was written for 4.8 when the C++11 standard did not have the
name yet.

Change-Id: I08640a5ae62385b09e181eefafd4cc831e4de456
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
qdoc: Initialize an uninitialized variable

qdoc already ignores QML signal handler comments
and does not report errors for missing QML signal
handler documentation. but the test case for this
bug revealed a separate bug. The test case contains
no import statements, which, technically is legal
but probably won't happen. Still, qdoc failed to
generate output for the test case QML file because
it didn't contain an import statement before the
first qdoc comment. This was caused by an
uninitialized variable, which has now been fixed.

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

Conflicts:
	tests/auto/opengl/qgl/tst_qgl.cpp

Change-Id: I3c601351c984c1f4b00478d3c47ac9eeb021e892
Fix static builds with ICU

Make sure we actually link against the static version of the ICU libs for
static builds.

Task-number: QTBUG-29478

Change-Id: Ida7b439f11c5393bee43bfe804f9ec84bf272b34
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Revert 6497649730daeab5d3dfac7e806105e99a237656 and clarify docs.

It introduced a regression by requiring that a p/P was also present:

QTime time = QTime::currentTime();
qDebug() << time.toString("h:mm:ss a");
// Outputs "10:05:42 am" in Qt 4.8.
// Outputs "10:05:42 a" with 6497649730daeab5d3dfac7e806105e99a237656.

This patch also clarifies the QTime::toString(QString) documentation.

Change-Id: I4d73a959c2ca76304f03a4ce9717b540ad4e8811
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Correct QString's warnings involving QRegularExpression.

Replaces "QRegularExpresssion" with "QRegularExpression" and adds some
auto tests for the warning itself.

Task-number: QTBUG-30054

Change-Id: Iba333a4388795eccca809fb430c295f503794263
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>