Commit Graph

20494 Commits

Author SHA1 Message Date
Thiago Macieira
3bfdacaaeb Document that default-constructed QFuture are canceled
Task-number: QTBUG-40680
Change-Id: Idee9ff75c89c8349be779b90ee9c34a899d92c0c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Martin Smith <martin.smith@digia.com>
2014-09-22 19:13:31 +02:00
Giuseppe D'Angelo
0d48e774c6 Refactor some loops over EINTR
QT_CLOSE is #defined to be qt_safe_close which already performs
the EINTR loop. So there's no need of doing other loops
(either by hand or by the EINTR_LOOP macro).

Change-Id: Icca256124def5ab5d79c2ba101c6f889c85d19da
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-22 18:57:23 +02:00
Giuseppe D'Angelo
bc5a1c6d3f QFile: fix undefined behavior when closing a buffered file
C11 §7.21.3.4 [Files] says that

    The value of a pointer to a FILE object is indeterminate
    after the associated file is closed

POSIX.1-2013 reinforces by saying that

    After the call to fclose(), any use of stream results
    in undefined behavior.

This means we can't call fclose() again on a FILE *,
even if fclose() returned EOF and set errno to EINTR.

Change-Id: I282f4ff926e3c134729defa290c80d42431e97ce
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2014-09-22 18:57:18 +02:00
Giuseppe D'Angelo
8f622fef41 Prevent a Coverity warning about a dangerous code path
Coverity warns that we may access the gray array without initializing
it. The array is initialized if d (the source image depth) is 8.

However, when doing ordered dithering, we don't check that depth
any more and just use the array. There are instead checks in place
for the other dither modes; the one for ordered has been commented
out before public history.

So, for the love of kittens, put the check back.

Change-Id: I1cc5ced8edbb626777e54e9f4e58f152c6b28ddc
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-09-22 18:57:12 +02:00
Giuseppe D'Angelo
fb8c795302 QTransform: initialize the d member
Although never used, the d member triggers all sorts of warnings
when copying a QTransform around because it's technically
undefined behavior (reading from an uninitialized variable).

Change-Id: If06b6bea6f0ec0623c38ba330d46958b373cdc65
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-09-22 18:57:08 +02:00
Giuseppe D'Angelo
8c2f0ac382 QObject: fix a memory leak in moveToThread
For some reason it seems to be supported to call moveToThread(0).
That call will allocate a new QThreadData for the object. However,
if we then detect that we're calling moveToThread from a thread
which is not the one the QObject has affinity with,
we error out leaking that QThreadData object.

Change-Id: I0fe6625a2a9887535e457f3897b514d2a03d1480
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-09-22 18:56:50 +02:00
Giuseppe D'Angelo
d9e1a0f05b QRegion: fix a memory leak
An early return in case of errors leaked memory tracked in a variable
in scope.

Change-Id: I68cd77890608caff54df7476d38850e5541ce76e
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-09-22 18:56:45 +02:00
Giuseppe D'Angelo
772b799a83 XCB: fix a possible array overflow leading to a crash
The QClipboard::Mode returned from modeForAtom should be checked
everywhere because values greater than Selection (i.e. FindBuffer)
aren't supported on X and should mean error conditions.

The lack of such a check did an out-of-bounds array access, which
could lead to a crash.

Change-Id: I70f70b5f713ab2f892e258d4df2f7afeb434f0c1
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Gatis Paeglis <gatis.paeglis@digia.com>
2014-09-22 18:56:33 +02:00
Giuseppe D'Angelo
ebdd56c5bd XCB: fix a memory leak
An early return caused a leak of a new'd allocated object.

Change-Id: I9fbc37238dd49066d24363a2e8ee8bf35b155301
Reviewed-by: Uli Schlachter <psychon@znc.in>
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
2014-09-22 18:56:26 +02:00
Giuseppe D'Angelo
8259413e41 GTK syle: initialize all members of GdkColor
Coverity rightfully complains that we're copying a struct with an
uninitialized member, triggering undefined behavior.

Change-Id: I7635b859eb11e5eb9b825df8e23b453116059892
Reviewed-by: J-P Nurmi <jpnurmi@digia.com>
2014-09-22 18:56:22 +02:00
Timur Pocheptsov
b4af1235ef OS X: File dialog does not show "Media" section.
This bug can be reproduced (AFAIK) only on 10.9. To fix it I suggest we create
NSOpenPanel/NSSavePanel
_every_ time it must be displayed. Actually, that's what I've seen in all code samples
I was able to found - nobody tries to retain this panel and re-use it.
If we re-use it, "Media" section magically disappears.
I believe this bug is not Qt's bug, but something weird in Cocoa.

Task-number: QTBUG-40655
Change-Id: Ic0e76e0a9a5444a76f336d511c0ff93f9fd05797
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-09-22 17:06:34 +02:00
Timur Pocheptsov
da0c74550f OS X: main window doesn't become key.
When ordering a key window out Cocoa
tries to find a new KEY window. Looks like it prefers the current MAIN
window and since QNSPanel is never a main window, Cocoa is breaking
the stack order. To avoid this - try to change the key
window BEFORE ordering out a window.
The application has a stack of all open windows (visible and hidden),
we iterate through this stack starting from our current key window
and look for the nearest window below, that can become a new key window.
Most probably, it will be our transient parent :)
This code will change (potentially) the key window _only_
if there is a transient parent.

Task-number: QTBUG-39809
Change-Id: I96b630799341875fc7e38dabf1ff6416338e687b
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-09-22 17:06:24 +02:00
Eskil Abrahamsen Blomfeldt
412ec70f14 OS X: Fix menu item shortcuts without modifiers
A regression was introduced by bdebec4e2e.
The intention of the change was to avoid using Qt's shortcut mechanism
to trigger menu items which were already triggered through the regular
menu API in Cocoa. However, Cocoa has trouble with key equivalents that
do not have any keyboard modifiers. Thus, we have to allow these
particular key sequences to go through the regular system. I've verified
that the original bug is still fixed with this change.

[ChangeLog][OS X] Fixed menu item shortcuts without keyboard
modifiers.

Task-number: QTBUG-41192
Change-Id: I8f5a9cbc7a448b3cb0519baed95be5cbb630205c
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-09-22 14:32:28 +02:00
Gabriel de Dietrich
65a991e57e Make sure we don't delete child QWindows if they have WA_NativeWindow set
Deleting a QWindow automatically deletes its child windows because
they are in the QObject hierarchy. However, if the user sets both
WA_NativeWindow and WA_DontCreateNativeAncestors, we can't just
delete that widget's QWindow. First because the widget doesn't get
notified (and maybe it should be), and then because we may invalidate
any reference to the QWindow the user may have kept.

Our solution is to reparent the child QWindows into the new parent's
closest QWindow. We must, however, take the precaution of not keeping
any reference to the backing store in the platform window. Reparenting
operations can trigger repaints on the platform window, but the backing
store is not set and flushed until later.

Task-number: QTBUG-38377
Change-Id: I353f5528f227a227b6d10419367cbe1d5d07a94e
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-09-22 14:11:08 +02:00
Giuseppe D'Angelo
87fbfe074b Fix a mishandling of the fd returned by socket(2)
socket(2) is allowed to return 0, so 0 should not be included
when checking for errors.

Change-Id: I0454ea60347d90078d3ab3046969add8d5c37935
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-22 14:08:57 +02:00
David Schulz
5d688c5780 Add backslash to the list of word separator.
Task-number: QTBUG-40384
Change-Id: I16ae1432f3bdd7e577593fc43336bf29c735a66b
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-09-22 13:42:59 +02:00
Albert Astals Cid
a966b19b52 Fix crash in QNetworkAccessCacheBackend::closeDownstreamChannel
device is private, always null and class has no friends, so no need to have it at all

Change-Id: I320d47f1a712a3202c08b494563533e29d185501
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Reviewed-by: Richard J. Moore <rich@kde.org>
2014-09-22 13:42:03 +02:00
Friedemann Kleint
a6316e6e74 Fix emission of QDesktopWidget::workAreaResized().
Connect to QScreen::availableGeometryChanged().

Task-number: QTBUG-32567
Change-Id: I2097d80faa83ae062f7e149122fba26d23432e95
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-09-22 13:03:21 +02:00
Louai Al-Khanji
4918623f76 direct2d qpa: fix text selection
1cdcf64ad5 recently introduced a rendering
bug whereby certain clips would be handled incorrectly.

Change-Id: I3f486819c66b1d665243c8dc1e9d077dd2f64f25
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-09-22 13:00:11 +02:00
Christian Kandeler
c6c0eb084a Document non-intuitive behavior of QTreeWidgetItem::setHidden().
Task-number: QTBUG-30366
Change-Id: I02e098fbf0e3a44794ed0e1b1bf533c1c9ad5632
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
2014-09-22 12:38:17 +02:00
Mitch Curtis
3312ac9169 Correct information about all headers being movable.
This only applies to QTreeView.

8eb3d724a9 introduced this error.

Change-Id: Ia8a2c387afbd19e4d98ea6f81e5ce6409d79bcd9
Reviewed-by: Thorbjørn Lund Martsum <tmartsum@gmail.com>
2014-09-22 09:13:38 +02:00
Pierre Rossi
52db71f191 [Bearer] Try a bit harder to open a network session
The symptoms were made apparent in the xmlpatterns command line
utility when trying to use the synchronous HTTP code path in
QXmlQuery for fetching schemas.

Change-Id: I93b283fdec4b501a5c1fc646f7ddc30d8407f5ae
Reviewed-by: Markus Goetz <markus@woboq.com>
Reviewed-by: Jocelyn Turcotte <jocelyn.turcotte@digia.com>
2014-09-22 09:08:06 +02:00
Maks Naumov
d41c5f9dba Remove unused variable in QStyleSheetStyle::hasStyleRule()
Change-Id: I052fcc067ffbd1d470593d16af5f2189541c6264
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2014-09-22 05:43:23 +02:00
Lars Knoll
10414444e1 Add support for blacklisting test functions
We need to have a finer grained control over the tests
we skip in our CI system. This adds a blacklisting
mechanism that allows blacklisting individual test
functions (or even test data) using a set of predefined
matching keys for the operating system and some other
relevant variables.

QTestlib will search for a file called BLACKLIST in the test
directory and parse it if found. The file contains a simple
ini style list of functions to blacklist. For details see
qtestblacklist.cpp.

Change-Id: Id3fae4b264ca99970cbf9f45bfb85fa75c1fd823
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-09-21 20:58:41 +02:00
Alex Blasche
23a03ebcd1 Fix crash in QCombobox when resetting model during currentIndexChanged()
Task-number: QTBUG-20415
Change-Id: Idffc0f29cc55d834c2736ce7562dd7cfe912d327
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
2014-09-21 02:24:53 +02:00
Andy Shaw
b53f6fdd31 Respect the PM_SmallIconSize setting for icons in a menu on OS X
When a platform menu is used then it would hard code the icon size to
16x16. Instead of using the hard coded value then PM_SmallIconSize should
be used instead.

Change-Id: I27540ebc4397501e8f57686a118c28cd7167c0a1
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-09-20 18:23:35 +02:00
Richard Moe Gustavsen
4d8dd7f673 Xcode generator: always create 'Copy Bundle Resources' phase
If creating an asset catalog from Xcode, Xcode will
add it to the "Copy Bundle Reources" phase, if it exists.
Since we don't always generate that phase, Xcode will
silently fail with the result that the asset catalog will
not take effect (no icon, launch images etc).

This patch will ensure that we always create the phase
(like native Xcode project does), which will fix the
problem.

Change-Id: Ief949d63543977f1021db992e0c41714d898e68b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-09-20 18:21:45 +02:00
Dyami Caliri
dbd400b937 Fix memory leak of QSettings in QLibraryInfo::platformPluginArguments
The code calls QLibraryInfoPrivate::findConfiguration() to get a
new QSettings object but was not deleting it.

Change-Id: I207a7ff55f87aff91e2898a99e9cac06d57c5f7d
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-09-20 16:42:08 +02:00
Tor Arne Vestbø
e98b5cddeb iOS: Allow settings custom input and accessory views through ImPlatformData
Change-Id: Ib802c73f9c9e27853fa0dd25c304d77df570309e
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-20 11:53:43 +02:00
Tor Arne Vestbø
6910b8a552 iOS: Refactor text input handling to standalone responder
Instead of coupling the visibility of the virtual keyboard to
the first-responder status of the currently active QUIView, we
now treat first-responder as a separate state, tied directly
to QWindow activation. This fits better with the concept of
first-responders in iOS, as a UIView can become first-responder
without dealing with text input, eg when dealing with touch
events or menu actions.

The decision point on whether or not to show the virtual
keyboard is then handled by implementing the conformsToProtocol
method and selectively returning YES for the UIKeyInput protocol.
iOS internally calls _requiresKeyboardWhenFirstResponder on the
UIResponder to determine this, but since we can't override a
private method (like WKContentView in WebKit does) we have to
rely on the fact that the implementation of the method uses the
protocol conformance to make its decision.

Once the virtual keyboard is up, we then need to react to changes
to its configuration, such as keyboard type or the type of return
key. Normally this would be a simple call to [view reloadInputViews],
but iOS will not reload the built-in keyboards unless the UIResponder
returns YES for _requiresKeyboardResetOnReload. Since we again can't
override this private method (like WebKit does), we work around it
by taking advantage of the fact that iOS will treat any change to
the first-responder as a reason to do a keyboard reset. By using
a stand-alone UIResponder for text input we can init and destroy
these responders as needed, so that every call to reloadInputViews
will trigger a reset, as the responder has not been seen before.

We keep track of changes to the input-method-query, and detect
whether or not we need to bring up a new UIResponder for text
handling.

As part of this refactoring we now tie the visibility of the
virtual keyboard to the presence of a focus object that has
input-methods enabled. This means that we automatically will
track changes to input-elements through the focus changes,
and reconfigure or hide the keyboard as appropriate. As a
result the hide() method of QInputMethod becomes a no-op on
iOS.

Change-Id: I4c4834df490bc8b0bac32aeedbd819780bd5aaba
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
2014-09-20 11:53:28 +02:00
Eskil Abrahamsen Blomfeldt
6e4dc7073a Fix default implementations of raster ops
In the list of default implementations, the raster ops added in
ae0ddb8c72 were all offset by one
composition mode because of a duplicate entry in the array. The
effect would be, e.g. that using the NotDestination operator would
resolve to the Set operator instead.

Most users will probably not have experienced this since any of
the asm-based functions will be preferred.

[ChangeLog][Painting] Fixed some very rare cases of mismatched
raster modes in QPainter.

Change-Id: Ia242b54c78acbe1c89d9b4ecd10936564ec134b2
Task-number: QTBUG-41413
Reviewed-by: Andy Shaw <andy.shaw@digia.com>
2014-09-20 10:54:02 +02:00
Tor Arne Vestbø
bbacf3d79d a11y: Don't try to update accessibility if there's no interface
Change-Id: I970729e65ba0eb857e6974f9947f27ae8e6410c3
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-09-20 00:21:30 +02:00
Tor Arne Vestbø
076d22efa6 a11y: Make QAccessibleButton and friends resolve role dynamically
The role may changed based on the checkable state of the button, eg, so
we need to resolve the role at runtime instead of hard-coding it in the
constructor.

Change-Id: I78faee08189c5510ca9964b07ad94bcf5d4fa11b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-09-20 00:21:24 +02:00
Alexander Volkov
40add779bd xcb: Fix memory leaks in DnD
Change-Id: Ie19711c17769128db67a0b083ef72109f49bfe78
Spotted-by: Alexander Smirnov
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-09-19 23:31:37 +02:00
Alexander Volkov
34de989a94 Keep a source of propagated mouse events
Synthesized mouse events should not cause mouse events which
look like they were obtained from the system.
So set the source of generated events from the original event.

Change-Id: I862829446ac6ef664e1b8e4a5b54ed11926a1d4b
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-09-19 23:31:30 +02:00
Alexander Volkov
ba46c0eef5 Set a missing source for mouse events synthesized by Qt
Mouse events synthesized from touch events by Qt
should be marked as Qt::MouseEventSynthesizedByQt.

Change-Id: I73612621a0248440b3b773f1280395c05c55e4aa
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-09-19 23:31:22 +02:00
Dyami Caliri
b08b536f20 Windows qpa: fix minimum allowed fixed height, width on windows
A window width constraint coded in Qt4.8 was accidentally applied
to the height in Qt5. Upon further review, it does not seem that
this constraint is needed, in any case. Different versions of
Windows have different minimum window widths (8.1 had 124px
instead of 112), and setting a smaller value seems to cause no
harm.

Task-number: QTBUG-32820
Change-Id: I21ad6d406abf7344aff54d32b41974265aa9ea81
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-09-19 19:15:55 +02:00
Dyami Caliri
75e5ffe0f7 Update widget winId when screen changes
When a window's screen changes it may recreate the platform window.
In that case, update the winId in the widget to keep it in sync.

Task-number: QTBUG-40681
Change-Id: Iec815320214832bb63952de3a5bd1340a04dacd4
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-09-19 19:15:42 +02:00
Andrew Knight
ed167dcb72 winrt: Fix gethostname linker error in qsqldatabase tests
With VS2013 Update 3, Win32 sockets are now allowed in Windows Store
Apps. Upgrading VS meant that gethostname was visible to the application,
but failed to link as the mkspec doesn't link to ws2_32. Adjust the
workaround not to call the newly visible symbol on WinRT.

Change-Id: Ide6d8759cca7acab6c466a9bf4d6b876f6ca7605
Reviewed-by: Tony Sarajärvi <tony.sarajarvi@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
2014-09-19 19:15:23 +02:00
Andy Shaw
a5df2e7120 Cocoa: Handle insertNewLine selector for when it is sent while composing text
Some IMEs will perform an insertNewLine when Return/Enter is pressed while
composing text as well as causing the edit to finish. By handling this it
will ensure that the extra enter/return event is sent when the IME
requests it.

Task-id: QTBUG-39125
Change-Id: Ice6eded68e6b1dc51703a38316f76f78099923da
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-09-19 09:35:56 +02:00
Tomi Korpipää
66e23d23a7 Changed font-family to Times New Roman
Task-number: QTBUG-40839
Change-Id: I3be6de829b6f26b26e7ec654ccb117bdb58cdf41
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-09-19 07:48:28 +02:00
Allan Sandfeld Jensen
ca36198251 QPaintBuffer paints drawGlyphRun with wrong font
If QRawFont and and drawGlyphRun is used on a QPaintBuffer it will lose
the QRawFont and end up painting with primary font at the time.

With this patch, QStaticTextItem can now indicate that they must be
drawn using the supplied font-engine and that the font information is
not enough.

Change-Id: Id6bd376d797d2bfb457e7de55c48bdcf9f20ae38
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-09-19 02:55:29 +02:00
Allan Sandfeld Jensen
4453bfcb20 Restore -qt-block-indent on <li> elements
Task-number: QTBUG-20877
Change-Id: If049065ed99eaf8ffc85c8ff54d3da892a095795
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-09-18 17:55:03 +02:00
Laszlo Agocs
5d5de7a97f QOpenGLWidget: Play nice with empty paintGL
Applications that do not override paintGL() (may happen in some test code)
will not perform any GL rendering, not even clearing. This is fine, but
to be safe we need to do a clear right after creating the FBO in order to
prevent showing garbage.

Task-number: QTBUG-38327
Change-Id: If062901bb18724f961e41856085470e37b49abbe
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-09-18 17:45:05 +02:00
lasconic
4aba2d07d2 Use metrics returned by GetGlyphOutline in GGO_METRICS mode
GetGlyphOutline Windows API returns wrong values when used with an
OpenType PS font and in GGO_NATIVE mode. It causes problem when
exporting to PDF. The fix changes the GetGlyphOutline call to use
GGO_METRICS instead.

Task-number: QTBUG-12799
Change-Id: I47d6d16b6e7819b51bc444420ada4a47d5f24f4e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-09-18 17:44:37 +02:00
Adam Majer
1fa3627423 Remove reference to removed qatomic_sparc.h
qatomic_sparc.h was removed previously as part of general cleanup of
old atomic code for Qt 5.3. Unfortunately SPARC include reference was
not removed resulting in build failure on that platform.

Task-number: QTBUG-41384
Change-Id: Ic6e31b32324b0e5dd3700a6a21515a8eea5668bd
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-09-18 15:58:13 +02:00
Eskil Abrahamsen Blomfeldt
a614bc6e39 Cocoa: Always add Arial Unicode MS to fallback list
The fallbacks on the platform should ideally contain all fonts that
support the script passed in, but this would require populating the
font database and checking the unicode ranges for all fonts, so it
would cause a significant performance hit on Mac. What we do here
instead is just return a set of default fonts as the fallbacks
and disregard the requested script.

The consequence of this is that some special unicode codepoints were
not supported on Mac, because we weren't working with a full fallback
list.

To rectify this without breaking performance, we always add Arial
Unicode MS to the end of the fallback list as a final fallback.
This should always be present on the system and has a wide support
of different scripts.

[ChangeLog][OS X][Fonts] Fixed missing glyph box shown in place of some
uncommon Unicode code points.

Change-Id: I4fc8576bfddc8a73204aca2b16437d42c524bc79
Task-number: QTBUG-40986
Task-number: QTBUG-40549
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-09-18 13:42:32 +02:00
Laszlo Agocs
1e41e9b77d Add a note about winId() to QOpenGLWidget docs
Task-number: QTBUG-40765
Change-Id: I0dbb010bb96c6b41c67392b8846782a354481e5e
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-09-18 10:06:49 +02:00
Laszlo Agocs
f72895361d Add a multiwindow manual test using QOpenGLWindow
This is a very useful tool to test the behavior of a given platform
when it comes to rendering on three contexts to three window surfaces
from the gui thread and calling swapBuffers for each.

Change-Id: If3abd055d0dee7cfb24098484326aa24261556bc
Reviewed-by: Gunnar Sletta <gunnar@sletta.org>
2014-09-18 10:06:18 +02:00
Laszlo Agocs
add7c0aadd Propagate swap interval from QOpenGLWidget to the tlw
Otherwise it is impossible to set a swap interval different
than the one set by QSurfaceFormat::setDefaultFormat().

Both windows and xcb will pick up the updated interval from the
window on the next frame.

Change-Id: I55a59f83a62d3adcea687adf28639646b576ed58
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-09-18 10:05:55 +02:00