QPrintEngine - Remove Windows use of port and driver

The use of the driver name and port name in the DEVNAMES structure
is no longer required within the Windows print engine and dialogs.

The CreateDC docs clearly state any driver value passed in for a
printer is ignored.  The PRINTDLGEX docs also state only the name
is actually used.  The use of the port name is not required as the
DeviceCapabilities api works fine with just the printer name and
the FILE: port can be manually handled.

Change-Id: I7765d73d4a31b1a3c5dab55ee4cfd3580bcf9ad7
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
QPrintEngine - Improve devMode handling

Improve the sharing of the devMode between the QPrintEngine and the
print dialogs, in particular start to change the dialogs from directly
accessing the QPrintEngine internals.

Change-Id: Ieb4649c19b936433c85207297a0b6e59356c3880
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
QPrinter - Add more tests

Add more missing tests.

Change-Id: I801c5c67731075ccb3e62377c0eccc420e708365
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Remove the option to force no JIT in javascript core

Change-Id: I81a9968b360cf889f92e690cdf4028692b904a0c
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
Fix compile error when enabling the QHOSTINFO_DEBUG define

Change-Id: Id82b3aad3b2951e6d0dee57ac993535930db31fc
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Logging: Change 'rules' section name to 'Rules'

This is more consistent with e.g. qt.conf, where section names also
start with an upper case character.

Change-Id: I9ddaf72baeb9334d081807412512242d5d46cbbf
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Android: Support pregenerated cache in assets file engine

This provides a way for androiddeployqt to pregenerate the
entry list cache for the assets file engine, greatly improving
performance the first time a directory is read. If the file
is not present, the cache will operate as before.

Some numbers from testing on Samsung Galaxy 2, doing
QDir::entryList() on a directory inside the assets folder:

10 files
--------
Before:
     280 ms for first read,
       5 ms for subsequent reads
After:
       2 ms for reading pregenerated cache
       5 ms for first read
       5 ms for subsequent reads

2000 files
----------
Before:
    1000 ms for first read,
     150 ms for subsequent reads
After:
       5 ms for reading pregenerated cache
     150 ms for first read
     150 ms for subsequent reads

4000 files
----------
Before:
     3000 ms for first read
      300 ms for subsequent reads
After:
        8 ms for reading pregenerated cache
      300 ms for first read
      300 ms for subsequent reads

[ChangeLog][Android] Speed up first time directory listing
in assets by using pregenerated entry list.

Task-number: QTBUG-33704
Change-Id: I3973a1d823b8b38e88a2cc7843326cbe885f8bc2
Reviewed-by: Christian Stromme <christian.stromme@digia.com>
Android: Make default permissions less confusing

Add comments to explain the magic placeholders for default
permissions and features, and move the INTERNET and
WRITE_EXTERNAL_STORAGE permissions from the manifest so that
we use the same mechanism for all default permissions.

Change-Id: Ia62dd4314c1c10eb201b5203772ffe88b1ce7a04
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
Texture glyph cache: Use a vbo

It is not going to work with core profile otherwise.

This fixes one of the several problems that make native
text rendering in Quick impossible with OpenGL core profile.

The GL2 paint engine path is not changed, that continues to use
client side pointers.

Task-number: QTBUG-36993
Change-Id: Icfbd6efc894a79a3a84568fb792c1cb6692469cb
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Fix glyph texture format on core profile

Native text rendering is now functional on core profile too,
as long as the driver allows compiling GL2-style shaders.

Task-number: QTBUG-36993
Change-Id: I83f3cafae714427dda807921ee79e5a64e55cc64
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Use a VAO in the texture glyph cache

Task-number: QTBUG-36993
Change-Id: Icc77035b582c804ed809ea3cd99c0048b34d41d2
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Use Qt's RTTI setting when building ANGLE statically.

Prevent errors when building Qt statically with RTTI enabled:

warning C4743: 'const std::ios_base::failure::`vftable'' has different size in 'qtbase\src\3rdparty\angle\src\libGLESv2\Context.cpp' and '(...)': 16 and 12 bytes

Task-number: QTBUG-36951

Change-Id: Ie0501b986be8610c8293cd5c1aa42b502d7c27a1
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Cocoa: Don't crash at toolbar cleanup time.

Add missing iterator increment.

Change-Id: Id663c38859b89c29009f67205da0fdd404a455c0
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Cocoa: Remove tablet event warnings.

Qt warns on all touchpad evens when running in a VM.
This appears to be harmless. Remove the warning.

Also, qWarnings are ideally messages to the application
developer about incorrect use of Qt API. In this case
there is nothing the application developer can do
and a qWarning is not really appropriate.

Task-number: QTBUG-36484

Change-Id: I8a50f5a15010f1f064509b83ef4f239b008e0f2b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Cocoa: Set geometry for foreign views.

Make sure QPlatformWindow::setGeometry is called for
the QWindow::fromWinId() case where there is no
QNSView.

Change-Id: I72dd11a0eb0f3cfbd09b87ffeac86f2a826e0192
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
eglfs: Improve cursors and hotspots

Improvements
 * Cursor atlas has been recreated using 32x32 cursors which avoids
   artifacts introduced from downscaling of the busy cursor
 * A white outline has been added to the cursors to improve visibility
   on black backgrounds
 * Hot spot positions have been tweaked; in particular,
   Qt::PointingHandCursor now has a correct hot spot at the tip of the
   index finger instead of the center

The assert which checks that the number of hot spots equals the number
of cursors had an off-by-one error as the first cursor is
Qt::ArrowCursor which has an enum value of 0. To determine the number
of cursors, 1 needs to be added to Qt::LastCursor.

Change-Id: I266b6d4cc47d42219854aa5b7e2d8344eb3a920a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Cocoa: Fix popup window positioning.

Popup window positions where offset on retina MacBooks
with an connected external monitor.

Fix this by cleaning up the coordinate conversion 
functions:
    
Remove the qt_mac_flipRect overload which tries
to position the window according screen size. This
functionality does not belong inside a coordinate/
type conversion function. Also, it was using the windows's
screen instead of the main screen which is incorrect.

"Y flipping": Use the height of the first screen in
[NSScreen screens], which is documented to always
be the screen that contains the coordinate system
origin. Remove the usages of QApplication::primaryScreen()
("Don't use Qt to implement Qt").

Task-number: QTBUG-36672
Change-Id: I2354d31361f5a4c2c80035cf4c7def939218406f
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>