Don't use GL_REPEAT for image-brush drawing on OpenGL ES2

OpenGL ES2 doesn't support NPOT textures in combination with GL_REPEAT,
so for OpenGL ES2 we use a custom program that emulates repeat by taking
the fractional part of the texture coordinates.

This is not enough though, as merely setting GL_TEXTURE_WRAP_x to GL_REPEAT
with a NPOT texture is an error in some implementations, so we have to
guard the call to updateTextureFilter() in updateBrushTexture() with
a check for OpenGL ES2 and use GL_CLAMP_TO_EDGE instead.

This fixes missing/black backgrounds in the diagramscene example on iOS.

Change-Id: I5020090b5f17faeb06dcab9dc0292459e021af30
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
iOS: Set context and bind FBO before allocating render-buffer storage

defaultFramebufferObject() may be called from anywhere, at any point,
not just makeCurrent(). One example is the glyph-cache, which uses it
to re-bind the default FBO after generating the texture cache.

If the default FBO had already been created, but the render-buffer was
out of sync with the window size, we would end up in the resize code
without the correct context current, and without the render-buffer's
owning FBO bound. This caused "Failed to make complete framebuffer
object 8cd7" warnings at runtime.

We now make the context current and bind the FBO, even though it might
already be bound and the context current from makeCurrent(), or when
initially creating the FBO. For the future we should move the whole
resize logic out of defaultFramebufferObject() and call it from
makeCurrent(), or possibly [EAGLView layoutSubviews]. That's a
higher impact change though, which we reserve for the 'dev' branch.

Change-Id: I50ea949c12a02ad1af6ec9fdc3215d5da85b324f
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Doc: Removed pages from "qt-sql" group.

-"qt-sql" removed in qtdoc
-no longer needed because "Data Storage" and Qt SQL pages already serve
as the main introduction to SQL support in Qt

Change-Id: I7384ae04ab4c09ecc9d76668e4e7f836095066c1
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Doc: Copying changes to external pages from qtdoc

-the externalsites from qtdoc is being removed and the new copy is in
qtbase/doc/global.

Change-Id: I8f509acf05c0e1f399205daf4e4831cf46475746
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Don't destroy the window if the QCloseEvent wasn't accepted

It's possible to override event() to receive the QCloseEvent and
do event->ignore() to prevent the window from closing.

Task-number: QTBUG-31019
Change-Id: I9abed47fca02a002b78727f98d678a824854adfc
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
xcb: don't do mouse synthesis from touch unless we find a reason

One reason is when we are using XInput 2.2, because touch devices
will then generate touch events only.  For the other X11 scenarios,
X11 does its own mouse emulation.

QPlatformIntegration::styleHint() wasn't overridden yet.  The remaining
hints are TODO for now.

Change-Id: I2e444a00a18b33ed840ebfa8d8218655c2c39aad
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
QGraphicsView: ignore unhandeled touch events

When QGraphicsView has sceneInteractionAllowed == false (e.g
when dragMode == QGraphicsView::ScrollHandDrag), all touch
events are accepted. This is wrong, and will stop mouse synthesising
from happening on touch platforms. This in turn will make
ScrollHandDrag not work (since no mouse events will come through).

This patch will call QEvent::ignore() if the touch event isn't send
to the scene, which will cause a mouse event to be synthesised.

Note that according to http://doc.qt.digia.com/qq/qq11-events.html
the correct approach would probably be to just return 'false', rather
than calling QEvent::ignore(). But this logic is not followed
consistently elsewhere (e.g in QApplication::notify), so I choose
to follow what the code actually expects for this bugfix.

Change-Id: Ida777647134c41661bab156d7b164ebd882a6bb1
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
QApplication: fix touch to mouse bug when setting buttons()

QApplicationPrivate::translateTouchToMouse always sets
buttons() to Qt::LeftButton for synthesised events. This is wrong
for a mouse release, since 'button' should in that case be
Qt::LeftButton, and 'buttons' should be Qt::NoButton (since no buttons
are actually being pressed).

This caused problems for QGraphicsView, which refuses to
release any mouse grab set on a QGraphicsItem if at least one
button is being pressed (which was always true).
This resulted in broken drag behavior on touch platforms.

Change-Id: Iefe63cd753f9f8bb04278fd04a4d728e3deda25e
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Fix typo in changes-5.0.0: there's no "S" after "INTERFACE" or "ADAPTOR"

in QDBUSXML2CPP_INTERFACE_HEADER_FLAGS and QDBUSXML2CPP_ADAPTOR_HEADER_FLAGS.

Change-Id: Ibbe812fbe4912acfd2c9721b5193727ae0c0ade3
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
qdoc: The \wrapper command is added

If \wrapper appears in a \class comment or a
\qmltype comment, qdoc will not print warnings
when it finds public members of the class or the
QML type that are not documented.

The \wrapper command is added to several
opengl classes. This reduces the number of
qdoc warnings by several thousands.

Task-number: QTBUG-30755
Change-Id: Iba1eebc1590ccf54100e40fe91423240c1b3d09d
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
Reviewed-by: Venugopal Shivashankar <venugopal.shivashankar@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
QProcess/Win: drain output pipes on process finish

If a process dies before all output is read into the internal buffer
of QProcess, we might lose data. Therefore we must drain the output
pipes like we already do in the synchronous wait functions.

Task-number: QTBUG-30843

Change-Id: I8bbc5265275c9ebd33218ba600267ae87d93ed61
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
qmake/vcxproj: resurrect support for /we compiler switch

The vcxproj format supports the /we compiler switch as
TreatSpecificWarningsAsErrors tag.
Support for this switch got lost during refactoring of the
vc(x)proj generators for Qt 4.8.0.

Task-number: QTBUG-29098

Change-Id: I607e907dcb9c1bc7d261053b6d757941ec7db822
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
qmake/vcxproj: fix parsing of /RTC* options

/RTCsu and /RTCus must be handled as full runtime check options.

Task-number: QTBUG-30711

Change-Id: I783bf49f2ab1d4fd9636dca8e434bccb54844c8c
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
fix _WIN32 compiler defines for MSVC

The compiler defines _WIN32, not WIN32.

Change-Id: I359a188b4ef145b7b78c35c5b72a804200b76507
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
qmake/vcxproj: add WIN64 macro for x86_46 builds

The compiler defines _WIN32 for x86 builds.
The compiler defines _WIN32 and _WIN64 for x86_64 builds.

For consistency, the same should happen to the user defined macros
without underscore. The WIN32 macro is added in the win32-* mkspecs.

Task-number: QTBUG-30223

Change-Id: I342afed731f4ba253a2708b98f575039a04613d7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
set QMAKE_PLATFORM in win32-msvc2012

Change-Id: I3f43ece757b6f483fde256dbcc00f72b4e71c33e
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
qmake/vcxproj: remove unused code

Change-Id: I5ac0ae534a7b3205d61cf2980594b74c1ed926a7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
fix warning in ProStringList_join

Fix C4267 MSVC warning.
Make sepSize an int, because this function is never called with a size_t.

Change-Id: I2b834fe7c1408e34d55d9f137231e2f5816f3f1d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
qmake/vcxproj: do not set ProgramDataBaseFileName

Visual Studio's default value is perfectly fine.

Task-number: QTBUG-29757

Change-Id: Ic334287539bb849f3b74d255d3991a09008cd357
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
remove dead declaration from QColorMap

Change-Id: Idf50084c4688c8bb6b7a2e754cad28266e09271f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>