Commit Graph

12506 Commits

Author SHA1 Message Date
Simon Hausmann
d2cb81f8d9 Add missing notify signal for the QWindow::title property
Similary to QWidget's windowTitleChanged, QWindow should also have a
windowTitleChanges signal that's emitted when the title changed and declared
as notify signal for the title property, so that QML bindings can be written
against it.

Change-Id: I6f107c6f0b43d6a959bc2ef96492e1f3e4c28bfe
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-02-27 18:27:42 +01:00
Frederik Gladhorn
01a1f87368 Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2014-02-27 18:27:18 +01:00
Friedemann Kleint
81698e5484 Widgets: Pass on mouse event source when translating mouse events.
Change-Id: I70dacc2f96552e08dd71d5cbd63fb4cf9916c11f
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-02-27 13:28:41 +01:00
Friedemann Kleint
b3aed29c43 Windows: Set source of synthesized mouse events correctly.
The source was never set for OS-synthesized events, causing duplicated
touch clicks to occur in Quick 2 applications.

Task-number: QTBUG-31386

Change-Id: Ib6d1405815dfb8e57d6446c72a7d6e2a044281ea
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-02-27 13:28:31 +01:00
Friedemann Kleint
cebdd91f8b Windows: Add platform plugin parameter for tablet absolute range.
Make the range for detecting relative (mouse mode) configureable
using  -platform windows:tabletabsoluterange=50

Task-number: QTBUG-36937

Change-Id: I44f928e53cb41b246c44554ec7f71bfbdf03c147
Reviewed-by: Arthur Krebsbach <Arthur.Krebsbach@Wacom.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-02-27 13:28:23 +01:00
Jorgen Lind
bbc4cc4a47 XCB: update the platformwindows version of Qt::WindowState
when the event comes from the windowing system

Task-number: QTBUG-31117

Change-Id: Id136ad8c39c9284cbd6ad126ee71ac655f8f91ef
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-27 07:25:34 +01:00
Allan Sandfeld Jensen
1a6a763254 Handle multiple header values in SPDY
SPDY sends multiple header values for the same header key by null-byte
separating them.

This patch maps the multiple values the same way
qnetworkreplyhttpimpl.cpp
does. With this patch applied we can now log on to GMail using SPDY.

Change-Id: I03656ad1695d13b5c3ed252794dc6c89c67c7b97
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-02-26 20:32:05 +01:00
Morten Johan Sørvig
9d2d4ad483 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>
2014-02-26 12:58:00 +01:00
Jonathan Liu
66e5f8e9dc 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>
2014-02-26 12:58:00 +01:00
Morten Johan Sørvig
cea3f4d535 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>
2014-02-26 12:58:00 +01:00
Morten Johan Sørvig
98405c41c2 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>
2014-02-26 12:58:00 +01:00
Morten Johan Sørvig
eeb1fcd55c 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>
2014-02-26 12:58:00 +01:00
Friedemann Kleint
39346df12c 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>
2014-02-26 12:58:00 +01:00
Laszlo Agocs
f645dad757 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>
2014-02-26 12:58:00 +01:00
Laszlo Agocs
f7f70c4a7a 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>
2014-02-26 12:58:00 +01:00
Laszlo Agocs
357363dd51 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>
2014-02-26 12:58:00 +01:00
Eskil Abrahamsen Blomfeldt
a2f79b0d0f 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>
2014-02-26 12:58:00 +01:00
Eskil Abrahamsen Blomfeldt
b79e734767 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>
2014-02-26 12:58:00 +01:00
Kai Koehne
f3ed93e486 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>
2014-02-26 12:58:00 +01:00
Andy Shaw
5ce87f0782 Fix compile error when enabling the QHOSTINFO_DEBUG define
Change-Id: Id82b3aad3b2951e6d0dee57ac993535930db31fc
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-02-26 12:58:00 +01:00
John Layt
f05e48381b 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>
2014-02-26 12:58:00 +01:00
John Layt
5ddc5df350 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>
2014-02-26 12:58:00 +01:00
Andrew Knight
7afd2ede79 WinRT: Fix backing store for latest ANGLE
Bump the ANGLE version and remove the extra info not required by
universal binaries.

Change-Id: I59983d28e1936fb42aa2def4ca785219b0c38996
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-02-26 07:56:56 +01:00
Andrew Knight
efc79c6e91 ANGLE: Allow for universal program binaries
As a safety precaution, ANGLE writes the commit hash, optimization level,
and adapter ID to its binary format. However, this hurts portability
between systems by making shader pre-compilation/caching artificially
system-specific.

The shader compiler doesn't take the target adapter into account, and the
optimization level information discarded by ANGLE anyway. So, allow ANGLE
to bypass these checks on systems where precompilation is required (i.e.
WinRT). The default mechanism still applies unless
ANGLE_ENABLE_UNIVERSAL_BINARY is passed as a define.

Change-Id: Iec6d833fd7010ed163978557238f00e7ac6ae416
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-02-26 07:56:53 +01:00
Andrew Knight
a7d093e740 Upgrade ANGLE to 1.3.5bb7ec572d0a
This brings Qt's copy of ANGLE up to ANGLE master, which contains a number
of bugfixes as well as restructuring for the upcoming ES 3.0 support. This
version brings considerable stability improvements to the D3D11 renderer.

The static translator project files have been merged to align with the
ANGLE source tree.

Two new patches have been applied to fix errors in upstream ANGLE:
- 0011-ANGLE-Fix-compilation-error-on-MinGW-caused-by-trace.patch
  The event trace header in ANGLE's third_party directory has an unused
  template which causes a compilation error on MinGW. Disable this part
  of the code.
- 0012-ANGLE-fix-semantic-index-lookup.patch
  The sorted semantic index table was returning a direct mapping to the
  new indices, instead of the old indices. This caused a mismatch in the
  GL type lookup for the translated attribute.

All other patches have been rebased, removed if no longer needed,
and renamed to clear up the application order:
- 0001-Fix-compilation-for-MSVC-2008-and-std-tuple.patch
  No changes.
- 0001-Fix-compilation-with-MinGW-mingw-tdm64-gcc-4.8.1.patch
  No changes. Renamed to 0002.
- 0001-Fix-compilation-with-MinGW-gcc-64-bit.patch
  No changes. Renamed to 0003.
- 0001-Make-it-possible-to-link-ANGLE-statically-for-single.patch
  Modified patch to adapt to new DLL loading structure. Renamed to 0004.
- 0005-Fix-build-when-SSE2-is-not-available.patch
  No changes.
- 0011-Fix-compilation-of-libGLESv2-with-older-MinGW-w64-he.patch
  No changes. Renamed to 0006.
- 0006-Make-DX9-DX11-mutually-exclusive.patch
  Made the patch less invasive by allowing D3D9 code to run unless
  explicitly disabled (e.g. on WinRT, where it doesn't compile). This
  makes the patch smaller and allows Desktop Windows to compile both
  D3D9 and D3D11 codepaths. Renamed to 0007.
- 0015-ANGLE-Dynamically-load-D3D-compiler-from-a-list-of-k.patch
  No changes. Renamed to 0008.
- 0012-ANGLE-Support-WinRT.patch
  Made D3D11_level9 initialization only possible if D3D9 is disabled.
  This makes sure Desktop PCs use the old D3D9 codepath instead of
  the less-tested D3D11_level9 codepath. Renamed to 0009.
- 0013-Enable-D3D11-for-feature-level-9-cards.patch
  Conveniently smaller patch due to buffer implementation improvements
  upstream. Renamed to 0010.
- 0014-ANGLE-D3D11-Alwayls-execute-QueryInterface.patch
  This was a fix for patch 0009, so was integrated there. Removed.
- 0016-ANGLE-D3D11-Fix-build-on-desktop-Windows.patch
  This was a fix for patch 0009, so it was integrated there. Removed.
- 0001-ANGLE-Fix-compilation-with-MSVC2013.patch
  Fixed upstream. Removed.
- 0007-ANGLE-Fix-typedefs-for-Win64.patch
  Fixed upstream. Removed.
- 0004-Fix-black-screen-after-minimizing-OpenGL-window-with.patch
  The issue has been fixed in Qt itself. Removed.
- 0008-DX11-Prevent-assert-when-view-is-minimized-or-.patch
  The cause of the problem was the same as patch 0004, but for the
  D3D11 codepath. Removed.

Change-Id: Id69484ab3a3e013050741c462fb1b06dfb0fd112
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-02-26 07:56:50 +01:00
Rafael Roquetto
45e17d0cc7 QNX: Prevent desktop windows from becoming root window
If a QDesktopWidget is created before any other window, its underlying
QPlatformWindow will be granted the root window role. Windows created
afterwards will become children of the root window, preventing the app from
being rendered, since the Qt::Desktop windows never get posted and therefore
flushed.

This patch prevents a Qt::Desktop window (related to QDesktopWidget) from
becoming the root window. This does not affect QDesktopWidget functionality.

Change-Id: I02c9946a3979b2227afbd2e5d485ba80efa1b997
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-02-25 21:51:07 +01:00
Giuseppe D'Angelo
97ed8f3c0f Fix a getProcAddress in QOpenGLDebugLogger under Win32 + Desktop GL + ATI
We can't resolve a "basic entry point" such as glGetPointerv on Windows'
Desktop GL. Apparently NVIDIA drivers let us do that, but ATI ones don't.

Change-Id: I8e8a54b5dcd3fe87f2bd677d1d0cf08b3e8c11c4
Reviewed-by: Thomas Steen
Reviewed-by: James Turner <james.turner@kdab.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-02-25 21:51:07 +01:00
Eskil Abrahamsen Blomfeldt
e1fd82981c Revert "Fix application font removal when using FontConfig"
This reverts commit a4ff400e25.
The patch caused a regression for bold fonts which is currently
blocking the alpha of Qt 5.3, so lets revert it and try
resubmitting a fixed version later to avoid delaying any release.

Task-number: QTBUG-36929
Change-Id: I8d474b09b2270eb2f861853e60605429be08e2d9
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-02-25 21:51:07 +01:00
Friedemann Kleint
a0ebaca9cb Windows file dialogs: Use FOS_NOREADONLYRETURN only for mode AcceptSave.
Task-number: QTBUG-36886

Change-Id: I727abb92675187f15d1357b1df60f2fb609dc4d5
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-02-25 21:51:07 +01:00
Peter Hartmann
32794abe72 network: fix doc typo in QNetworkConfigurationManager
Change-Id: I6d3e7e4fb62dfc13f3cc156138604cabea119b75
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-02-25 21:51:07 +01:00
Sze Howe Koh
b648195c31 Doc: Replace obsolete types with their newer counterparts
This patch ignores:
- Docs for obsolete types themselves
- Comparisons between new and obsolete types

Change-Id: Id9b1e628255113e7c44520abe0f8a4e0db4a283d
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-02-25 16:36:34 +01:00
Konstantin Ritt
6a7747f30c HarfBuzz-NG: Hide characters that should normally be invisible
These are non-ambigue NLF characters that should only imply the
sctructure of the document.
For details, see http://www.unicode.org/reports/tr13/ .

The issue could be reproduced with use of multi-line QML Text element.

Change-Id: Ibb4d5cd26bc0ac6b79a4cb549e6a3cd7633bd071
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-25 16:10:33 +01:00
Morten Johan Sørvig
bb7bf6ca17 Make closeAllWindows() close real windows only.
QApplication::closeAllWindows() is documented to close
all top-level windows. If the widget has WA_DontShowOnScreen
set then that is a strong indication that this widget
is, in fact, not a top-level window.

[ChangeLog][QtWidgets][Mac] QWidgets embedded in
QGraphicsProxyWidget are no longer sent close events
when the app is closed.

Task-number: QTBUG-33716
Change-Id: I0925ed67a2d2088ca9f950a4a43bc2729b88a86c
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-02-25 16:09:50 +01:00
Kai Koehne
ee55244df4 Fix link to argument formats in QString::setNum documentation
Also drop mentioning of 'F', which is (though supported) not mentioned
in the linked section.

Change-Id: I9bf763f25b8b0309c338adbf3d63d94678ecee5e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-02-25 16:05:23 +01:00
Kai Koehne
7129ec0f47 Document qPrintable encoding issues
Change-Id: I8936203afaa100ac4665ed668f7729fc8da1d445
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-02-25 16:05:14 +01:00
Morten Johan Sørvig
2f76a30ee1 Cocoa: Prevent "Invalid Drawable" GL warnings.
Worst case this can cause the various OpenGL
initialization functions to fail due to the lack
of a valid GL context.

Task-number: QTBUG-35342
Task-number: QTBUG-31451

Change-Id: I08256ad51acb5370c8c6d44b556572eadd6a9c1d
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-02-25 16:01:43 +01:00
Morten Johan Sørvig
72ba4cd385 Cocoa: Clear GL context pointer on deletion.
The QGLWidget destructor sequence is such that the
GL context will be deleted before the window is hidden.
This would leave QCocoaWindow with a stale m_glContext
pointer.

Clear QCocoaWindow's context pointer on context
deletion.

Task-number: QTBUG-36820
Change-Id: I710e3813f9ce90ddd37ad7b406693f0c58a1436d
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-02-25 16:01:22 +01:00
Morten Johan Sørvig
f2ade01f4c Cocoa: QImage -> CGImage conversion cleanup
Move to one qt_mac_toCGImage function that has simple
semantics and properly retains a copy of the QImage
for the lifetime of the CGImage.

Remove the old qt_mac_toCGImage function which had
two problems:

1) It would not retain the QImage data (this was probably
ok for its original use case: creating short-lived
CGImages for the paint engine)

2) It had acquired a somewhat odd **datacopy out
parameter for the cases where you _do_ want to retain
the image data.

This makes the exported image conversion function
from QtMacExtras work: The CGImages it creates will
no longer reference free'd memory once the QImage
is deleted.

Change-Id: I583040d16aefb17fc3d801d6b047a0b2a76c7f74
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-02-25 16:00:03 +01:00
J-P Nurmi
51572d3d8f QAssociative/SequentialIterable: add missing \since 5.2
Change-Id: Ia78fa0d70c85f06f48c3bbab47370e15008abe03
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
2014-02-25 15:50:38 +01:00
Laszlo Agocs
05ee0fcdc7 Properly migrate vao helper to dynamic GL
Remove the forced bail out when isES() returns true. This is not
necessary.

Change-Id: I5ee21fe1e66163e2391bd11b647827b3c0a020c1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
2014-02-25 15:50:35 +01:00
Frederik Gladhorn
bddf6d4359 Merge remote-tracking branch 'origin/release' into stable
Change-Id: I3199d47f7d450853032ea5aa38cd4c7c30b9a3d0
2014-02-24 19:53:25 +01:00
Friedemann Kleint
989d439d93 Windows: Clear transient relationship before destroying windows.
Windows differs from the other platforms in that transient
parent relationship is not just a window property but also
implies ownership; windows will destroy their transient
children in DestroyWindow(), which interferes with Qt.
Explicitly clear the relationship in QWindowsWindow::destroy()
to prevent this.

Task-number: QTBUG-36666
Task-number: QTBUG-35499

Change-Id: I5e72524ef57422831f60484993f6c8d7c80c8601
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-02-24 17:10:33 +01:00
Marc Mutz
9f983eac9f QJNI: optimize QSharedPointer creation
Instead of QSharedPointer<T>(new T), use QSharedPointer<T>::create(), since the latter
co-locates the refcount and the T instance in a single memory allocation, unlike the
first form, which uses separate memory allocations.

Change-Id: I5095ac43448aad9a7e3ec07ed4dcdca869bcd9e8
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-02-24 17:05:01 +01:00
Eskil Abrahamsen Blomfeldt
6813a21c52 Fix compilation on armv5
Two changes broke compilation on armv5, where we're currently
not CI-testing:

634f82f1f1 changed the signature
in a function definition without changing its declaration, while
it was actually intending to add this as a new overload.

bfe0db6fbe added an #error
condition without fixing compilation on armv5. I don't know
if the fix is correct, but at least it compiles.

Task-number: QTBUG-37034
Change-Id: If99142fafb9bd55afc20b17f8b3cce5ee0ffec13
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-24 16:12:41 +01:00
Marc Mutz
f12b0f9a38 QByteArrayList: optimize op+
The old code creates a default-constructed QByteArrayList, then performed two
list-appends, the first one of which just performs assignment.

Optimize by replacing the default construction and assignment with a copy
constructor call.

Change-Id: I6d5bd14172798c925b05bd3602e6d1d037d90796
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-02-24 15:14:04 +01:00
Paul Olav Tvete
328a282ebd Compile fix for QT_NO_OPENGL
Change-Id: I5ea962b0d77198945a4f87ad821d3c3dcffd260c
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-02-24 12:59:47 +01:00
Kai Koehne
921bfe58c2 Fix potential null pointer access in qglx
This reportedly does fix crashes when running a Qt Quick 2 application
over remote X.

Task-number: QTCREATORBUG-11207
Change-Id: I6fa82420f9d12e56e52fa8efd263bf18d868d7d8
Reviewed-by: Ville Nummela <ville.nummela@parker.com>
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-02-24 12:31:54 +01:00
Tor Arne Vestbø
aac68a9ef3 Fix texture glyph cache setup in old OpenGL paint engine
Caused assert-crash reported on Windows.

Task-number: QTBUG-37027
Change-Id: If84b970a153570115afb344797728a0b1a04db5b
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-24 12:08:08 +01:00
Friedemann Kleint
74d4fcea4a Enable QMenu::setNoReplayFor(QWidget *noReplayFor) for all platforms.
This prevents a tool button menu from being opened by a replayed
click. This partially reverts
8301c0002280c10970cce1e17f634e74c61f2f5d .

Task-number: QTBUG-36863
Change-Id: I396e3694de8b3d4ca916457c2b2df39798502530
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-02-24 12:01:31 +01:00
Sze Howe Koh
0c9c43c148 Doc: Address some "No documentation for..." QDoc warnings
Task-number: QTBUG-36985

Change-Id: I8619fb77e7879399064281f7bbefe5f12d3849a2
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-02-24 11:56:54 +01:00
Thiago Macieira
e85b4ed77a QtTest: Don't crash when -callgrind is used on QTEST_APPLESS_MAIN
If there's no qApp, then QCoreApplication::arguments() returns an empty
list (after printing a warning). That means the callgrind runner can't
get the arguments it needs in order to rerun the benchmark.

The crash happens because it always uses .at(0) to try and get the
executable's path. Even if we get the path from somewhere else, we still
need the arguments.

Change-Id: I5c74af4d96fc5824b2b7fd7a89648d78393016e2
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-02-24 11:52:27 +01:00
Gunnar Sletta
12a7d23d52 Introducing QOpenGLShaderProgram::create()
Needed for QOpenGLShaderProgram to be usable with
GL_OES_get_program_binary and potentially other extensions.

[Changelog][QtGui] The function QOpenGLShaderProgram::create()
has been added. It is can be used to force immediate allocation
of the program's id.

Change-Id: I36b3f45b00e7a439df12c54af7dc06c0ba913587
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-22 14:35:33 +01:00
BogDan Vatra
26a5727f75 Make full use of QT_ANDROID_RASTER_IMAGE_DEPTH env variable.
If raster only apps set QT_ANDROID_RASTER_IMAGE_DEPTH to 16 (RGB16), we
should create also RGB16 native surface.

Change-Id: I82692ff34b0e604e627d1d86a437272e3700daf8
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-02-22 14:35:33 +01:00
Paul Olav Tvete
0febd75d52 QWidget: do not allocate a QOpenGLContext unless needed by QQuickWidget
Task-number: QTBUG-36871
Change-Id: I739f270e9344f888593e04c6221807dbcf6cb55e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-02-22 14:35:33 +01:00
Sergio Ahumada
acf1cb9458 Fix typo in QLibraryInfo::build()
before:

    Config: Using QtTest library 5.4.0, Qt 5.4.0 (Feb 20 2014), GCC 4.6.3, 32 bit, release build)

    <QtBuild>Qt 5.4.0 (Feb 20 2014), GCC 4.6.3, 32 bit, release build)</QtBuild>

 after:

    Config: Using QtTest library 5.4.0, Qt 5.4.0 (Feb 20 2014, GCC 4.6.3, 32 bit, release build)

    <QtBuild>Qt 5.4.0 (Feb 20 2014, GCC 4.6.3, 32 bit, release build)</QtBuild>

Change-Id: Ia4c9f994ef7e834831c78e8dbc00a52e06c0ed9a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-02-22 09:51:14 +01:00
Jason McDonald
3b1e9a7f9b Doc: Address some "No documentation for..." warnings in QTest
Task-number: QTBUG-36985
Change-Id: I811b4711edc3420911fcd706ecef2d090f41bc89
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-02-22 09:51:14 +01:00
Friedemann Kleint
300be65b16 Windows: Use GetForegroundWindow() to check for active windows.
The previously used GetActiveWindow() returns the application's
window also if it is minimized.

Task-number: QTBUG-36806

Change-Id: I8ede3ea30e7b714aa1af85ed67e510e1692ebb8f
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-22 09:51:14 +01:00
Thiago Macieira
8b54cfff82 Make D-Bus types without a matching Qt one prettier in qdbus
Print "QMap<QString,QString>" for "a{ss}" and print a nicer expansion of
other types.

Change-Id: I0a7a2ecf8f0a62bd97931f3c129cd4cb4f471ef1
Reviewed-by: Lorn Potter <lorn.potter@jollamobile.com>
2014-02-22 04:38:56 +01:00
Thiago Macieira
c1d4a634cb Fix off-by-one error: the next ASCII character is next one
The bit scan function returns the index of the last non-ASCII
character. The next ASCII is the one after this. This means all the
benchmarks were made while reentering the SIMD loop uselessly...

Change-Id: If7de485a63428bfa36d413049d9239ddda1986aa
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-22 04:38:41 +01:00
Thiago Macieira
3a3a7f8842 Normalize signal & slot signatures in connection
Profiling showed that Qt Creator spent 2% of its load time normalizing
signals and slots. By pre-normalizing everything, we ensure that there
is no runtime cost. Profiling after this commit and the others in this
series shows that the cost dropped down to zero.

Change-Id: Ifc5a2c2552e245fb9a5f31514e9dd683c5c55327
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-02-22 04:38:37 +01:00
Thiago Macieira
d7287f595a Make QTextDecoder use our qt_from_latin1 code
Disassembly shows the Intel compiler does expand to SIMD, but a much
worse code than ours. Clang 3.4 does generate a compact SIMD version,
probably of the same quality as our hand-written code. And GCC 4.7
through 4.9 don't generate SIMD at all.

So let's use the most efficient version.

Change-Id: I418e201a774ac0df1fb2b7a7d9589df7c9b655db
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-22 04:38:28 +01:00
Thiago Macieira
1c63909ad8 Make sure all containers compile in strict-iterator mode
Unit-test this by making the QList, QVector, QHash and QMap unit tests
be duplicated under strict-iterator mode. There's no test for
QLinkedList.

The tst_Collections test does not compile under strict-iterator
mode. It generated over 15000 errors when I tried.

The strict iterators required a small change: the difference_type
typedef needs to match the operators that get distances
(operator-(iterator)) and move the iterator around (+, -, +=, -=, etc.).

Task-number: QTBUG-29608
Change-Id: I834873934c51d0f139a994cd395818da4ec997e2
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
Reviewed-by: Jason McDonald <macadder1@gmail.com>
2014-02-22 04:38:01 +01:00
Christian Strømme
de5ae6917c Android: Enable text selection only when ImhNoPredictiveText is set.
Mouse selection does not work well with Android and text will be
randomly copied, pasted or deleted. This behavior is especially bad
when predictive text is enabled.

Task-number: QTBUG-34616
Change-Id: I732ad7db52169bfb5735c237cf24597a3d6d64ba
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-02-21 20:33:10 +01:00
Christian Strømme
a03a69efb9 Android: Do not enable text selection in QTextEdits by default.
Text selection does not work correctly and is currently causing
selected text to be randomly copied, pasted or deleted.

Task-id: QTBUG-34616
Change-Id: I98678b7575034325dd8a4fa181ee4cb182783a3b
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-02-21 20:33:10 +01:00
Marc Mutz
208acff3fc QLibraryInfo: mark build() function as nothrow
Change-Id: Ie95fa52e4e00fd0747d3554c9f2a4d8076faaaf6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-21 20:33:10 +01:00
Marc Mutz
d9ce5c35df QSslCipher: make QString constructor explicit
A QSslCipher is not an equivalent representation of a QString, so
the constructor that takes a QString should be explicit.

Change-Id: I4c1329d1eebf91b212616eb5200450c0861d900f
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-21 20:33:10 +01:00
Marc Mutz
f41d5ec626 QPainterPathStroker: make QPen constructor explicit
A QPainterPathStroker is not an equivalent representation of a QPen, so
the constructor that takes a QPen should be explicit.

Arguably, the named constructor idiom would be even better here:

    static QPainterPathStroker QPainterPathStroker::fromPen(const QPen &pen);

But QPainterPathStroker is non-copyable.

Change-Id: I3148dc0ee336026781d8bc1baf21c113c7b41ce8
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-02-21 20:33:10 +01:00
Jorgen Lind
ae4e44644a Fix rounding error when creating QT_FT_Vector
This fixes a problem that QScanConverter::mergeLine didn't recognize
lins as being the same (when they where), causing aliasing effects

Task-number: QTBUG-36354
Change-Id: I29d92ddb4e867025541bdc6b294cfaca55c0d3e1
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-02-21 20:33:10 +01:00
John Layt
3aae3e81ef QMarginsF - Add new QMarginsF class
Add a new QMarginsF class to complement QMargins in the style of
QSize/QSizeF and QRect/QRectF.

[ChangeLog][QtCore] Added class QMarginsF to support handling margins
with floating-point values.

Change-Id: Iaaa95ec85f5d126d9d864fc4b607241a8c8a8f3a
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-21 20:33:10 +01:00
John Layt
c7aa3a6925 QRect - Add missing QMargins subtraction operator
[ChangeLog][QtCore][QRect] Added QMargins subtraction operator.

Change-Id: I64d449e2bae81a34df2cd019cff3fb186f8aaaae
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-21 20:33:10 +01:00
John Layt
9c6447e081 QMargins - Add missing operators
Add missing standard operators.

[ChangeLog][QtCore][QMargins] Added missing addition and subtraction
operators.

Change-Id: I6aeed39531a736c12d378a817a9431279da79bc4
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-21 20:33:10 +01:00
John Layt
db352e1e97 QRect - Move QMargins operators
Move QMargins operators to QRect file, change include sequence.

Change-Id: I0e2ad91859ae65eb67c6ece50f8e4037516b463e
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-21 20:33:10 +01:00
BogDan Vatra
b9feb88466 Start the chronometer.
Change-Id: Ia165ce4a79b108ddb0d74a7d8fccd4f48fe14442
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-02-21 20:33:10 +01:00
BogDan Vatra
388745ecc8 Sort include headers
Change-Id: I453a40d57a7c3d6062c23f6772de1b8330f61067
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-02-21 20:33:10 +01:00
Andy Shaw
ecd3027d38 Strip any trailing spaces from the filename before trying to open it
On Windows, trailing spaces in a filename are silently ignored, so we
need to strip it before trying to open a file with it. Otherwise it ends
up being stripped later and in a case like " ." it will end up causing
Qt to think that a folder exists when it does not.

[ChangeLog][Platform Specific Changes][Windows][QtWidgets][QFileDialog]
Handled the case of having trailing spaces in a filename correctly so if
the filename ends up being empty that the parent path is used instead.

Change-Id: I6500cc3a44746bf4a65e73bcfb63265a0a97c8a3
Reviewed-by: Stephen Kelly <stephen.kelly@kdab.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-02-21 15:58:51 +01:00
Laszlo Agocs
54d43c6480 Expose NPOTTextureRepeat in QOpenGLFunctions
Desktop GL 2.0 and higher supports GL_REPEAT on non-power-of-two
textures. GL_ARB_texture_non_power_of_two mentions this explicitly
in issue #8.

Change-Id: Ia7f3b412b39cca4bec8a6caec3b1281b4c29ab75
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-02-21 15:53:48 +01:00
Laszlo Agocs
3c50119625 Avoid using GLX Pbuffers on Catalyst
Trigger QOffscreenSurface's fallback mode (hidden QWindow and a regular window
surface) instead. queryDummyContext() already works like this but the same must
be done for any QOffscreenSurface.

Task-number: QTBUG-36900
Change-Id: I64176ac6704e9d6ed768fa3d456c40c8818be6dc
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-02-21 15:53:41 +01:00
Laszlo Agocs
1e413e01e0 eglfs: Fix swapped red and blue with QOpenGLWidget
Change-Id: I0793d0b53c0e7df65fecfe43ef9daaf07413ea77
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-02-21 15:53:14 +01:00
Laszlo Agocs
727f50d11e Remove QT_OPENGLPROXY_DEBUG
Change-Id: Iac4c5217eca88ac14acca55d19e421d8e33cdb1d
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-21 15:53:03 +01:00
BogDan Vatra
4d08d80be6 Rework the splash screen for Android.
Allow the developers to define a splash screen which will be visible
until the first window is created.

[ChangeLog][Android] Allow the developers to define a splash
screen which will be visible until the first window is created.

Task-number: QTBUG-30652

Change-Id: I5da80be417ffffb03e66009f45745d4b387d2912
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-02-21 15:50:52 +01:00
BogDan Vatra
5e05c230af Fix paint artifacts.
Android is using double buffering, so, we need to repaint the bounding
rect of the repaint region, otherwise black holes will appear.

Change-Id: I21f36a6f5f1a6c64b605c0fef3af10dfdc5ec6e2
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-02-21 15:50:43 +01:00
Marc Mutz
ef2527df68 QTextObject: replace a use of an inefficient QList with QVector
The QTextLayout::FormatRange is larger than void* and thus should not be held in
QList. Use a QVector instead.

This is public, but as of yet unreleased API.

Change-Id: Ie04a561b43c91c3b2befb3cac2981821f84d5f77
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-02-20 21:34:44 +01:00
Friedemann Kleint
42afcfd8ce Windows: Ensure clipboard is flushed out before QGuiApplication is destroyed.
Otherwise, OleFlushClipboard() might query the data again which causes
problems for QMimeData-derived classes using QPixmap/QImage.

Task-number: QTBUG-36958

Change-Id: I89e58eeb64bd3481e89ad789f310f19ddb4604a2
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2014-02-20 20:27:42 +01:00
Kai Koehne
22f0dc4f89 Loosen checks for Q_COMPILER_VARIADIC_MACROS
So far we did bind the definition of Q_COMPILER_VARIADIC_MACROS to
C++11 (so gcc, clang will not define it in default gnu++98 standard).
However, variadic macros are a feature of the gcc preprocessor since
version 2.97, and are enabled in the default configurations on gcc, clang,
icc.

This might cause warnings and errors though if one enables additional
warnings in gcc, clang (e.g. by -pedantic). Anyhow, as a precedent
qglobal.h already relies on  'long long' ... The warning can be disabled
by adding '-Wno-variadic-macros'.

[ChangeLog][Compiler Specific Changes] Variadic macros are now enabled
more liberally for gcc, clang, icc. If you have warnings (because you e.g.
compile with -pedantic), disable them by -Wno-variadic-macros.

Change-Id: Ie979b85809508ad70cab75e6981f20496429f463
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-20 20:17:56 +01:00
Bernd Weimer
d641792ff2 Fix QFontMetrics width
Commit f4dd534 introduced a regression, so that QFontMetrics reported
a wrong size (to be more specific width) for FreeType fonts.
The calculation of glyph advances has to to reflect (rounded)
integral number of pixels. This was only done when the glyph was cached.
So in some cases the first call to QFontMetrics::size gave a different
result than the second.
This patch reverts f4dd5344fb.

The tst_QFontMetrics::same auto test only happened to work on some
platforms, on BlackBerry for instance it did not. Extended the test
case to make sure it works for different font sizes.

Change-Id: Ia5bb9abd3ff98193c9bba048b85207672ed8d9c3
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-02-20 20:13:27 +01:00
Jerome Pasion
e99c374944 Doc: Removed Contents listing for Qt Examples and Tutorials page.
-Qt Examples and Tutorials page does not need the table of contents.

Task-number: QTBUG-36838
Change-Id: Id51ebc7cba7831a24cd9d8e8e6bde7f96bece326
Reviewed-by: Martin Smith <martin.smith@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-02-20 11:06:14 +01:00
Shawn Rutledge
37b8bb5473 QFileDialog: restore state from QSettings after creating widgets
After 37ca2224ec it's necessary to
read the saved QSettings again after creating widgets, in order to
deal with the settings which only affect widgets (such as saved
bookmarks).  It's also necessary to read them if widgets are not used
though, because some of the settings affect native dialog options.

Task-number: QTBUG-36888
Change-Id: I8cf53db864b173c50a876a1d5ce29c1e073fcaa6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-20 08:24:34 +01:00
Andy Shaw
9babaac16d Only do a repolish() of the widget if it was already polished
By ensuring that the widget is already polished before doing a repolish it
means that if you reset the stylesheet then it unsets any changes that
the stylesheet had applied to the widget.

Task-number: QTBUG-18958

Change-Id: Ie0aeda0dac9f2211b7feca138c115cf2b48aac80
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-02-20 08:14:04 +01:00
Andy Shaw
72fbcc8bbf Ensure we switch back to the real paint engine when not emulating
When the emulation paint engine was no longer needed then it would still
end up using it because the flags would prevent it from being switched
back. This ensures that it has the right engine when something triggers
it to be switched.

Change-Id: I7571923d16cbebd9fdd34560631b561c07a724f7
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-02-20 08:13:57 +01:00
Sergio Ahumada
ac127a8c09 Blackberry: Fix QFileSystemEngine::tempPath()
Fall back to /var/tmp instead of /tmp if neither TMPDIR nor TEMP are set.

/tmp is not a true filesystem on BB10 but rather a symbolic link to /dev/shmem

For more info see
http://www.qnx.com/developers/docs/6.3.0SP3/neutrino/user_guide/fsystems.html#RAM

Change-Id: Ie690ed74ffd81b52ef4623458c3ff88629aee00a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-02-20 08:09:49 +01:00
Giuseppe D'Angelo
121e712935 QHash: use prime numbers when rebucketing
QHash uses an array representing the difference between 2^i and
the next prime; when growing, it calculates 2^x + array[x] (with
`x' representing the "hash table size in bits").

For some reason lost in history the differences are actually wrong
and the calculation above leads to using composite numbers.

Hence: use the right sequence and always produce primes. The right
sequence is actually A092131 from OEIS: http://oeis.org/A092131

Note that the sequence starts at A(1), but we need A(0) too.
Also we truncate the sequence to when growing too much, just like
the old code did, and use powers of two in that case instead.

Task-number: QTBUG-36866
Change-Id: Id2e3fc9cb567c0fdca305dee38f480e17639ca04
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@digia.com>
2014-02-19 23:53:01 +01:00
Peter Hartmann
1de244ea65 network: add support for the SPDY protocol
Currently the only supported SPDY version is 3.0.

The feature needs to be enabled explicitly via
QNetworkRequest::SpdyAllowedAttribute. Whether SPDY actually was used
can be determined via QNetworkRequest::SpdyWasUsedAttribute from a
QNetworkReply once it has been started (i.e. after the encrypted()
signal has been received). Whether SPDY can be used will be
determined during the SSL handshake through the TLS NPN extension
(see separate commit).

The following things from SPDY have not been enabled currently:
* server push is not implemented, it has never been seen in the wild;
  in that case we just reject a stream pushed by the server, which is
  legit.
* settings are not persisted across SPDY sessions. In practice this
  means that the server sends a small message upon session start
  telling us e.g. the number of concurrent connections.
* SSL client certificates are not supported.

Task-number: QTBUG-18714

[ChangeLog][QtNetwork] Added support for the SPDY protocol (version
3.0).

Change-Id: I81bbe0495c24ed84e9cf8af3a9dbd63ca1e93d0d
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-02-19 21:44:15 +01:00
Tor Arne Vestbø
d0784ae43b Prevent top/left clipping of anti-aliased glyphs in CoreText font engine
Padding the bounding rect was not enough, as we failed to shift the glyph
accordingly so that it would end up in the center of the bounding rect.

We also didn't take subpixel-positioning into account, which may shift the
position of the glyph too far to the right to be within the image size that
we reserve.

There are still cases where the glyphs seem clipped compared to the same
text rendered with CoreText, but that's because we end up shaping the
text slightly differently, resulting in different subpixel positions
than what CoreText chooses.

Change-Id: Icb88c829f86457b16bdecbc4c24b3f1c23448261
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-02-19 19:36:34 +01:00
Tor Arne Vestbø
e380a48af7 Unify alpha map padding in CoreText font engine
Instead of padding the image size manually, we rely on alphaMapBoundingBox
to give use the right glyph metrics.

For clarity, a few function arguments were renamed in the affected code.

Change-Id: I84c31e613a1048ea839a390af70342e5388ed0cb
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-02-19 19:36:29 +01:00
Tor Arne Vestbø
4de3c5db23 Unify glyph format between QFontEngine and QFontEngineGlyphCache
Instead of the glyph cache having its own cache type that always mapped
one to one to a font engine glyph format, causing confusion and needless
conversions, the glyph caches now use QFontEngine's glyph format enum.

This also removes the iffy use of an int for the glyphFormat in the font
engines.

Change-Id: I529bad5c179e004f63e152f7dcc311d298c3db98
Reviewed-by: Simon Hausmann <simon.hausmann@digia.com>
2014-02-19 19:36:25 +01:00
Oswald Buddenhagen
30fd22b957 Merge remote-tracking branch 'origin/dev' into stable
Change-Id: Ice524edcc51373509f0023ae7f7c2963f4602f88
2014-02-19 10:06:25 +01:00
Nikolai Kosjar
08cbbde617 QtConcurrent: Extend workaround GCC bug 58800 in median calculation
GNU/Linux distributions like Fedora update the __GLIBCXX__ date (e.g.
because of applied extra patches on top) and thus make the current
workaround useless. As long as no official gcc/libstdc++ version is
released, we can increment the "upper bound" date to cover such cases.

See also comment #1 at QTCREATORBUG-11129.

Change-Id: I1fdf6f312664163f6a99a8eddf490646ff25a87d
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-02-19 06:45:00 +01:00
Eskil Abrahamsen Blomfeldt
3a84d92f57 Make unicode ranges in font take precedence over codepage
Change 4b2c73b476 triggered a
regression on Android, because the DroidSansFallback.ttf font
has codepage ranges that list Arabic as a supported codepage
despite the fact that the font has no glyphs for Arabic.

If a font has valid unicode ranges which does not specify
support for e.g. Arabic, then the code page ranges for the
same script should be ignored.

[ChangeLog][Android][Fonts] Fixed support for Arabic text.

Task-number: QTBUG-36789
Change-Id: I7c5a0e303fd9ed2733275814fe752ae0fb54a207
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-02-19 06:42:17 +01:00
Thiago Macieira
d7b0581c1c Make sure that the compiler is strict in QtCore
ICC defaults to "fast math" mode, which allows it to do non-compliant
operations that may or may not result in unexpected values. Generally, it's
ok, but apparently the code in qlocale_tools.cpp is too complex, so we're not
taking chances.

I can't rule out an issue in the code, though.

Task-number: QTBUG-36795
Change-Id: Ica5cb77fb3a65d22ae8ad22e13b4ba78f1b5dadf
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-02-18 17:18:42 +01:00
Frederik Gladhorn
6aa09bbce5 Merge remote-tracking branch 'origin/stable' into dev
Conflicts:
	src/plugins/platforms/android/qandroidplatformtheme.h

Change-Id: I541bd3069df3ab54c7942d5f4a9e155e3b6566a0
2014-02-18 14:19:36 +01:00