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>
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>
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>
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>
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>
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>
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>
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>
-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>
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>
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>
Prevent crash on platforms that don't support accessibility by skipping
tests.
Change-Id: I42ba44df3200e0abd62797c76a5c538fb1d2757c
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
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>
Due excess 'break' in loop, function xToCursor() with "CursorOnCharacter" option
for BiDI text returns wrong cursor position (start glyph position) all time.
Task-number: QTBUG-38846
Change-Id: Iba6671905e0785da6f343db19d6c3bb3e2cf5e8a
Reviewed-by: Andrey Volykhin <andrey.volykhin@lge.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com>
In particular, if you have a <pre> tag in your HTML, this will
become a QFont with family "Courier New" and fixedPitch==true.
On Android, there's no "Courier New" font, and since the
style hint is AnyStyle, we will just return Roboto, which is
a proportional font.
Note that this exactly matches the condition when fetching the
fallback families for the font in the loadEngine() function,
which was introduced by 06568ff89c48dee8aab278b8b0538c331aa84595
in Qt 4.
[ChangeLog][Text] Respect QFont::fixedPitch() for fallbacks
when font family cannot be matched.
Task-number: QTBUG-36083
Change-Id: I64787c547dc492b9dd3c49f1edf0d9626d198260
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
OpenSSL has a bug when validating a chain with two certificates.
If a certificate exists twice (which is a valid use case for renewed
CAs), and the first one it hits is expired (which depends on the order
on data structure internal to OpenSSL), it will fail to validate the
chain.
This is only a bandaid fix, which trades improved chain validation
for error reporting accuracy. However given that reissuing of CA certs
is a real problem that is only getting worse, this fix is needed.
See also: https://www.openssl.org/docs/ssl/SSL_CTX_load_verify_locations.html#WARNINGS
[ChangeLog][QtNetwork][QSslSocket] Added a workaround to an OpenSSL problem
that may cause errors when the trust store contains two certificates of the
issuing CA, one of which is expired.
Task-number: QTBUG-38896
Change-Id: I8f17972ac94555648098624e470fff0eff2e7940
Reviewed-by: Richard J. Moore <rich@kde.org>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Make it very clear that this is a path, so it's relative to the working
dir, not relative to tempPath().
Task-number: QTBUG-38266
Change-Id: Ib7ca8df76b5a03c1631fe00d6b329d86538d4b5a
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
It may return null during program exit, due to QCoreGlobalData global
static already having been destroyed. If that's the case, QTextStream
needs to fall back to Latin 1, like QString::toLocal8Bit and
fromLocal8Bit already do.
Task-number: QTBUG-38316
Change-Id: I5949c8dec15b60f4a13b5d9307ed6abfc799fe20
Reviewed-by: Olivier Goffart <ogoffart@woboq.com>
The former was documented twice and the latter was missing the qdoc
formatting.
Change-Id: Id8dfb21a0c2fd26134b5738448971fe2627a12d6
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: David Faure <david.faure@kdab.com>
You should never force that option. Just let Qt automatically detect
from the environment.
Change-Id: I43ae4951969d2067cc111eff6302921a0af82658
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
QEXPECT_FAIL followed by QTRY_COMPARE considerably slows down
tests due to the check timing out.
Task-number: QTBUG-38890
Change-Id: I7f90f2627fc6ce149d159a6d13355ca1a8181d54
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@digia.com>
Remove highlighting for examples with known problems, and
examples that don't work on all platforms. Add highlighting
for improved ones and prominent examples that demonstrate
new features.
Task-number: QTBUG-37203
Change-Id: Ida7fd28573dfebe6e4e3320ef83782654632219e
Reviewed-by: Jerome Pasion <jerome.pasion@digia.com>
Otherwise widgets will not be shown on some embedded systems.
Task-number: QTBUG-38866
Change-Id: Id16408dc7eb657c052bbe3bdb86e35ab2f062632
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>
For exaple Qt Creator would crash when started and a screen reader (eg
NVDA) is running. This is due to updateAccessibility being called during
the ctor of the TextEdit and on Windows the AT can access properties in
the same call resulting in accessing the text control before it's fully
constructed.
Also make sure to not send accessibility updates for non-widget type edits
since we don't support any accessibility in Qt Quick 1.
Backported from Qt 5.3.1 since it also crashes Qt Creator on startup on
Mac (as soon as accessibility is enabled which may be for various
reasons, and basically any app that uses a QTextEdit).
Task-number: QTBUG-38659
Task-number: QTBUG-38738
Change-Id: I6e5c0dc47bd75e63fe013a9edadbabccd52c20ee
Reviewed-by: Jan Arve Sæther <jan-arve.saether@digia.com>
As the mipmaps levels aren't being generated on level 9, they shouldn't
be used. Fall back to multisampled textures instead (which is the
behavior for non-power-of-two textures anyway). This fixes an issue in
which textured polygons (e.g. QML Images) turn black when scaled down.
Change-Id: I648b8be473dc38f4e1b26724cbaff610e586fdbd
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Oliver Wolff <oliver.wolff@digia.com>
Using Q(Open)GLFunctions concurrently on multiple threads had some issues
due to incorrect synchronization: The m_groups list in the
QOpenGLMultiGroupSharedResource, in which the Q(Open)GLFunctions instance
is stored, became corrupted under certain scenarios, for example in the
tst_qglthreads autotest and any two threads that happen to enter an
initializeOpenGLFunctions() or QOpenGLContext::functions() call concurrently.
Locking in value() has been introduced in 666c25c089
to fix such issues, however using the context group's mutex is not enough: that still
allows two threads using two contexts with a different context group to concurrently
enter insert(). Instead, the MultiGroupSharedResource has to have its own mutex
to protect its own member variables.
Task-number: QTBUG-38771
Change-Id: If01c44c2084b95e487bc9146576ca180ed8044da
Reviewed-by: Jørgen Lind <jorgen.lind@digia.com>