Cocoa: Clear window hash entry in ~QCocoaWindow.

The Cocoa platform plugin maintains a NSWindow->
QCocoaWindow hash.

Hash entries was not properly cleared on QCocoaWindow
destruction. Add call to clear the entry for the
destroyed window. Make QCocoaIntegration remove
the key from the hash in this case instead of
setting it to 0.

Task-number: QTBUG-37597
Change-Id: I3adaeee45069aea1d2ecacd948298302eafe1929
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Update Copyright year in commercial nag screens

Change-Id: I70420c44c018dbe733a50badb7f9f7f419459f7a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Android: Fix flashing on startup/shutdown

There were several issues on startup of the application which
were caused by the fact that we would get the wrong
available screen geometry on startup, set this as the
initial surface size and then expose native windows with this
size. This would cause first a flicker of white on the early
expose and the window contents to jump around as the window was
resized to the actual available space on screen.

The fix for this is to postpone the first expose until we have
actually got a proper screen size from the main layout. We use
width,height = 0 as an indicator that the available geometry
is not yet known, and we skip posting any expose events before
this is set by the layout.

In addition, since we removed the surface before we shut down
the application, it was by a white rectangle before the
shutdown transition happens, and this white rectangle will
be animated instead of application contents.

To rectify this, we make sure the last surface in the stack
remains in the layout until it is either replaced by a different
surface or until the application has shut down. This way, the
shutdown animation will work on this surface instead.

[ChangeLog][Android] Fixed regression where there would be flickering
on startup and shutdown of the application.

Task-number: QTBUG-38960
Change-Id: Ia1579ca8c522d8beeab066f78070ad49009d0238
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Android: Support offscreen surfaces on pbuffers

This is pretty much the same thing that eglfs does.

Task-number: QTBUG-38960
Change-Id: Ibf310ca8e3a4e31e5310ab3a3d3e851eae31a4ad
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Android: Repaint affected areas when window moves

There are no automatic updates of the window when it moves, since
this is not required on most platforms. This broke drag and drop on
Android, because drag and drop creates a temporary window containing
a pixmap with a snapshot of its content. We need to make sure the old
and new location of the window is repainted when it has moved.

[ChangeLog][Android] Fixed repaint issues in drag and drop.

Task-number: QTBUG-35975
Change-Id: I7b043d728551d9963fb5acec804fb90aec5b50ff
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Do not clear default button in QMessageBox::setDetailedText().

Store the value of QMessageBoxPrivate::autoAddOkButton
temporarily when automatically adding the "Show Details..."
button.

Task-number: QTBUG-39334
Change-Id: I173c83893548ee83b3d8ea2743f87686c32657e7
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Properly escape bytearray data outside the ascii range when using a codec

Some codecs can't handle the range outside ascii properly and would then
fail to read the data back in correctly.

Task-number: QTBUG-15543
Change-Id: I4c02921e787a939eeec0c7a11603b5896d756aef
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
QApp: Method to check for native style usage.

Adds QApplicationPrivate::usesNativeStyle to check whether the
QApplication is using the native platform style.

This can be needed internally to decided whether to let the platform
plugins do stuff or do it interally, style dependent. E.g. letting the
platform plugin popup a QMenu vs. letting the style draw one.

Change-Id: Ibb5e11a4d9d1d2824685ff146786a9354ceef43c
Reviewed-by: BogDan Vatra <bogdan@kde.org>
qfreelist: fix data race on v[at].next

Detected by clang's -fsanitize=thread in tst_qcoreapplication.

Task-number: QTBUG-39024
Change-Id: I60b7cece0384f89dc62ac5128faf39a4084e72e2
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Doc: Fix undefined variable in QMetaMethod::invoke() documentation

Task-number: QTBUG-38871
Change-Id: I5b7aef58c652d13110aa73b7856927b5ba6fea50
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
fix/optimize QT_PLUGIN_PATH construction in qtAddTargetEnv()

instead of adding all possible plugin paths (for which QMAKEMODULES
wouldn't have been a reliable source anyway), only add the paths of
plugins of the necessary types.

this necessitates that we create qt_plugin_<foo>.pri files also in shared
builds of qt when making a prefix build. we don't install them unless it's
a static build, though.

Change-Id: Ib56b009562a7131d4dc4dfc259b34ec6581b0f77
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
ensure that there is always an -indexdir argument

even if we are not doing a top-level build, we still need to specify an
index dir. that may be the install dir or the qtbase build dir,
depending on whether we are building against an installed prefix build
or a non-prefix build (building against non-installed prefix builds
outside a top-level build is inherently impossible).

Task-number: QTBUG-35596
Change-Id: Ia37d429855480d3bfe36b7ee29e087029861bfc5
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
do not auto-add install dir to index dirs

the install dir may contain indexes from previous builds. a build must
never refer to previous builds.

Change-Id: I67c04df8f3f82bdbebb67e280f70795ed0a76ccf
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
don't check for doc/ dirs' existence

the doc/ dirs in the build dir won't be created until the docs have been
built, so of course checking whether they are there during the qmake
phase is counterproductive.

this also means that we'll get some complaints about non-existing
directories (for repos that don't create any docs). there is no
reasonable way to query qmake which repos are affected, and writing
shell-specific code to query it at make time seems a bit overengineered.

Task-number: QTBUG-38862
Change-Id: Ie0588e75bfc39718fffd46f0df6785428e396eb2
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
pass (some) index dirs also during -prepare phase

qdoc uses the indexes as "precompiled headers" to obtain type info
necessary to properly parse sources.
the indexes needed are the ones the module actually depends on
(publically).

Change-Id: I6aad0b511d2534d584f7947c8d800300eede94ff
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
install pdb files also for static libraries

the condition is now consistent with that of the target itself (which
means that by setting target.CONFIG=no_dll one can actually suppress
installing the target itself even if it's not a dll, but anyway).

Task-number: QTBUG-39253
Change-Id: Id4684a550a33b463594ab537eaa9e1cbfb61e4ff
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
actually don't install qt dlls into lib/ any more

it helps enormously to use the flag correctly.

amends f0c34eb08f.

Change-Id: I04a63cc59e133169d9f6677f2f88ef98fd5c524c
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
unbreak static qml imports again

a) qmlimportscanner has no built-in -importPath, so it can't be omitted
even for non-prefix builds, and b) the QMLPATHS variable is also used
further down, so we can't just do away with it.

amends a658fa40.

Change-Id: I42a47a82fe13694fbac3c4a3962ebbe1d7e7865b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
use the right env var in qmlplugindump call

qml2 needs QML2_IMPORT_PATH.
this didn't affect non-prefix builds (which most developers use), so
it wasn't too serious.

Change-Id: I435dca151348669b66f091f9a9324cd69394284e
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
fix qmaccocoaviewcontainer example

- fix build on 10.6
- actually build it at all

Change-Id: Ib929f8b56e55f00191f7fcfb2be25975e46a1af2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>