Commit Graph

18590 Commits

Author SHA1 Message Date
Gatis Paeglis
ba28ca60f6 Fix compilation on libxcb 1.5
libxkbcommon-x11 uses xcb_discard_reply() function which was
introduced in libxcb 1.6, this brakes the compilation in
src/3rdparty/xkbcommon/src/x11/util.c when linking with libxcb 1.5 :

linking ../../../../plugins/platforms/libqxcb.so
.obj/util.o: In function `adopt_atoms':
util.c:(.text+0x347): undefined reference to `xcb_discard_reply'
collect2: error: ld returned 1 exit status

We can use an alternative approach to discard uncollected replies
and in addition add a fix for out-of-bounds error [1]

[1] e3f751be66

Task-number: QTBUG-38952
Change-Id: Ide90f9a2e75fc79d2bab0b81adb282c8cc81c345
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-05-19 15:52:58 +02:00
Laszlo Agocs
af16f88e97 egl cursor: The sampler is a uniform not an attribute
Change-Id: Ibae21653040f1d8dff2d2c0b7c1b2812d9e14551
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-05-19 12:51:33 +02:00
Bernd Weimer
43d4fecde5 Fix auto test failure output on QNX
On QNX mbstowcs does not ignore last parameter (max) when first (dest)
is NULL. Set it to sufficiently large value to yield proper results on
QNX. Other platforms (standard libraries) will ignore this value anyway.

Change-Id: Ie4695254d45082e151a052bf16de684af3b1ba1e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-19 10:03:38 +02:00
Dyami Caliri
71006cf04c CoreWLan: wait for scan thread to finish
If the scan thread is running when QCoreWlanEngine is destroyed
it will access stale data and cause a crash.

Task-number: QTBUG-36000
Change-Id: I8cc9e39a3f7d4736da39e8b31f6963db35318f19
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-05-18 18:29:35 +02:00
Jake Petroules
518d874bc8 QMacStyle: Always draw status bar in active state if the window is main.
On OS X, most controls are drawn active or inactive based on their
window's main state, NOT its key ("active" in Qt) state.

Change-Id: If447d0a537bc594978f7202e7888ceacb54ec8fa
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-05-17 02:07:36 +02:00
Gunnar Sletta
cfcbb957c7 Call tzset() before localtime_r() as the docs say.
Without it, one might run the risk of QDateTime::currentDateTime()
returning an invalid QDateTime the first time after changing timezone.

Change-Id: I3efb04d41e7fe4685f6cc5fb41b68424eb4b9eb8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-16 19:20:01 +02:00
Jorgen Lind
102cec7ec0 QOpenGLTextureBlitter fix allocating 4 times as much memory as needed
and copying a lot of garbage.

Change-Id: Idf1d23d06423a98ce503c9bcf9614b12dd1fb92a
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-05-16 14:39:00 +02:00
Frederik Gladhorn
1248eddd14 Accessibility Android: Fix states
Using the bit flags as parameters to the JNI functions would fail since
they'd always be cast to false instead of the c-style casts.

This fixes checkboxes reporting themselves as checkable and their check
state.

Task-number: QTBUG-38831
Change-Id: I30ab63ceabbec4cc2fbda9475e05523d915087fe
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-05-16 14:28:30 +02:00
Frederik Gladhorn
679cd99f3d Accessibility: Update ComboBox text on arrow keys
Use ValueChanged to notify of changes in the ComboBox.
On Linux we need to update name and then send selection-changed for
Orca.

Task-number: QTBUG-36814
Change-Id: Icdd34adddeac532476a6dd910d1e8bd33bcd590b
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-05-16 14:28:11 +02:00
Frederik Gladhorn
94f9c9678a Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2014-05-16 14:14:25 +02:00
Richard Moe Gustavsen
986309cbf0 cocoa: remove rtf converter from cocoa
There is now a modified rtf converter in qmacmime
that can also write rtf back to the pasteboard, and
that works on both OS X and iOS.
So we can therefore remove the one from the cocoa port.

Change-Id: Ieed04502752290d2f139f98cec69477ff1edbe4e
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-05-16 14:10:36 +02:00
Richard Moe Gustavsen
6388163df8 qmacmime: rename and move QMacPasteboardMimePlainText to the cocoa plugin
com.apple.traditional-mac-plain-text is not in use on iOS
according to Apples UTType reference. So we enable it only
for OS X by moving it into the cocoa port.

The order in which we instanciate convertors matters when
the application is reading data from the pasteboard.
But since QMacPasteboardMimePlainText should come before the
other "text/plain" convertors on OS X, moving it to the cocoa
port is safe as those convertors are instanciated after
those in qmacmime.

Change-Id: I76b9b14e5ce78f34e0f1ecbfee71e48a27a4687b
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-05-16 14:10:32 +02:00
Richard Moe Gustavsen
514697893f qmacmime: add support for public.rtf
Application like Safari on iOS posts rtf to the
pasteboard when copying html. With this converter added, you
can then paste rtf as html into Qt

Change-Id: I6b62bcc9cfc0b16a47d44bd8d74062226522526d
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
2014-05-16 14:10:24 +02:00
Bernd Weimer
fa3d264b0b QNX: Fix tst_selftest
GRAPHICS_ROOT and TZ environment variables are needed in child
processes in order to successfully run the auto test selftests.

Change-Id: I7befabd535b4c47b1e75acbe3d6158d0d9b811b3
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-05-16 10:20:34 +02:00
Laszlo Agocs
72558e810d Avoid setting unnecessary parameters in QOpenGLWidget
QOpenGLFramebufferObject sets the texture parameters already, do
not set them again. Especially not GL_REPEAT, which is wrong and
breaks on devices that do not support REPEAT on NPOT textures.
What QOpenGLFramebufferObject does is just fine (it sets NEAREST/
NEAREST and CLAMP_TO_EDGE).

This is important for WebEngine where the QWidget-based web view
is using QOpenGLWidget.

Change-Id: I264d30118ce7adf50f68f2c7b9a5599a406b4362
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
2014-05-16 10:04:06 +02:00
Joerg Bornemann
e26ed09102 Revert "fix build for MSVC 2010"
The condition in WinUser.h is _WIN32_WINNT >= 0x0602.
The original #if was correct.

This reverts commit 42d162addf82aa2064600219b9b3224836f676ac

Change-Id: I7a3098ced143fba7b31b138cc7aaaf8f6920bef3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-05-15 12:41:45 +02:00
J-P Nurmi
1a93c2df1d Disable compiler warnings for libqtharfbuzz-ng
This 3rdparty code produces a lot of warnings especially with clang.

Change-Id: I6f48410699e785d1b2e84b9a6d7b0ba8751179b0
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-15 09:18:20 +02:00
Frederik Gladhorn
2a9201c1e6 Fix error when reading newlines
Fix error 'operation priorities' identified by static analysis from
http://www.viva64.com/en/b/0251/

'!=' operator's priority is higher than that of the '='

Change-Id: I2668171acb506992e3a15b113682ac04ba309532
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2014-05-14 20:10:03 +02:00
Thiago Macieira
5b4c0da9d0 Move the hex digits out of _q_toHex
Avoids them being duplicated several times in QtCore

Change-Id: Idee0168ed9d452a572ad46e2a14d2d4d3c7d2f7e
Reviewed-by: Robin Burchell <robin+qt@viroteck.net>
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
2014-05-14 20:10:03 +02:00
Jerome Pasion
8e5e9d7987 QDoc: Added "QML Type" to HTML titles of QML type pages.
-makes it more consistent with the C++ pages.
-easier to read for the search engines.

Change-Id: I172bdff04e0aa80ee58a903d112585992234d7d7
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-05-14 20:10:03 +02:00
Paul Olav Tvete
a968042f54 Restore fullscreen mode after keyboard is dismissed
Showing the onscreen keyboard will also show the navigation
soft buttons. We need to tell Android to re-enable immersive
mode after the keyboard is hidden.

Since we now do this in two places, refactor the logic.

Task-number: QTBUG-36916
Change-Id: Ic69c28f41f5e8cf324d81f9bada3cb148dfb5306
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-05-14 20:10:03 +02:00
Eskil Abrahamsen Blomfeldt
08117eee00 Android: Support QFont::Courier style hint
Android doesn't have a serif monospaced font, so for the courier
style hint we at least need to fall back to something monospaced,
which is "Droid Sans Mono" on Android.

[ChangeLog][Android][Text] Fall back to Droid Sans Mono for
QFont::Courier style hint.

Task-number: QTBUG-37844
Change-Id: Ib42caf53a8fb7b9958e10a8f123cac928eee7069
Reviewed-by: Paul Olav Tvete <paul.tvete@digia.com>
2014-05-14 20:10:03 +02:00
Bernd Weimer
1b2614477f Fix accessibility auto test
Prevent crash on platforms that don't support accessibility by skipping
tests.

Change-Id: I42ba44df3200e0abd62797c76a5c538fb1d2757c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
2014-05-14 20:10:03 +02:00
Richard Moe Gustavsen
8df62598ac qmacmime: add support for public.text
Copying a URL from Safari to Qt app does not work. The reason
is that it lies on the pasteboard as public.text, which we
don't support.

This patch will implement support for public.text.

The UTI public.text is documented as text with an unspecified
encoding. On iOS, this turns out to be UTF8 (which also matches
[UIPasteboard generalPasteboard].string).

Task-number: QTBUG-38551
Change-Id: I216dab206d3bff2dde99927ed7e5a3d85309f2a2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2014-05-14 20:10:03 +02:00
Louai Al-Khanji
bf284c2bbd Direct2D QPA: Fix check for cosmetic pen
When checking whether a QPen should be treated as cosmetic we need to
take into account the render hints set on the painter as well.

Change-Id: I8200611af08000d2d1626d8ef97eb3f6dac4951c
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Andrew Knight <andrew.knight@digia.com>
2014-05-14 13:17:17 +02:00
Frederik Gladhorn
cb3348dec9 Merge remote-tracking branch 'origin/release' into stable
Change-Id: If1abbe7810ea43ae750db91066f9f579c79b2289
2014-05-14 12:37:34 +02:00
Eskil Abrahamsen Blomfeldt
d16508a285 Fix crash when loading invalid font data in QRawFont
When passing invalid data to QRawFont, we need to fail gracefully
and mark the font as invalid, instead of crashing. This crashed
because of different missing sanity checks in the Windows
and FontConfig font databases.

[ChangeLog][Text] Fixed crash when trying to load a font from
invalid data.

Task-number: QTBUG-37190
Change-Id: I62c81217ec7d873350b575c9d4ae8e6f0a939540
Reviewed-by: Michael Bruning <michael.bruning@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-05-14 09:13:38 +02:00
Bernd Weimer
4f83102df0 QNX: Make QDateTime "daylightTransitions" auto test pass
Change-Id: I8c68d15806c6ec39e98dddda86823d9b4e3a3169
Reviewed-by: John Layt <jlayt@kde.org>
2014-05-14 09:12:39 +02:00
Bernd Weimer
87152d3c89 QNX: Fix tst_qfileinfo
Change-Id: Ia97a0c661d675e4f5ba800c32f8368583d58ee20
Reviewed-by: Sergio Ahumada <sahumada@blackberry.com>
2014-05-14 09:12:16 +02:00
Frederik Gladhorn
06e27c2a52 Accessibility Android: Fix crash for invalid interfaces
When asked for an accessibility interface with invalid ID we still
return an AccessibilityNodeInfo. But instead of setting that interfaces'
ID to the invalid ID, rather return one with no ID set so it will simply
fall back to the view.

Task-number: QTBUG-38829
Change-Id: If66f5b1b42ba46949d94a547050c7a2cfc7ee9b7
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
2014-05-13 22:10:21 +02:00
Kai Koehne
c8de2a8b5f Fix MSVC warnings in qspdyprotocolhandler
Fix warnings about 'truncation of constant value':

qspdyprotocolhandler.cpp(583) : warning C4309: '=' : truncation of constant value
qspdyprotocolhandler.cpp(656) : warning C4309: '=' : truncation of constant value
qspdyprotocolhandler.cpp(659) : warning C4309: '=' : truncation of constant value

Change-Id: I3c32b9f47c06da9b50f5c94871a2ee455b3a5cb6
Reviewed-by: Peter Hartmann <phartmann@blackberry.com>
2014-05-13 15:09:15 +02:00
Laszlo Agocs
2406a8b45f Remove an unused workaround and fix up the comments in the glyph cache
This old workaround is not necessary and could not be used anyhow since
it would affect a way too wide range of drivers. Modern drivers should
be able to honor the default GL_UNPACK_ALIGNMENT of 4 even for 1 byte
per pixel formats like GL_ALPHA. Instead, document why the behavior
is correct.

Change-Id: I1687448ba92875c8ff772ccc371894e88ff64096
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-05-13 14:38:05 +02:00
Frederik Gladhorn
12ba0d2cb3 Merge "Merge remote-tracking branch 'origin/release' into stable" into refs/staging/stable 2014-05-13 14:16:46 +02:00
Andy Shaw
79d35b331a Fix horizontal scrolling on Windows when ALT + mouse wheel is used
Task-number: QTBUG-30833
Change-Id: I366d2979060ba67f745f7c783dee8d7669ebdf57
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-05-13 14:12:02 +02:00
Thiago Macieira
9a747cb5b7 Fix an off-by-4 error in qHash with CRC32
I tested only the 64-bit build. The 32-bit build was reading garbage
past the end of the strings in some cases.

Change-Id: If6d239754e16a17cc4e8bb71e2b7778429dfa7ba
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-05-13 12:47:30 +02:00
Allan Sandfeld Jensen
a8877f529d Scrolling devices should not override touch or tablet devices
XISelectEvents override any earlier set event mask for the same device
ids. This may cause touch devices to stop reporting touch events if they
export scroll buttons or axis.

The patch checks for each scrolling device if they are also a touch
devices and includes the necessary bitmask if they are, and skips
any devices also recognized as tablet devices as they already capture
all relevant events.

In addition tablet event handling will no longer block handling of wheel
button events for scroll devices with the same device id.

Task-number: QTBUG-38935
Change-Id: Ifd4657beb0a0cebffe89d3470ef2bd605eb3552e
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
2014-05-13 12:47:16 +02:00
Allan Sandfeld Jensen
7cc175c9d6 Assume unlabelled mouse buttons are default buttons
This patch fixes legacy wheel scrolling for XInput2 drivers that fail to
label mouse buttons correctly.

Task-number: QTBUG-38937
Change-Id: I659890517e749dc0039489e0b7a8c38be1065d33
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Shawn Rutledge <shawn.rutledge@digia.com>
2014-05-13 12:47:12 +02:00
Thiago Macieira
b23e72a772 Fix stateful handling of invalid UTF-8 straddling buffer borders
When a UTF-8 sequences is too short, QUtf8Functions::fromUtf8 returns
EndOfString. If the decoder is stateful, we must save the state and then
restart it when more data is supplied.

The new stateful decoder (8dd47e34b9)
mishandled the Error case by advancing the src pointer by a negative
number, thus causing a buffer overflow (the issue of the task).

And it also did not handle the len == 0 case properly, though neither
did the older decoder.

Task-number: QTBUG-38939
Change-Id: Ie03d7c55a04e51ee838ccdb3a01e5b989d8e67aa
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Lars Knoll <lars.knoll@digia.com>
2014-05-13 12:37:19 +02:00
Bernd Weimer
8094bb537a QNX: Silence startup warnings
Missing PPS objects for navigator, virtual keyboard and buttons can be
expected on QNX and should not lead to warnings.
Virtual keyboard info message does not contain locale object any more.

Change-Id: I447d439ffbf4ea6e03f6a8bca4422a9a121d85f4
Reviewed-by: Frank Osterfeld <frank.osterfeld@kdab.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-05-13 08:42:46 +02:00
Nedim Hadzic
d075df993c QPpsObject compile added for QNX platform
QPpsObject was only compiled for BlackBerry and not for QNX. Now, QNX
platform is included together with lpps lib.

Change-Id: Ib521664b430b202c0e67987d0bfda8373d2be70e
Reviewed-by: Bernd Weimer <bweimer@blackberry.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-05-13 08:42:30 +02:00
Oswald Buddenhagen
f2619db300 fix doc references to webkit
we can't derive the doc index paths from QMAKEMODULES, as the mkspecs dir
may not live at the repo's top level.
instead, explicitly announce the repo's top level build dirs in QTREPOS,
and use that accordingly.

Task-number: QTBUG-38862
Change-Id: I643ad2bf63c8fca0ffc44ce3457dbe8a16dcab07
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-05-13 07:12:43 +02:00
Richard J. Moore
650e214d3d Fix the documentation on how to use -openssl-linked.
You set the environment /before/ you run configure.

Change-Id: I6954656f892214f41b5f2ec4e3f4926eb5a9e247
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Topi Reiniö <topi.reinio@digia.com>
2014-05-13 07:12:37 +02:00
Eskil Abrahamsen Blomfeldt
c1af2ced2d Mac OS X: Fix crash in Harfbuzz-NG
CoreText does not support multithreading, so we would get a
crash in tst_qglthreads. So we disable multithreading for
HB-NG.

Task-number: QTBUG-38762
Change-Id: I0473037c16017ff77cbba9b11fc0b396775ef789
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2014-05-12 19:24:51 +02:00
Bernd Weimer
da6dc40f75 QNX: Don't build QNX-only parts on BlackBerry
Only really required source files will be included when building for
BlackBerry.

Change-Id: Ic66b09221c48672358bba7601bc18663ad7fa07a
Reviewed-by: Wolfgang Bremer <wbremer@blackberry.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2014-05-12 18:15:20 +02:00
Andreas Holzammer
5883b6a22c [QNX]Clear transparent regions
If a region gets painted the buffer beneath needs
to be cleared, as it could be that there are
leftovers from the last blit.

Change-Id: I51f19aa010015059e9a6d9d5e5e4f25fb9532d4e
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
Reviewed-by: Fabian Bumberger <fbumberger@rim.com>
2014-05-12 17:30:57 +02:00
Frederik Gladhorn
73bc91c9df Merge remote-tracking branch 'origin/release' into stable
Change-Id: I9300572e2b74f0564b2589cbd0fbdf24850f68df
2014-05-12 14:01:46 +02:00
Tor Arne Vestbø
5a060a5ad3 CoreText: Prevent creation of CGContext for glyphs with empty bounding box
If the alphaMapBoundingBox of a glyph is empty we don't want to create
a CGBitmapContext on it, as that will fail, and any further operations
on the invalid context will result in possibly fatal errors from CG.

This issue can be observed when drawing some glyphs of the Apple Color
Emoji font.

Change-Id: Ia45ba858b5fb6afa91e6d686a9c55e350d4095f3
Reviewed-by: Gunnar Sletta <gunnar.sletta@jollamobile.com>
2014-05-12 13:44:59 +02:00
Tor Arne Vestbø
a669564597 Allow QFont lookups using localized family names by adding family alias
After fbaa6d3ca6 QFont family names are non-localized on iOS/OS X,
which means applications that try to initialize QFont with a localized
family name (explicitly, or from user input), will fail, and get the
fallback font instead.

We now add font family aliases for the localized family names, so that
font matching will work even for localized family names. Note that
QFontDatabase::families() still returns a non-localized list.

Task-number: QTBUG-38628
Change-Id: Id351befa69916ce162c939733bbfcc774f075120
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
2014-05-12 13:44:51 +02:00
Louai Al-Khanji
6c42ddf31f Direct2D QPA: Choose linear interpolation for smooth pixmap transform
Let's do the same thing the raster engine does. Much faster too.

Change-Id: I88ea9d2c2ac78feee1193b75a9e96c62a7bd5979
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-05-12 13:44:42 +02:00
Louai Al-Khanji
17dda3917d Direct2D QPA: Never queue more than one frame
Microsoft recommends setting the maximum frame latency to 1:

http://blogs.windows.com/windows/b/appbuilder/archive/2013/12/18/optimizing-directx-apps-for-low-latency-input-and-longer-battery-life.aspx
http://msdn.microsoft.com/en-us/library/windows/desktop/hh780339(v=vs.85).aspx

Apparently it slightly reduces power consumption and it also slightly
increases performance. So let's set it.

Change-Id: I8a540f1e54e83d6dc13f25564e10b751e202ce66
Reviewed-by: Risto Avila <risto.avila@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2014-05-12 13:44:38 +02:00