Set stretch to always have no transform on raw fonts.
Task-number: QTBUG-59799
Change-Id: Ibfacc5c247e0b4a8410572e207f09f6e67b74f9d
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
On some ARM devices the font glyph generation is broken
Add an environment variable to enable workaround_brokenFBOReadBack
in QOpenGLContext, to fix font rendering on such devices as
Mali and Adreno
Change-Id: I9cc99ecb8b71a35bc369ec9dd11b877016b1179e
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This is the only one in QtBase that casts to be able to use QStringIterator.
Amends d40dcee642.
Change-Id: I709e0285717e8d17feab9ab0020c8d0aed0dbe36
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
A QStaticText object is supposed to be created and *kept* by the user,
and then used repeatedly for drawing, saving the expensive
layouting/rasterization process which would otherwise be done for each
drawText-like call.
Allowing an implicit conversion from QString is therefore surely
unwanted.
[ChangeLog][Potentially Source-Incompatible Changes][QStaticText] The
QStaticText(const QString &) constructor is now explicit.
Change-Id: Ib939a5f46638cb9a54d1cc30ff50e3a9d20be5e4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Test failed on QNX 7, even though alloca is available. On QNX7,
it's a macro that expands to a line with NULL, but without define
for it.
alloca.cpp:44:5: error: 'NULL' was not declared in this scope
Task-number: QTBUG-59700
Change-Id: I3631d139990020a3adbab8b72e49929b6e721e80
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
There's support for const char[] and char[], so it seems this was
simply forgotten.
[ChangeLog][QtCore][QStringBuilder] Added support for (non-const) char*.
Change-Id: I4b5d9039632da7721256579b7741816027321a7e
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
QCoreApplication::hasPendingEvents() is deprecated, and so is
the event dispatchers' eponymous function. (A subsequent patch
will remove all of the event dispatchers' function, and add a
warning in QCoreApplication.)
The replacing logic is based upon QEventDispatcherCoreFoundation.
Change-Id: If2c1920148dc6d910e77c1dc8ac5b4459c149e2b
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
If QNAM's general policy is 'Manual' and QNetworkRequest has neither
policy set not FollowRedirectAttribute - do NOT set this 'Manual' policy -
its implicitly implied. This fixes previously unnoticed auto test failure
(was blacklisted) and also makes QNetworkRequest::operator == work correctly.
Change-Id: If17c9af4baf8a470659f82d1a40488078ea8ede0
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Changed the file position and offset types so they can properly handle
files larger than the 32bit limit
Task-number: QTBUG-59493
Change-Id: I00e1741c7682c4c79f35fef808fe1ea26e67c8b5
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
Reviewed-by: Hendrick Melo
When the last QSqlDatabase object is destroyed the destructor implicitly
calls close() to release the database connection.
Task-number: QTBUG-59919
Change-Id: I04c15c4999cdaaa8800a44a1a1006f977a90d8a6
Reviewed-by: Samuel Gaist <samuel.gaist@edeltech.ch>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
The QCoreTextFontEngine constructor already sets the member (like it should).
Change-Id: I6e59ff36c439857418a636de4056c20d2f65e8d4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The round trip via a CGFontRef to a CTFontRef so that we could pull out
the kCTFontURLAttribute of the font makes no sense, as the input is just
raw font data. None of the tst_QRawFont tests are able to pull out a
URL, and none of the other platforms where FreeType is available resolve
a filename from raw fonts.
Without this change the tst_QRawFont test has 13 failed test cases and
spits out 1250 QWARNs. With the patch all tests pass without warnings.
Change-Id: I17965e7405d7161958ff0870825ce8190598288f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
So that the logic can be used without subclassing the FreeType font database.
Change-Id: Ib1ac0e1948ce18003b8eda0c1e8fbb3c7e6c8360
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
The Core Text font database can produce both Core Text and FreeType font
engines. Refactor the code a bit so that the actual factory methods that
differ between the two stand out, and do not require a granular runtime
check in each method.
Change-Id: Ib70f76f4a9001a8108d87c1101a50699a6ea8f55
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
More fallthrough-are-errors fixed.
Change-Id: I9a6cb6efe988400ed3f9cb95d1e426dac317e6c4
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
QOpenGLWidget is not supported on all platforms. Skip tests on those.
Change-Id: I0f9500553427903f20d248acaa20803276e3ab00
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
SQLite has been supporting named placeholders for some time now and the
code of the module is also written in that sense. The only thing that
currently fails is the parameter count check. If the named placeholder
is used several times then the parameter count will not match the
value count. This patch adds a second check in that case. This use
case is already tested by tst_qsqlquery.
[ChangeLog][QtSql][SQLite] Named placeholder can now be used.
If compiling Qt by hand and using system libraries, this feature
requires at least SQLite 3.3.11.
Change-Id: I1f6fa93f72bd809136894eafce0a2ae5cf6a62db
Reviewed-by: Jesus Fernandez <Jesus.Fernandez@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
...and remove see-alsoing wrappers that do not get a doc page.
Change-Id: Ia26aeef3c142b15a47e650dfc7f64ad7339cc80d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
files is not a test function.
Change-Id: I6d23dac5d1c87bd35961406dd62cc3cf37d652e3
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
With sufficient enable_if magic, the array ctor can overload the
pointer ctor and statically determine the size of the array passed.
Consequently, remove the sizeof in QStringViewLiteral again.
Change-Id: I486baa3cafefde60ccc5f2b47eb94ee53cefe63c
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Fix QT_SCALE_FACTOR usage on macOS. Follow-up to
2d2d9078
QRasterBackingStore should account for native scaling
only. Any Qt scaling will have already been factored
into the size argument.
Change-Id: I26a67addfcbec3d45f4ed87f03b8dd79fd99cb62
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Cherry picked:
this change was first merged into dev, but now we also need it in 5.9
to enable SSL socket tests on the new CI VMs (macOS 10.11, 10.12).
As we do not merge dev->5.9, we need this cherry-pick.
Since day one Secure Transport socket has two annoying problems on macOS:
when we call SecPKCS12Import, we indeed import certs and keys into the default keychain
and also (which is more serious) later a dialog can pop up, asking for permission
to use a private key (this is especially annoying if you're running SSL autotests or
have a server application). Apparently, it's possible to work around those problems
if we create our own (temporary) keychain and pass it in the 'options' parameter
to SecPKCS12Import.
[ChangeLog][QtNetwork] Allow QSslSocket to use a temporary keychain on macOS.
Task-number: QTBUG-56102
Change-Id: Ic3a56c905100dc80d907a25fe6ebfa232dcf5b9e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
(cherry picked from commit 17927392cf)
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
The platform backingstore might need access to the window that the
backingstore was created for, e.g. for makingCurrent to release OpenGL
resources. In that case leaving it to the QRasterWindowPrivate destructor
would be too late, as the QWindow was gone.
This was seen on iOS, where the backingstore inherits QRasterBackingStore,
and uses composeAndFlush to composit via GL. The raster backingstore
cleans up these GL resources in its destructor, so the QIOSBackingStore
destructor makes sure that the GL context is current for the window,
resulting in a crash since the window is long gone by then.
Change-Id: I5a22597842819f0fe3b580856b9e75e4fab32ae5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
The FreeType font engine setup is spread out between factory functions,
constructors, and init() functions, so let's at least try to share as
much as possible of it to make it easier to reason about and possibly
refactor in the future.
Change-Id: Ic39353d2b3111024e0589a70211bac80feb8498e
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Previously, only bool isDefault was used, which did not discriminate
changes in ButtonColor. Use the color name instead.
Task-number: QTBUG-59850
Change-Id: I1e006f98371a5f2039dcca1207addc0396e7c1e5
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
qCInfo must never be used. For qt.* logging categories Debug is disabled
while everything else is enabled by default. This means that doing qCInfo
is equivalent to putting a qDebug which is not acceptable.
Amends 3e0355014e
Change-Id: I428e620f12afa324cf6af8dbe3912a55189a38a9
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
Targets were always exported as .lib, for all windows compilers
which is correct for msvc, but not for mingw. Hence use
QMAKE_EXTENSION_STATICLIB to switch between .lib and .a
Task-number: QTBUG-59906
Change-Id: I948f5dd96e0fb46d679c474b7beececc379ad436
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
When we call realloc, the alignment of the new block may be different
from the old one. When that happens, we need to memmove the data to the
new position, before we start overwriting things.
Task-number: QTBUG-59804
Change-Id: I27b55fdf514247549455fffd14b07ea78918a3d0
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>