Commit Graph

32284 Commits

Author SHA1 Message Date
Kai Koehne
65a551816f Replace last occurrences of LGPL3, LGPL3-COMM headers
Change-Id: I0e967120d7bdfa00f110b49e6c65d8c6f9b329aa
Reviewed-by: Jani Heikkinen <jani.heikkinen@qt.io>
2017-04-06 08:13:54 +00:00
Thiago Macieira
280e321e52 Fix detection of F16C for the Intel compiler (again) and Visual Studio
Neither the Intel compiler nor Visual C++ have a dedicated switch to
enable F16C support, like GCC and Clang do. So we used the AVX switch
for that in commit 8241d51f70, as it was
the closest, lowest denominator. That was incorrect and insufficient.

The Intel compiler silently miscompiles the intrinsics with -xAVX,
making calls to out-of-line functions like _mm_cvtps_ph, which don't
exist. So we actually have to use AVX2 support to generate correct code.
That might be a problem later, since Ivy Bridge supports F16C but not
AVX2.

Visual C++ is able to generate F16C code with just -arch:AVX.

Either way, since there's no dedicated command-line switch, there's also
no dedicated preprocessor macro. We're using __AVX2__ for both
compilers, as that's a sufficient condition to indicate a processor that
supports F16C.

Change-Id: I27b55fdf514247549455fffd14b205b8d8b86da7
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-04-06 04:15:07 +00:00
Thiago Macieira
c817b33b45 f16c: Use the packed intrinsics instead of scalar ones
MSVC, Apple's Clang and Clang prior to 3.9 do not recognize _cvtss_sh
and _cvtsh_ss. So expand the operation to use directly the packed
intrinsics.

Change-Id: I27b55fdf514247549455fffd14b2046fd638593d
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2017-04-06 04:15:04 +00:00
Thiago Macieira
264d814773 Fix GCC warning about dereferencing type-punned pointers
GCC is wrong. Type-punning is when you read something of a given
type as something else. We're not doing that, as it's only read
as integer.

 qnativesocketengine_unix.cpp:1011:79: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]

Too bad my plan for a good C++ solution was foiled by glibc
developers.

Change-Id: I27b55fdf514247549455fffd14b1a27667745e94
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-06 04:14:58 +00:00
Thiago Macieira
b3f474d620 QSysInfo: update the ICC warning that needs to be suppressed
qsysinfo.h(235): error #1786: enum "QSysInfo::MacVersion" (declared at line 156) was declared deprecated ("Use QOperatingSystemVersion")

Take this opportunity to merge the two groups.

Change-Id: I27b55fdf514247549455fffd14b1c2a1d8eab869
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-04-06 04:14:55 +00:00
Thiago Macieira
71649e2168 Fix build when SCTP is enabled
c0157a9f03 was incomplete.

Change-Id: I27b55fdf514247549455fffd14b158f54403663d
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2017-04-06 04:14:41 +00:00
Marc Mutz
be49235266 QStringView: use qssize_t as size_type
Nothing changes, we've just given 'QIntegerForSizeof<size_t>::Signed'
a better name in qglobal.h and now use it in QStringView API and
users.

Change-Id: Ibea1ae26e95b3a96708400fd4b0cd120459d57b6
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2017-04-06 02:38:25 +00:00
Gabriel de Dietrich
7d5e516e67 Remove unused function qt_mac_secure_keyboard
This function was also relying on Carbon APIs.

Change-Id: I87bc942800f5f3dc4ab69cad80f3cbf06d1ad4e2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
2017-04-05 17:25:17 +00:00
Benjamin Terrier
ea4c4691f7 Remove superfluous handle assignment in QLocalSocket::connectToServer()
The handle is already assigned by QLocalSocket::setSocketDescriptor().

Change-Id: I695cfa31f3d14a3a9eef2fb79d23e9651616e8a8
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2017-04-05 16:54:44 +00:00
David Faure
411398aab4 QTextLayout optimization: avoid calling [] when at() will do
The 'lines' and 'items' containers are both declared mutable, so
[] detaches even in const functions.

Change-Id: I29ac74302af2fab390b3cf3f9d05ea2cace6840b
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-04-05 12:48:51 +00:00
Martin Smith
4a67066f14 doc: Prevent overwrite of qbytearray.html
A use of Q_GLOBAL_STATIC() tricked clangqdoc into
thinking it created something called QByteArray that
should be documented, so the html generator tried to
overwrite qbytearray.html which had already been
created for the real QByteArray. This probably means
there is a bug in the clang visitor class, but I can't
see it, and this change eliminates 4 qdoc errors.

Change-Id: Iee333217212ce60727cd9424a19b8e96a20547b4
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-04-05 12:14:47 +00:00
Richard Moe Gustavsen
b99ec4b4ec Docs: add platform notes to QSystemTrayIcon
On macOS, DoubleClick will work if there is no context menu set.
Otherwise, the context menu will open on the first mouse
press, and then steal focus (which is native behavior).
This means that we never get a callback from the OS for
the second click.

Since it sounds strange to attach a context menu, and at the
same time, listen for double click, we choose here to follow
native behavior and open the menu straight away.

Task-number: QTBUG-5770
Change-Id: I14e08bb8ccd330eecc98e332d54ce4e551cd78fb
Reviewed-by: Jeremy Whiting <jpwhiting@kde.org>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-04-05 11:59:58 +00:00
Tor Arne Vestbø
fb38db29e1 Consider ENXIO (No such device or address) reason to check isatty()
Aligns with EPERM (Operation not permitted) and ENOENT (No such file
or directory), and is what errno is set to on macOS when opening the
/dev/tty device when running inside e.g. Xcode, where isatty() will
return true.

Change-Id: I09b88eaa3ff611d95ab37f0ff4df9aaaca52747d
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-04-05 11:51:15 +00:00
Marc Mutz
84b114e4f3 QVulkan{Layer,Extension}: various fixes
- don't export simple structs
- make op== non-member
- add op!= (required by EqualityComparable)
- add qHash() (should be defined by Qt for every EqualityComparable class)
- add Q_DECLARE_TYPEINFO

Change-Id: Ia14ac3fea48a6a0ad1d8993c9408afe77bbe6c1a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-04-05 11:49:20 +00:00
Allan Sandfeld Jensen
efb84b6189 Copy stretch to multifont fontDef
If we do not the fontDef of the multifont will be the default 0.

Task-number: QTBUG-59443
Change-Id: Ib223517975b2a57b2371e309d12cd8f918d30825
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2017-04-05 11:27:15 +00:00
Friedemann Kleint
fdd32329ab Documentation: Add Vulkan section to Qt Gui overview
Add section, external references and link examples.

Task-number: QTBUG-55981
Change-Id: I705f8bacc9d21aff8446ac40b7a172604a18ef85
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2017-04-05 11:06:20 +00:00
Tony Sarajärvi
63ef26d583 Extend blacklisting of a tst_QMenuBar's test to cover Ubuntu 16.04
tst_QMenuBar::taskQTBUG4965_escapeEaten() already failed on
Ubuntu 14.04 and reproduces in 16.04.

Task-number: QTBUG-24326
Change-Id: I46170c9ce397f4042b308ca485b19364e6ee0663
Reviewed-by: Liang Qi <liang.qi@qt.io>
2017-04-05 10:31:00 +00:00
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