Commit Graph

28913 Commits

Author SHA1 Message Date
Robin Burchell
57413ad3f6 QMetaType: Add a benchmark covering creation of QVariant from an enum
This proved to be quite slow in the past due to QReadWriteLock's implementation
being suboptimal (prior to its improvement in
343e5d066a).

This codepath is exercised quite extensively by QML with enum registrations.

Change-Id: I94d1e13933bf005604dc4494e2cb5bc25ef3d387
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-07-22 12:47:05 +00:00
Oswald Buddenhagen
2152049db0 don't clear the rest of the command line when -redo is used
it's entirely reasonable to extend the saved command line by new
arguments. note that these are not saved in turn.

Change-Id: I02c1a2b33e93c85b3a29c50de00c2e5334f6ef51
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:28:29 +00:00
Oswald Buddenhagen
6b4496c5f8 remove the configure.exe -loadconfig/-saveconfig options
these options don't seem particularly useful (they were added in 2001
without any indication of the intended usage). maintaining multiple
static configurations can be best achieved with a script (outside the
build directory, which these options didn't permit to start with).

this obsoletes QTBUG-46690, which refers to these options.

Change-Id: I994c18481cd63d256bb7a6d1948c57f7bd480614
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:28:26 +00:00
Oswald Buddenhagen
9774ae3d2d Revert "Save the pkg-config settings in config.status"
it's somewhat questionable to save the environment of pkg-config, but
not that of many other things we use.
additionally, we now have logic to automatically set it up from the
sysroot when it's missing.

This reverts commit 228392aff2.

Change-Id: I0612c196c9a5023bb3ef436aebfb87cb46d8cd14
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-22 10:28:18 +00:00
Oswald Buddenhagen
34173e9350 print an empty line after every report
otherwise we get an unintelligible mess if multiple messages are emitted
in the same category. also, there were already empty lines between
categories, so it was also inconsistent.

Change-Id: I5e6622bc8a5d2773bbd99124cedf4e3eb73b8a60
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:28:14 +00:00
Oswald Buddenhagen
5ad32e7f77 make use_new_dtags a linux-only feature
it's the only OS with braindead "old" dtags in the first place.

Change-Id: I0fba436ff3f9fc061c1741b1899ca133b8ad6b5e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:28:11 +00:00
Oswald Buddenhagen
f914870e31 permit wrapping expressions in the json file
the json parser passes line breaks verbatim, so we need to get rid of
them ourselves.

Change-Id: I3b71fe54dcaa8c3a2ff94e8ac4845f49dabe1663
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:28:07 +00:00
Oswald Buddenhagen
b451a6e514 make 'feature' report type always use the feature descriptions
they are really meant for pretty-printing the summary in the first
place, and were previously unused when this type was invoked explicitly
(because of using a condition).
adjust the neon/mips_dsp/mips_dspr2 descriptions to match the context
and remove the now redundant "message" fields.

Change-Id: I08558f342a0d9189a37145085e5470f91a9d0881
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:28:03 +00:00
Oswald Buddenhagen
2b78a49f22 make firstAvailableFeature report type use the feature descriptions
they are really meant for pretty-printing the summary in the first
place, and were previously unused for this type.
adjust the c++* descriptions to match the context.

Change-Id: I2a76b5651892bf9bd6fec315e446bfdb7c3aee97
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:28:00 +00:00
Oswald Buddenhagen
caf51ee0dd make featureList report type use the feature descriptions
they are really meant for pretty-printing the summary in the first
place, and were previously unused for this type.
adjust the sse/avx/avx512 descriptions to match the context.

Change-Id: Icf514718355c6ccd608d825b70296cc0383dbfe8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:27:56 +00:00
Oswald Buddenhagen
8cbf2aee75 add missing "enable" fields to opengl features
this ensures that we complain if desktop gl or gles2 is explicitly
requested but not available.

Change-Id: Iad068ef34cdf9353cb483d4dc667ddd85ded740d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:27:52 +00:00
Oswald Buddenhagen
e9d822943a add missing "enable" field to openssl feature
this ensures that an explicitly requested linked/runtime support is
complained about when the test fails. the old configure would do that as
well.

Change-Id: I7f235fa7df5e5d53938de0e32b07536447b8d1d4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:27:48 +00:00
Oswald Buddenhagen
78872375c2 unify openssl options with the d-bus ones
introduce -openssl-runtime and -openssl [no|yes|linked|runtime] for
consistency with the respective dbus options.

Change-Id: I061b46b52b3132ead4332b33f7a60d6fe0e73ab9
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:27:44 +00:00
Oswald Buddenhagen
92e7f15277 simplify conditions of dbus-linked feature
... by chaining it to the dbus feature, as is done for openssl/-linked.

Change-Id: Id1f9f761914c356d2a0056aa80213954dce3403d
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:27:41 +00:00
Oswald Buddenhagen
be3b2de87f accept plain -dbus option
the feature's logic is already prepared for that.

Change-Id: Ieb0131904b532409fc01bafca9f85fb22039a68a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:27:38 +00:00
Oswald Buddenhagen
62b0113c7b fix recognition of -no-verbose
while probably not too useful, the old configure does allow explicitly
disabling verbose mode.

Change-Id: If0585443c649a67f616b3668cc90b18fecde11ba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:27:35 +00:00
Oswald Buddenhagen
70970ad981 don't mention config.log in error messages when not applicable
Change-Id: I127bc23c667d337bbe2518e7364ca99db9a3163a
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:27:24 +00:00
Oswald Buddenhagen
09110cdbea don't error() out on user errors
use the proper error reporting mechanism instead.

Change-Id: I3afb0086e5cd672d3c0f441c429682850202024f
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:27:21 +00:00
Oswald Buddenhagen
0c3f431769 make command line parsing error messages consistent
... by adding some quoting and punctuation.

Change-Id: I553171a0c001edc195fcf2e85f0f70bf2cfdd728
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2016-07-22 10:27:17 +00:00
Edward Welbourne
601019e3f4 Merge "Merge remote-tracking branch 'origin/5.7' into dev" into refs/staging/dev 2016-07-22 10:15:48 +00:00
Gabriel de Dietrich
b5f18da11f QCocoaMenuLoader: Remove NIB file
Since 10.6, the first menu is always identified
as the application menu. See remark about Nibless
apps and the application menu in,

https://developer.apple.com/library/prerelease/content/releasenotes/AppKit/RN-AppKitOlderNotes/index.html

Therefore, we can get rid of the NIB file together
with the loading logic we had in place (and which,
incidentaly, was using deprecated API).

Change-Id: I99bf0e9d8ea749a9be9295fa12602335abc6548e
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2016-07-21 17:56:22 +00:00
Gabriel de Dietrich
8f71788ee0 QCocoaWindow: Fix usage on deprecated API
Most APIs related to ProcessSerialNumber have
been deprecated since 10.9.

Change-Id: I6be5ae92cfe2c8f80d557af6c6a79c0cd016ba90
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-07-20 20:00:11 +00:00
J-P Nurmi
4e6dd1c50a Add QStyleHints::useHoverEffects
The delivery of hover events creates unnecessary overhead on touch
platforms. This allows Qt Quick Controls 2 to determine whether the
underlying platform wants hover effects. The hover effects are enabled
by default for the classic desktop platforms: Linux, Windows & macOS.

Change-Id: Ia4e7b5c0fcb7af8f1c47e06fb28086cffdf35976
Task-number: QTBUG-50003
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
2016-07-20 18:33:59 +00:00
Simon Hausmann
494ced1329 Improve precision of reported file times on Unix-style platforms
Instead of reporting the file times in the precision of seconds, our API allows
us to report it up to millisecond precision.

Change-Id: I8bcc6a1fb4116e8c5421d650a68f6fb00482e551
Reviewed-by: Alex Trotsenko <alex1973tr@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-20 12:35:30 +00:00
Fahad Al-Saidi
6e21c3fafd make QFontDatabase().writingSystemSample for Arabic useful
The current QFontDatabase().writingSystemSample for Arabic is an
arbitrary text and meaningless.
This suggested text is used in LibreOffice and it makes sense for Arabic
people.

Task-number: QTBUG-53390
Change-Id: I7456d2741fbc07b4cfffd6151b421cb4427dd3e9
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
Reviewed-by: Konstantin Ritt <ritt.ks@gmail.com>
2016-07-20 04:28:30 +00:00
Thiago Macieira
da04322b4c Make moc obey the preprocessor environment variable for include paths
C preprocessors augment their standard list of include paths from the
environment: Unix preprocessors use $C_INCLUDE_PATH (for C) and
$CPLUS_INCLUDE_PATH (for C++), plus CPATH for both, whereas MSVC uses
the an environment variable simply called "INCLUDE". Handling this for
MSVC is particularly important because the VCVARSALL.BAT script sets the
necessary #include paths in the environment for important things.
Without that being parsed, moc won't find some #defines, like
WINAPI_DESKTOP_FAMILY.

[ChangeLog][moc] qmake and moc now cooperate to use the Visual Studio
environment variables (set by the VCVARSALL.BAT script) to find system
include files. A possible consequence is that moc parses application
headers slightly differently, depending on #if conditions that depended
on macros that previous versions had not seen #define'd. Implementers of
other buildsystems are advised to pass the --compiler-flavor=msvc option
to moc.

Change-Id: I7e06274214d1939b0124e5b4bf169cceaef9ca46
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-07-20 02:54:09 +00:00
Thiago Macieira
36d524e6a3 moc: get the system #defines from the compiler itself
In order for moc to properly parse #ifdefs and family, we've had
QMAKE_COMPILER_DEFINES as a list of pre-defined macros from the
compiler. That list is woefully incomplete.

Instead, let's simply ask the compiler for the list. With GCC and
family, we use the -dM flag while preprocessing. With ICC on Windows,
the flag gains an extra "Q" but is otherwise the same. For MSVC, it
requires using some undocumented switches and parsing environment
variables (I've tested MSVC 2012, 2013 and 2015).

The new moc option is called --include to be similar to GCC's -include
option. It does more than just parse a list of pre-defined macros and
can be used to insert any sort of code that moc needs to parse prior to
the main file.

Change-Id: I7de033f80b0e4431b7f1ffff13fca02dbb60a0a6
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2016-07-20 02:54:03 +00:00
Jake Petroules
23bf3da5a0 Extend PLATFORM_SDK_EQUAL_OR_ABOVE and DEPLOYMENT_TARGET_BELOW macros
There is now a DARWIN version for all four Apple platforms at once,
a MACOS_IOS version for macOS and iOS (since many of the checks we need
are prior to tvOS or watchOS's existence), and MAC and OSX have been
relegated to synonyms for MACOS_IOS and MACOS, respectively.

Change-Id: I54f587e26c6b46bf4b469c5d3039086c65566651
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@qt.io>
2016-07-19 20:54:07 +00:00
Simon Hausmann
175e5d0592 Fix compilation on qt css lexer generator
Change-Id: I24ca71c0c3bb59f40f4813fa255c5269da6986ec
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2016-07-19 18:40:53 +00:00
Edward Welbourne
782ebeada1 Merge remote-tracking branch 'origin/5.7' into dev
Conflicts:
	qmake/library/qmakebuiltins.cpp
	qmake/library/qmakeevaluator.cpp
	qmake/library/qmakeevaluator.h
	qmake/project.h
QMakeEvaluator:
* evaluateConditional(): one side changed return type, the other
  changed a parameter type.
* split_value_list(): one side changed a parameter adjacent to where ...
* expandVariableReferences(): ... the other killed one overload and
  changed the survivor

	src/corelib/io/qlockfile_unix.cpp
One side changed a #if condition, the other moved NETBSD's part of
what it controlled.

	src/corelib/tools/qdatetime.cpp
One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the
other moved it from the private class to the public one, in the midst
of the "short date-time" optimization, which confused diff entirely.
One side changed a QStringLiteral to QLatin1String, the other rewrote
adjoining code.

	src/network/kernel/qauthenticator.cpp
Both rewrote a line, equivalently; kept the dev version.

	src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm
	src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h
One side changed #if-ery that the other removed.

	tools/configure/configureapp.cpp
One side added a check to -target parsing; the other killed -target.

	tests/auto/testlib/selftests/expected_cmptest.lightxml
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/testlib/selftests/expected_cmptest.xml
	tests/auto/testlib/selftests/expected_cmptest.xunitxml
Regenerated using generate_expected_output.py
I note that quite a few other expected_* come out changed, now.

There was no git-conflict in
	src/widgets/kernel/qformlayout.cpp
but it didn't compile; one side removed some unused methods; the other
found uses for one of them.  Put FixedColumnMatrix<>::removeRow(int)
back for its new user.

Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
2016-07-19 20:14:40 +02:00
Giuseppe D'Angelo
c8277b6e53 QThread: make it fatal to destroy a running QThread
Align ourselves to what std::thread does (and what's sensible to do anyhow,
since we even document that "Deleting a running QThread [...] will probably
result in a program crash").

[ChangeLog][QtCore][QThread] Destroying a QThread which is still running will
now result in immediate and abnormal program termination.

Change-Id: Ib481287915be01a1381df14abf6e0fb68c36b5b5
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-19 11:28:55 +00:00
Friedemann Kleint
62cbb43457 Fix typo in doc snippets of qOverload and related
Task-number: QTBUG-54808
Change-Id: Ic565710e4d3a95abf98d4696ae7c0001a9171697
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-07-19 10:49:06 +00:00
Edward Welbourne
b3f260236a Merge "Merge remote-tracking branch 'origin/5.6' into 5.7" into refs/staging/5.7 2016-07-19 10:46:15 +00:00
Michael Sheldon
267c013905 Preserve the scale of fonts when caching the font engine
Associates the scalableBitmapFactor with the freetype QFontEngine
so that it is preserved when caching the engine

Task-number: QTBUG-53652
Change-Id: I010f9d235ccf30679b112e0c05e01bc247a3693f
Reviewed-by: jian liang <jianliang79@gmail.com>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2016-07-19 06:44:00 +00:00
Anton Kudryavtsev
b75fe73700 QStandardItem: enable NRVO for gcc
Change-Id: I5a5ad039e1df8f040b77ff783a4f0e1213a0f286
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-07-18 11:41:42 +00:00
Kai Koehne
13c198cedb Doc: Fix snippet to use initializer list
We can expect C++11 now, and using an initializer list
is much shorter.

Change-Id: I6424d24ce7660b342a629e836b94d62c8868a44d
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-07-18 11:12:46 +00:00
Anton Kudryavtsev
337a7e96b6 QStandardItem: use reserve() to optimize memory allocation
Change-Id: I09df41f6beaaeecc818f11a01206e9e4583fd93f
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-07-18 08:17:21 +00:00
Edward Welbourne
82ea53ad24 Merge remote-tracking branch 'origin/5.6' into 5.7
Conflicts:
	qmake/library/qmakeevaluator.cpp

One side changed the iterator to use ranged-for, the other changed its
body; they only conflicted because the latter had to add braces around
the body, intruding on the for-line.  Trivial resolution.

Change-Id: Ib487bc3bd6e3c5225db15f94b9a8f6caaa33456b
2016-07-15 20:47:57 +02:00
Edward Welbourne
178ab88562 PathStrokeRenderer::initializePoints(): use float division
The (example) code used a real to hold 360 / 7, which is of course 51,
discarding the 3/7 that was most likely meant to be kept.  Noticed by
Coverity (CID 22364).  Use 360.0 instead of 360 to get more accurate
results.

Change-Id: Ifdfbb932589d8ea728710e8b656af651c9f8a7d2
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2016-07-15 11:35:12 +00:00
Friedemann Kleint
89765ced6e Windows: Add a workaround for render-to-texture widgets for translucent windows
Do not attempt to switch from translucent GL windows (emulated by DWM blur
behind) to translucent raster windows (using layered windows) as
this produces warnings from UpdateLayeredWindowIndirect() failing.

Task-number: QTBUG-54734
Change-Id: Ie05126c5cb091a00f17b88a74b287c90aa2dfebd
Reviewed-by: Joni Poikelin <joni.poikelin@qt.io>
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-07-15 10:18:15 +00:00
Lars Knoll
091df96fb8 Reimplement compiler default detection
Change d1b09dba45 removed the
support to detect the C++ version the compiler used by
default. In essence, it forced the compiler in C++11 mode,
if the default was still C++98.

This change reimplements the functionality in the new
configuration system.

Change-Id: Ib4bf7ade85288776f9ae2a870f19764df727e0a5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-07-15 10:11:01 +00:00
Olivier Goffart
34de4f6a15 moc: Fix a crash with malformed input
Do not increment 'data' past the buffer in case of invalid token.

Remove the left over qDebug so we can make a test.

Task-number: QTBUG-54609
Change-Id: I8f0dd3381fbdea3f07d3c05c9a44a16d92538117
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@theqtcompany.com>
2016-07-15 09:37:45 +00:00
Friedemann Kleint
9a00ae8e24 Windows QPA: Add warning to setHasBorderInFullScreen()
Emit a warning when the function is called before show()
as it does not have any effect in that case.

Amends change 69839e55c1.

Task-number: QTBUG-41309
Change-Id: I7c2bb21735d8e41d525c5e00213b0e278ae5c774
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-07-15 09:08:32 +00:00
Friedemann Kleint
6bb0bc73c8 QWindowsTheme: Fix the available file icon sizes
Previously, QWindowsTheme had a hardcoded list of of available file icon sizes.
As the sizes depend on the Windows display scale factor, this can lead to
undesired scaling of icons.

Maintain an array of the standard sizes against which the sizes are
matched; refresh in display change.

Task-number: QTBUG-54561
Change-Id: If36de2f30c8a230cc7bd8eeb4dfc9f201aeda5e4
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2016-07-15 09:07:59 +00:00
Lars Knoll
8ee2a659d6 Don't mention private classes in our docs.
Change-Id: I2cb7443ffa9afac8160b9510df95a304936a01c9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2016-07-15 08:58:53 +00:00
Jędrzej Nowacki
493d4a0b65 Do not spin cpu unnecessarily in qhttpnetworkconnection test
QTRY_VERIFY seems to be a better solution.

Change-Id: I92f9d11c393d9a464716b9224da1fd9c2be956a7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@theqtcompany.com>
2016-07-15 08:57:26 +00:00
Anton Kudryavtsev
e46e112eb1 Optimize string usage
Use QStringBuilder more.
Use QL1S directly, without QString construction.

Change-Id: Iad844391367681fc1013b9725403d009e7c346e6
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2016-07-15 08:23:04 +00:00
Lars Knoll
c81f957457 Fix the linkerSupportsFlag configure test type
Change-Id: Iefc874958d1f6d2447f9774a9c3cdf6d7a3b885b
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2016-07-15 06:52:25 +00:00
Olivier Goffart
120ba68882 QReadWriteLock fast path for tryLock without timeout
When one tries to lock without a timeout, there is no need to allocate
a QReadWriteLockPrivate as we will not wait on it.

Change-Id: I37c96a7fbc0c66fbdffe372f6089708cb2466fe3
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-07-15 06:33:56 +00:00
Andy Shaw
5d8a33a86c [iOS] Blacklist iOS with regards to bgra support
A number of devices are indicating that there is a problem with using
bgra so instead of blacklisting all of them individually it is best to
blacklist them all on the iOS platform. This ensures
QQuickItem::grabToImage() will work then.

Task-number: QTBUG-45902
Change-Id: I900857cfa996924469aaaeeee8037dc84a4fd575
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
2016-07-15 06:05:44 +00:00