Commit Graph

32117 Commits

Author SHA1 Message Date
Allan Sandfeld Jensen
b67b80b715 Fix stretch of QRawFonts
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>
2017-04-05 10:26:14 +00:00
Marco Martin
9ae028f507 Environment variable enabling the workaround FBO readback bug
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>
2017-04-05 10:04:54 +00:00
Marc Mutz
f5e77d3d54 Fix some issues with the QStringView docs
Change-Id: Ibb6fed18c6b7aa23ffc259dc66d22d4ff0372ca0
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2017-04-05 09:17:34 +00:00
Marc Mutz
a8c046a2a3 Use (new) QStringIterator(QStringView) to avoid casts
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>
2017-04-05 09:10:33 +00:00
Andy Nichols
8a6b20eb0e Vulkan: Fix shadow builds
Change-Id: I6529c76109e2d668355524b9b0d65048a6d3df2e
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-04-05 09:03:18 +00:00
Giuseppe D'Angelo
5c2d177552 Mark some more functions with Q_DECL_CONST_FUNCTION
Saves a mere 300byte of text.

Change-Id: Ibc87a395af83757e855477a57e48e1e190504757
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-05 08:00:04 +00:00
Giuseppe D'Angelo
49c4c061e0 QStaticText: mark constructor as explicit
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>
2017-04-05 07:58:08 +00:00
Samuli Piippo
3096e0fbd9 qnx: make alloca config test pass on QNX 7
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>
2017-04-05 05:02:42 +00:00
Marc Mutz
89302436cb QStringBuilder: add support for (non-const) char*
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>
2017-04-04 22:12:25 +00:00
Gabriel de Dietrich
a433614bec QCocoaEventDispatcher: Remove Carbon dependency
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>
2017-04-04 18:06:42 +00:00
Timur Pocheptsov
ce2771c71c QNetworkRequest - do not set ManualRedirectPolicy
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>
2017-04-04 16:42:10 +00:00
Hendrick Melo
6b52039866 qbmphandler fix: use qint64 for caching QIODevice file position
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
2017-04-04 16:25:33 +00:00
Liang Qi
aeb3f9d168 Merge "Merge remote-tracking branch 'origin/5.9' into dev" into refs/staging/dev 2017-04-04 16:15:55 +00:00
Liang Qi
9419dfe8ee Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/platformsupport/fontdatabases/mac/qcoretextfontdatabase_p.h
	src/plugins/platforms/xcb/qxcbwindow.cpp

Change-Id: Ic747c3c50e68c005b425e7a1ec2a90965527c8bd
2017-04-04 18:09:33 +02:00
Jesus Fernandez
83486f362b Adds a note to QSqlDatabase::~QSqlDatabase documentation
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>
2017-04-04 15:52:33 +00:00
Giuseppe D'Angelo
5eb74ad4f5 QRegularExpressionMatch: add QStringView-related functions
Change-Id: Ia81ba131cc2c7f56acb3312fbc7d62ffe5e18da4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-04-04 15:35:22 +00:00
Tor Arne Vestbø
1b2234c4e7 macOS: Remove un-needed fontDef assignment in QCoreTextFontDatabase
The QCoreTextFontEngine constructor already sets the member (like it should).

Change-Id: I6e59ff36c439857418a636de4056c20d2f65e8d4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-04 15:14:35 +00:00
Tor Arne Vestbø
5b41b34958 macOS: Use NSURL to resolve FreeType font names instead of CoreFoundation
Change-Id: I4b397361c483fa07e4e95288f66d7f7ea2df8d9f
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-04 15:14:22 +00:00
Tor Arne Vestbø
a7fe6ab891 macOS: Use shared code path for creating FreeType font engine for QRawFont
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>
2017-04-04 15:02:13 +00:00
Tor Arne Vestbø
6c547142d5 Move FreeType font engine creation for QRawFont into factory function
So that the logic can be used without subclassing the FreeType font database.

Change-Id: Ib1ac0e1948ce18003b8eda0c1e8fbb3c7e6c8360
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-04 15:01:43 +00:00
Tor Arne Vestbø
2b9ecfe69c macOS: Split out font engine creation from QCoreTextFontDatabase
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>
2017-04-04 15:01:38 +00:00
Giuseppe D'Angelo
ecceaec858 GCC 7: fix -Werror=implicit-fallthrough
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>
2017-04-04 14:26:34 +00:00
Sami Nurmenniemi
cd8d2c1743 Skip testing of QOpenGLWidget on platforms that don't support it
QOpenGLWidget is not supported on all platforms. Skip tests on those.

Change-Id: I0f9500553427903f20d248acaa20803276e3ab00
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-04 14:13:03 +00:00
Stephan Binner
08fc4c4e95 Fix warning for -no-feature-draganddrop -no-feature-clipboard
Change-Id: I974ac692f59622fbb5cf7c6bd60954cf306dabe7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:17:34 +00:00
Stephan Binner
8146fd5f8c Fix several unused warnings for misc disabled features
Change-Id: Id42daf684abeeb888155d65eca143150d9c5f5a7
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:12:21 +00:00
Stephan Binner
0db0441bb7 Fix warning for -no-feature-temporaryfile
Change-Id: Ibb022a1fd043001f628a343dc8ae509083eb4471
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:12:20 +00:00
Stephan Binner
dfe0bfff39 Fix warnings for -no-feature-settings
Change-Id: I79ce0b9c5eb931e238394519ba80bf35e4ff3bf7
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:12:19 +00:00
Stephan Binner
5678e62141 Fix warning for -no-feature-textcodec
Change-Id: I7775c8611a532db96f9843c311463a69c2e9ef82
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:12:18 +00:00
Stephan Binner
acc0ad7883 Fix warning for -no-feature-texthtmlparser
Change-Id: I6dd6e80a546a76ce3717855ebacb188254fe70d6
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:12:17 +00:00
Stephan Binner
d285409674 Fix warning for -no-feature-graphicsview
Change-Id: I11ab0c664b860014376c725ea162e62740234ea4
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:12:16 +00:00
Stephan Binner
21abfc8101 Fix warning for -no-feature-wheelevent
Change-Id: Ibf240228100bbc7cd8a85e49abc9dbff026e5433
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:12:15 +00:00
Stephan Binner
4fda233ad7 Fix warning for -no-feature-menubar
Change-Id: I58573d769897c956144604d51d38cad1c121f751
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Paul Olav Tvete <paul.tvete@qt.io>
2017-04-04 13:12:13 +00:00
Jan Arve Saether
e011c9c3b8 Pass along keyboard modifiers to touch events
Change-Id: I0d90425166c035dfa81823e3487d6262980ae16b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2017-04-04 12:15:42 +00:00
Samuel Gaist
9076046a10 SQLite: enable support for named placeholders
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>
2017-04-04 12:02:10 +00:00
Laszlo Agocs
8f93d6632a Fix some capitalization issues in QVulkan docs
...and remove see-alsoing wrappers that do not get a doc page.

Change-Id: Ia26aeef3c142b15a47e650dfc7f64ad7339cc80d
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
2017-04-04 12:01:31 +00:00
Joerg Bornemann
7e15df0333 Doc: Move $$files() documentation to "Built-in Replace Functions"
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>
2017-04-04 11:53:05 +00:00
Marc Mutz
8b5aa7b6c4 QStringView: add an array ctor
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>
2017-04-04 11:33:08 +00:00
Morten Johan Sørvig
5b78fcd03b QRasterBackingStore: Correct high-dpi image size
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>
2017-04-04 11:14:38 +00:00
Sami Nurmenniemi
6d6a826038 Skip OpenGL tests on platforms that don't support OpenGL
Change-Id: Iff38950a940d602fbfcc35595624e56399aab53a
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-04-04 11:06:38 +00:00
Timur Pocheptsov
5377f4ec0e Allow Secure Transport backend to use a temporary keychain
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>
2017-04-04 10:44:29 +00:00
Tor Arne Vestbø
de4aeade5e Delete QRasterWindow backingstore while window is still alive
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>
2017-04-04 09:36:12 +00:00
Tor Arne Vestbø
0d12ebd7e7 Share FreeType font engine creation code between platforms
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>
2017-04-04 09:23:59 +00:00
Tor Arne Vestbø
e33b0118b4 Rename QBasicFontDatabase to QFreeTypeFontDatabase which is what it is
Change-Id: I8def2f7ae1e4c8d8a3e1f8e60549da5d691e4fb3
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-04-04 09:23:52 +00:00
Tony Sarajärvi
05a943497b Extend blacklisting of tst_QMenuBar::check_menuPosition to Ubuntu 16.04
Task-number: QTBUG-46115
Change-Id: I1ed994e07e78d7e7c59967e86e9cc4160c6a55b1
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-04-04 09:15:53 +00:00
Stephan Binner
876563ced0 No divide by zero if all imageformat features are disabled
Change-Id: Ib3e8a4b62ae627bc3dc8541767dafff4e493d2f8
Reviewed-by: Tasuku Suzuki <tasuku.suzuki@qt.io>
Reviewed-by: Eirik Aavitsland <eirik.aavitsland@qt.io>
2017-04-04 09:01:37 +00:00
Friedemann Kleint
267c2c2a93 QFusionStyle::drawPrimitive(): Use color in cache key of PE_PanelButtonCommand
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>
2017-04-04 08:42:01 +00:00
Laszlo Agocs
22d43c9e51 xcb: Get rid of qCInfo in the GLX backend
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>
2017-04-04 08:17:48 +00:00
Andreas Holzammer
229fd2cece CMAKE: Fix EGL link extensions
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>
2017-04-04 08:11:58 +00:00
Thiago Macieira
6a83f9aa98 Fix qReallocAligned for reallocation when alignment > 2*sizeof(void*)
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>
2017-04-04 07:08:16 +00:00
Tasuku Suzuki
a7b32ff63c Fix build without features.qeventtransition
Change-Id: I498d482b01d9dcaf794d35ecc26110c9a2d45ce0
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-04-04 04:24:02 +00:00