Cocoa: Add QMdiSubWindow size grip back.

Change all Q_WS_MAC -> Q_OS_MAC in qmdisubwindow.cpp

Remove QEXPECT_FAIL from tst_qmdisubwindow.cpp.

Task-number: QTBUG-29434, QTBUG-25297
Change-Id: I299b87ab994e2d5ba93d5bbae48de0df1ac1c9d6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Doc: Removed reference to deprecated \badcode command.

-QDoc doesn't differentiate between \badcode and \code. They both
look the same in the output.

Change-Id: Ifabd51b7e433a1c30cf30c267d3ce63dded1bd43
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
undef B0 to build on PPC (conflict with definition in termios.h)

This is the same fix that was already done in qprinter.h
/usr/include/bits/termios.h:122:#define B0 0000000  /* hang up */
so the compiler sees B0 as a numeric constant

Task-number: QTBUG-29704
Change-Id: I2df5e1783f3142558cbc1606e0c61fcf636f2de8
Reviewed-by: David Faure (KDE) <faure@kde.org>
QNX: Don't crash with 0 by 0 sized windows

In the rare event of an invalid sized window, the application crashes
because libscreen doesn't like creating empty buffers.

Not creating the buffers at all would also be a solution, if we didn't
have QPainter crashes due do null paint devices.

Change-Id: I561d0082576b6226dd52129f9640952ba46273c8
Reviewed-by: Kevin Krammer <kevin.krammer@kdab.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
moc: Error out when detecting unterminated macro usage

Exhausting the symbol list while looking for the
final right parenthesis means it is missing.

Task-number: QTBUG-29308
Change-Id: Iccf5897b0f5eb719699fd12d6c8e4a16ff189d9b
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Clean whitespace

Change-Id: Iec1950a0f4053cd71633162f0cb50efc9d4d493f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
QStackedLayout: Fix crash when focus widget is destroyed in hide()

We also have to make sure that when moving back to a page
that has a focusWidget(), the focus should go to the focusWidget()

Task-number: QTBUG-18242

Change-Id: Ibfa7d6361c1a456480b2f1584a88ef4c4f405709
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Fix focus handling of native child widgets in xcb.

Change-Id: If4d596195624011142bff6853849a23064e478df
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
(cherry picked from commit fc663b5f9aae16fe6a03160e3eb148a5f742ac58)
Don't enable HIDPI when rendering directly to PDF on Mac

When rendering to PDF using the PDF paint engine on Mac it would
consider it to be rendering as HIDPI when ScreenResolution was used.
This would mean nothing was being rendered at all in the PDF as a
result.

Task-number: QTBUG-28709
Change-Id: Ieb97ca9d0b47f6b96debbcf5e05e96c39292e412
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Document the qintptr for public usage

The QAbstractSocket API has been already using this as a return type. Hence,
this has already been exposed to the public API users, anyhow.

http://qt-project.org/doc/qt-5.0/qtnetwork/qabstractsocket.html#socketDescriptor

A minor mistake has also been fixed in this commit at the quintptr section.

Change-Id: I8143b3050428548ff6baee2e3a0bce4058ea8701
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix QDockWidget being unable to dock when initially floating.

When setFloating(true) is called before show, frame strut events
are not enabled for the native window (since there is none yet)
in QDockWidgetPrivate::setWindowState(). In that case, do
it in the show event handling.

Task-number: QTBUG-29012
Change-Id: I93b679f20200c149d608a1bcc65b4936a035c6a0
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Fix the default handling of cursor shape when there is no standard one

When the cursor specified is a bitmap one we cannot cache it based on
the shape as the pixmap set on the cursor may be different. Therefore
we should always create a new cursor in this instance.

Change-Id: I2c201590ff632490d76c1b423908ae32aa584eb6
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Clean up the cached cursors inside the destructor of QCocoaCursor

Change-Id: I4e1222832efa29680b4e658a5c9109641599a2b9
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Fixed qtbase examples build when configured with -no-opengl

Change-Id: Idafdc3264f760d6400ce04bb9da36289b1f96438
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Revert "QGtkStyle: GTK3 compatible combo boxes"

This reverts commit 15fc255c7c0a6a693c754734c39c37bd50b0634b.

The change was not compatible with the oxygen-gtk theme engine.
Furthermore, GTK3 compatibility in QGtkStyle is not important,
since it won't be feasible to support both GTK2 and GTK3 in
the same style implementation.

Conflicts:
	src/widgets/styles/qgtkstyle_p.cpp
	src/widgets/styles/qgtkstyle_p.h

Task-number: QTCREATORBUG-8524
Change-Id: I8ea6dcfd1f432d51b306a5d9f6c4106137979c5a
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Fix for url encoding in QDesktopServices::openUrl().

URLs containing spaces (encoded) couldnt be opened using QDesktopServices::openUrl() -method.
This is a regression as it works for 4.8,

Using url.toEncoded() instead of url.toString() which removed percent encoding.

The NSUrl uses RFC 2396 for parsing, and according to the documentation,
of 2.4. Escape Sequences - Data must be escaped if it does not have a
representation using an unreserved character;
And as a space does not have a representation using unreserved character it needs to be
escaped.

Example: Using this url, http://www.google.com/search?q=testme%20withspace
url.toString() returns  "http://www.google.com/search?q=testme withspace"
and url.toEncoded() returns, http://www.google.com/search?q=testme%20withspace" which is
also the expected result.

Task-number: QTBUG-29124
Change-Id: Ieed3d4cfb689b9311f6cf21e5098a1e70256ab03
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Fix reentrancy problem in image reading

There were race conditions when accessing the plugin factory and
the image reader plugins from different threads; ref QTBUG-29281.
Added a mutex lock to avoid.

Change-Id: Ic1a3b6cbaf5603f1bcf7025b58247a9a3f6d08a9
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Fix multiselection by CTRL-click in QFileDialog/KDE.

Task-number: QTBUG-29257

Change-Id: Idfac80e855455a4537dd38a23136762cd9398e15
Reviewed-by: David Faure (KDE) <faure@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Avoid potential crash when changing styles with stylesheet

This is not always reproducible, but it probably crashed because
QStyleSheetStyle::polish() can do some nasty things such as creating
and deleting objects, which can leave the list with dangling QObject
pointers.

However, it should not delete QWidgets, so we make sure we only have
a list of QWidgets before we perform the polish iteration.

Change-Id: I84c1ca6a7316e72348248ff056b65dcbae3d20a3
Reviewed-by: Jens Bache-Wiig <jens.bache-wiig@digia.com>
Fix generated pkg-config files when cross-compiling

The Libs: line of the pkg-config files is constructed
by taking the name of the .pc file itself, and stripping
off the path and extension.  However, the code which does
this does not handle path separators correctly when the
target OS and local OS are different.  To get around this,
the custom string manipulation was replaced with a call
to QFileInfo::completeBaseName(), which can handle the
different path separators correctly.

Task-number: QTBUG-29700
Change-Id: Ia817b415d303b249f56fcc3d1f073cae99c43046
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>