Commit Graph

1517 Commits

Author SHA1 Message Date
Giuseppe D'Angelo
2ded0043ca Moc: compile generate_keywords with corelib only
It does not depend on QtGui.

Change-Id: If7b01d1a6d2ce3945562f4480177ce883abfdbf4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-05-01 18:37:44 +00:00
Qt Forward Merge Bot
03f7d0a005 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I1c9449ab064deed1367a7e5dbedfcb489f28140e
2019-04-27 01:00:11 +02:00
Friedemann Kleint
ae38dd485b uic: Fix missing Python import for QFontComboBox
It requires QFontDatabase from QtGui. Add more classes from QtGui.

Fixes: PYSIDE-994
Change-Id: Ib84c86e2305fad60560a3f12997eb1e46deb67cb
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-04-24 13:52:23 +00:00
Samuel Gaist
e2906ea5c4 QRegExp include cleanup
QRegExp includes can be found in several files where there's not even a
use of the class. This patch aims to avoid needless includes as well as
follow the "include only what you use" moto.

This patch removes a QRegExp include from the QStringList header which
means that there is likely going to be code breaking since QStringList
is used in many places and would get QRegExp in.

[ChangeLog][Potentially Source-Incompatible Changes] qstringlist.h no
longer includes qregexp.h.

Change-Id: I32847532f16e419d4cb735ddc11a26551127e923
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-19 21:21:17 +00:00
Friedemann Kleint
f363540580 uic: Do not generate Q_UNUSED for Python
Task-number: PYSIDE-797
Change-Id: Id269af024c03c2c586d440659bb6c49c3d6eedc6
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-04-16 08:21:40 +00:00
Friedemann Kleint
6dca11e1af uic: Port WriteInitialization::writeBrush() be able to generate Python
Task-number: PYSIDE-797
Change-Id: I7c4e204a5ac9be2dee8f06c38323a15a0372fe5c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-04-12 13:47:47 +00:00
Friedemann Kleint
d63a76af8c uic: Refactor WriteInitialization::writeIconProperties() and add Python
Unfold the function with returns to reduce nesting and add language
handling.

Task-number: PYSIDE-797
Change-Id: Ie6c47745b118d75c0bb2c9eea7d52c8f0377f1a6
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-04-12 13:47:34 +00:00
Ulf Hermann
e7e557cea2 moc: Add a standard way of specifying a URI as part of Q_PLUGIN_METADATA
Usually, when you load a plugin, you don't want to load just any plugin
that fulfills a given interface, but rather a specific one. When loading
dynamic plugins you can differentiate the plugins by file name. This
doesn't work in the static case, and file names are also separate from
the plugin metadata shipped inside the plugin files.

To solve this problem, different hacks have been developed in various
places. QML extension plugins add a special property "uri" via the -M
option of moc, QML debug plugins expect you to add a json file with
an array of "Keys", Qt Creator plugins have a "Name" in their json
files, etc.

By allowing the identifier for the plugin to be specified inline with
the metadata declaration we can make many of the above workarounds
obsolete and provide a clean way for users to find their plugins.

Task-number: QTBUG-74775
Change-Id: Ie2af16c49d4c5aa5a77fab0fae1e0a4449bd7a39
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-04-11 14:43:27 +00:00
Liang Qi
a20da2353c Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	mkspecs/win32-clang-msvc/qmake.conf
	src/gui/image/qpnghandler.cpp

Change-Id: Ied79d02912ffb3a307a99483df7db08c7f9d0cd8
2019-04-10 08:16:20 +02:00
Friedemann Kleint
be56db2c49 uic: Fix enum values for Python
Add a helper for replacing "::" by "." for Python.

Task-number: PYSIDE-797
Change-Id: I017d430b0b8b2ffbbd3300d583603924fee4d479
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-04-08 18:43:33 +00:00
Friedemann Kleint
d54de865a4 uic: Port method calls to python
Use the language helper for dereferencing pointers and end of line.

Task-number: PYSIDE-797
Change-Id: Icbca9015f2a3e8800ad4a56edf8fef9ee43f4528
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-04-08 18:43:24 +00:00
Friedemann Kleint
5a5a96560e uic: Adapt connection syntax to Python
Extend WriteInitialization::findDeclaration() to return the class name
(on this occasion preparing for generating Qt 5 connection syntax) and
add a helper function for formatting the connection.

Task-number: PYSIDE-797
Change-Id: I7507f604c8275c93d347b7a6a5d5b5a2a5f3ffd5
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-04-05 08:29:26 +00:00
Friedemann Kleint
5b8676578d uic: Add qualification with "self." for Python
Prepend "self." (this) to the name stored in the class Driver's hashes
as specifying it is mandatory in Python.

Task-number: PYSIDE-797
Change-Id: I1da110b84b2d1131ee6af915f9cc4ba21d7de710
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-04-05 08:29:19 +00:00
Friedemann Kleint
bc8633036c uic: Add python
- Add command line option
- Add import (include) handling
- Add language helpers like streamable classes for Function definition,
  object instantiation
- Implement header comment formatting

Task-number: PYSIDE-797
Change-Id: I15041ab16504ea159f6665781a829cd548585af1
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-04-05 08:29:11 +00:00
Friedemann Kleint
89120c4a76 uic: Refactor string constant formatting
Refactor the fixString() helper, moving the code into a streamable
class using a helper which can be used for different encodings.

Task-number: PYSIDE-797
Change-Id: I0f82945b6b334da8524882dda2f104327eba79d4
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-04-05 08:28:56 +00:00
Qt Forward Merge Bot
682513bed4 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I99a27f9a0402e1ccad45a2d062d784f8d9a08dd3
2019-04-03 01:00:11 +02:00
Friedemann Kleint
9cd021f517 uic: Refactor reverse name lookup
Add a helper routine to look up the dom classes by attribute name and
change Driver::widgetByName() and Driver::actionByName() to use that
as does Driver::actionGroupByName() (all these functions are called
with names from the XML files).

Remove the name normalization in
WriteInitialization::findDeclaration() and refactor
WriteInitialization::acceptActionRef() to call findOrInsert() to
correctly use the unique name.

Task-number: PYSIDE-797
Change-Id: I34058361964719c442182faf798f055f11b40412
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-04-02 11:37:36 +00:00
Friedemann Kleint
7f635d9777 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I38389a69411f4549fed432f1181dbe23398b34a2
2019-03-26 08:24:59 +01:00
hjk
322b052dd7 rcc: Avoid raw string literals
Subjective, but for me its easier to follow code flow if
indentation is not interrupted.

Change-Id: If811ba1b975189c94a671627be8eb3a1fd67aeb9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-03-20 16:47:20 +00:00
Qt Forward Merge Bot
11b9c813e6 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Ief0a0b754c104d5348fee9ee15e967bd37c526f8
2019-03-16 01:01:30 +01:00
Kevin Funk
41e7b71c41 More nullptr usage in headers
Diff generated by running clang-tidy's modernize-use-nullptr checker on
the CMake-based Qt version.

Skipping src/3rdparty, examples/, tests/

Change-Id: Ib182074e2e2fd52f63093f73b3e2e4c0cb7af188
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-03-14 07:37:52 +00:00
Liang Qi
29a70348d4 Add qstringview.cpp into bootstrap
After e89fbd8c, QString depends on QStringView.

Fixes: QTBUG-74340
Change-Id: I9cba49db73b74deca05b9a9ddfeec580f30b5e35
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-03-13 22:32:09 +00:00
Oliver Wolff
2412cfac51 moc: Fix parsing of [[deprecated]] enum values
moc now successfully parses enum values, that have been deprecated with
[[deprecated]]. This is valid c++17 and should be handled correctly.
By adding that functionality it is possible to parse Windows headers
which use this deprecation mechanism.

To make sure, that moc works correctly even on compilers that do not
support deprecated enum values yet, the auto test explicitly uses
[[deprecated]] enum values during moc run.

Fixes: QTBUG-74126
Change-Id: I7b9d9a49af6093a97f8fdb800ffbc5af3d54d262
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-03-11 14:11:33 +00:00
hjk
f91aae6397 rcc: Support Python as output format
Start with  rcc -g python|python2 $name.qrc.

[ChangeLog][rcc] Added support for Python as output format.

Done-with: Friedemann Kleint <Friedemann.Kleint@qt.io>
Fixes: PYSIDE-855
Change-Id: I97a642c3721d6d95b7cd0972d21abb0b2752fd4f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-03-07 10:45:42 +00:00
Jędrzej Nowacki
de1e15af44 Add support for C++ functions attributes in moc
Done-with: Ryan Chu <ryan.chu@qt.io>
Change-Id: Id7f2ba35ccea79e0a0c316ca2736101b8cd57f97
Fixes: QTBUG-58628
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-03-07 06:53:21 +00:00
Christian Ehrlicher
f8f592d5c2 QString: mark obsolete functions as deprecated
Mark obsolete functions in QString as deprecated so they can be removed
with Qt6:
 - QString::sprintf()
 - QString::vsprintf()

Change-Id: I9b7748db95291c34b95ff3ad3e3aabc8215aeaae
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-03-04 16:54:04 +00:00
Qt Forward Merge Bot
2a1292b916 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I4b56ce8c76729d9fc60995564299f8f27336fcde
2019-02-22 19:59:08 +01:00
Ulf Hermann
ae9be1a63d moc: Parse namespaces from other files
We can parse the namespaces in order to find the enums in them and
populate the related metaobjects of the current file's classes. The
symbol clashes are avoided by only generating metaobjects for namespaces
defined in the same file.

Fixes: QTBUG-71966
Fixes: QTBUG-72069
Change-Id: Ibdf21c3f9dae48d95b0952b3e220b4c29e30ecb8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-02-21 15:05:32 +00:00
Qt Forward Merge Bot
0c0c4a23bc Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I830beea26863323ab78a5d4b093f7763d77ad3da
2019-02-21 01:00:08 +01:00
Lars Schmertmann
130bede619 Add translatable attribute to the app_name string to fix a lint warning
Incomplete translation
----------------------
If an application has more than one locale, then all the strings
declared in one language should also be translated in all other languages.

If the string should not be translated, you can add the attribute
translatable="false" on the <string> element, or you can define all
your non-translatable strings in a resource file called  donottranslate.xml.
Or, you can ignore the issue with a tools:ignore="MissingTranslation" attribute.

Change-Id: I6f93f34fc36a06de9a0b687a93cf58df941dbbcb
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-02-20 17:32:29 +00:00
Kari Oikarinen
33707f5b2f Merge 5.12 into 5.12.2
Change-Id: I3a5721aebd3afd8fa08d3f3df6bf61502fa9c347
2019-02-20 12:37:31 +02:00
Qt Forward Merge Bot
035f934d7a Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp

Added tests/auto/testlib/selftests/expected_crashes_5.txt to work
round the output of the crashes test (which exercises UB, see
QTBUG-73903) being truncated on one test platform.

Change-Id: I9cd3f2639b4e50c3c4513e14629a40bdca8f8273
2019-02-20 09:51:12 +01:00
Dmitry Sokolov
55e31e6389 Kludge popen/pclose calls on MS-Win
For MS Visual Studio we need to use _popen() and _pclose() instead of
the POSIX functions; and the pipe needs to be opened in binary mode.

Change-Id: Ide0fb26a1e5f121b384b0baaf8100f26c614ccc6
Fixes: QTBUG-73810
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-02-19 10:41:14 +00:00
Qt Forward Merge Bot
67c70b22f6 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ifa143cc462301aaa305c9c85360e543553a751f0
2019-02-19 01:00:08 +01:00
Christian Kandeler
1366c4f046 androiddeployqt: Do not check for stdcpp-path in auxiliary mode
Fixes: QBS-1429
Change-Id: I189bc42fdee5e63f55705084247fbfc4448a6b65
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-02-18 12:16:28 +00:00
Joerg Bornemann
8fe3680193 Add cmdline feature to qmake
[ChangeLog][qmake] A new feature "cmdline" was added that implies
"CONFIG += console" and "CONFIG -= app_bundle".

Task-number: QTBUG-27079
Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-02-18 07:12:14 +00:00
Kai Koehne
568bc974d7 Remove eval mode
The evaluation mode of Qt hasn't been used since quite some time. Let's
just remove the remaining logic from the code base.

Change-Id: I61a2c432cbae78bf973f882848b3732e27431351
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Iikka Eklund <iikka.eklund@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-12 15:48:45 +00:00
Liang Qi
fbfacd33be Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/android/templates/AndroidManifest.xml
	src/network/ssl/qsslsocket_mac.cpp
	src/widgets/styles/qstylesheetstyle.cpp
	tests/auto/corelib/kernel/qtimer/BLACKLIST
	tests/auto/testlib/selftests/blacklisted/tst_blacklisted.cpp
	tests/auto/testlib/selftests/expected_blacklisted.lightxml
	tests/auto/testlib/selftests/expected_blacklisted.tap
	tests/auto/testlib/selftests/expected_blacklisted.teamcity
	tests/auto/testlib/selftests/expected_blacklisted.txt
	tests/auto/testlib/selftests/expected_blacklisted.xml
	tests/auto/testlib/selftests/expected_blacklisted.xunitxml
	tests/auto/testlib/selftests/expected_float.tap
	tests/auto/testlib/selftests/expected_float.teamcity
	tests/auto/testlib/selftests/expected_float.txt
	tests/auto/testlib/selftests/expected_float.xunitxml

Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Done-With: Edward Welbourne <edward.welbourne@qt.io>
Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: If93cc432a56ae3ac1b6533d0028e4dc497415a52
2019-02-08 12:31:02 +01:00
Qt Forward Merge Bot
e4c29088c8 Merge remote-tracking branch 'origin/5.12.1' into 5.12
Change-Id: I486f3c51df4b60fe60b75ba642636a835a75f731
2019-02-06 10:28:01 +01:00
Andy Shaw
9435526d50 qmake: Add variables for setting the version number and name in Android
This makes it much easier to have the version information set for an
Android APK without having to manually modify the AndroidManifest.xml
each time.

[ChangeLog][Android][qmake] Can now set the version name and code for
Android using ANDROID_VERSION_NAME and ANDROID_VERSION_CODE respectively
in the pro file.

Change-Id: Ie6813bc3a7444f7baa5e772b93bc2695d9b81e57
Done-with: Markus Maier <markus.maier@rosenberger.de>
Reviewed-by: Markus Maier <markus.maier@rosenberger.de>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-02-04 16:57:07 +00:00
BogDan Vatra
0c49815333 Fix llvm-strip error
In NDKr19 they removed "-strip-all-gnu" argument, now
llvm-strip prints tons of:
.../llvm-strip: error: unknown argument '-strip-all-gnu'.

Change-Id: I11bb2d6abcc5f236730c57b5b93cc932c7ba58c6
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-01-28 17:11:52 +00:00
Liang Qi
980567b3a3 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	src/android/templates/AndroidManifest.xml
	tests/auto/widgets/styles/qstylesheetstyle/tst_qstylesheetstyle.cpp

Change-Id: I4c9679e3a8ebba118fbf4772301ff8fde60455b9
2019-01-26 08:35:40 +01:00
Friedemann Kleint
07580a8d7b uic: Fix broken icon code generation
Change b86d0b6215 rearranged the
sequence of function calls when generating code adding QTabWidget
and QToolBox pages, not taking into account that the iconCall()
has a side effect (writing out icon definition) Revert that part
and add a comment.

Fixes: QTBUG-72980
Task-number: PYSIDE-797
Change-Id: Ie8fbaa36f21cd4408fb1f491195da5c260708e6c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-01-23 17:06:59 +00:00
Eskil Abrahamsen Blomfeldt
e0dc6dce22 Android: Set minimum supported version to android-21
With the current distribution, this is 90% of active devices, and
it was released in 2014. Qt 5.12 is LTS and will continue to support
older Android versions for a long time to come.

This is to reduce the testing needed on outdated platforms and
allow ourselves to use some newer APIs unconditionally in Qt.
Android 21 was chosen because it is the minimum version that supports
64 bit builds.

[ChangeLog][Android] Increased the minimum supported Android version
to Android 5.0 (API level 21).

Fixes: QTBUG-70508
Change-Id: Ia7b4345e42ca05a25a292f11ccbb8cbd692cf8f0
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-01-23 15:21:56 +00:00
Qt Forward Merge Bot
e3da05f39a Merge remote-tracking branch 'origin/5.12.1' into 5.12
Change-Id: Icebd151eae0cf9d400319a42573290d1a911ce26
2019-01-23 10:13:29 +01:00
Qt Forward Merge Bot
f94ca82e0f Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	.qmake.conf

Change-Id: Ibfcb30053f3aacb8ec2ec480e146538c9bf440ea
2019-01-21 13:03:09 +01:00
Joerg Bornemann
fa2821b484 Add the command line option --no-strip to androiddeployqt
There are certain use cases for keeping debug information on the
device, for example collecting stack traces when the app crashes.

[ChangeLog][Android] Added the --no-strip command line option to
androiddeployqt.

Change-Id: I96574c2c57d85fb23d5fc65380e471fa892b6543
Fixes: QTBUG-57771
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-01-16 07:39:04 +00:00
Friedemann Kleint
8c47c2a08e uic: Refactor CustomWidgetsInfo::extends()
Add a extendsOneOf() helper that takes a QStringList to be searched
and simplify the code accordingly.

In WriteInitialization::acceptWidget(), move the variable
CustomWidgetsInfo *cwi up and reuse everywhere to shorten code.

Task-number: PYSIDE-797
Change-Id: I331e135b6aa58dbbd413ca151eb67b3eb92f09c6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-01-10 09:13:36 +00:00
Liang Qi
0e96b5fe48 Merge remote-tracking branch 'origin/5.12' into 5.12.1
Conflicts:
	src/widgets/kernel/qtooltip.cpp

Change-Id: Ic2f9a425359050eb56b3a4e5162cf5e3447058c8
2019-01-08 09:34:24 +01:00
Liang Qi
03039979b5 Merge remote-tracking branch 'origin/5.12' into dev
Also blacklist tst_QRawFont::unsupportedWritingSystem() and
tst_QGlyphRun::mixedScripts() on windows for now.

 Conflicts:
	qmake/generators/makefile.cpp
	src/corelib/itemmodels/qstringlistmodel.cpp
	src/platformsupport/fontdatabases/windows/qwindowsfontengine_p.h
	tests/auto/corelib/itemmodels/qstringlistmodel/tst_qstringlistmodel.cpp
	tests/auto/gui/text/qglyphrun/BLACKLIST
	tests/auto/gui/text/qrawfont/BLACKLIST

Task-number: QTBUG-72836
Change-Id: I10fea1493f0ae1a5708e1e48d0a4d7d6b76258b9
2019-01-04 07:33:14 +01:00
Albert Astals Cid
59386e0907 Fix compilation with QT_NO_COMPRESS
Change-Id: Iabd57782458874abbc6b553b5e255a6b614de023
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-21 13:54:39 +00:00
Kai Koehne
5fd48d78d5 Bump copyright year to 2019
Task-number: QTBUG-72635
Change-Id: Idc9bd97fe873b332d7ff72cb44a00334a472404f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2018-12-18 07:51:10 +00:00
Samuel Gaist
a5eabac96d moc: add support for C++11 enum struct
C++11 added the new enum class key as well as enum struct. While the
former is likely the most known and used, the later can be used in the
same contexts and with the same effects.

Currently moc doesn't parse enum struct while it does for enum class.
This patch fixes this.

[ChangeLog][moc] moc now parses enum struct the same way as enum class
therefore that keyword can be used with the Q_ENUM macro as well as
Q_FLAG and Q_DECLARE_FLAGS.

Change-Id: Iaac3814ad63a15ee4d91b281d451e786b510449c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-12-15 13:24:29 +00:00
Qt Forward Merge Bot
911fd6f2f7 Merge "Merge remote-tracking branch 'origin/5.12' into dev" into refs/staging/dev 2018-12-15 01:03:08 +00:00
Qt Forward Merge Bot
4b04e47be9 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: Iad06d8c07dfc288c9d1a9f7ee3520285cea60546
2018-12-15 01:00:31 +01:00
Thiago Macieira
5384b1f2c8 Repack some classes in Moc to avoid padding holes
Change-Id: I8f261579aad648fdb4f0fffd155385477abadf9e
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-12-14 22:12:37 +00:00
Friedemann Kleint
3c3a2eb3ce uic: Generate version check macros around newly introduced palette color role
Change ebd3a13b80 introduced a new
QPaletter::PlaceholderText color role which causes the uic-generated
code not to compile when using Qt Designer embedded in Qt Creator with
older (5.9 LTS) kits. Generate a version check macro to fix this.

Change-Id: I6d9f7edb0c6047c2f64ef3357b29f91655c52aac
Fixes: QTBUG-72555
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2018-12-14 18:20:41 +00:00
Bernhard M. Wiedemann
1ffcca4cc2 rcc: Use SOURCE_DATE_EPOCH for mtime
Use the standard variable name in addition to the QT-specific one
to make builds reproducible out-of-the-box.

See https://reproducible-builds.org/ for why this is good
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

Task-number: QTBUG-62511
Change-Id: I401a2a9d258e751b83ae7b83f4100d9088b9ad71
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-12-14 12:09:06 +00:00
Friedemann Kleint
e6d1071dd3 uic: Refactor DOM class lookup in class Driver
Change the API to take const Dom * classes and use a helper
function to do the insertion.

Task-number: PYSIDE-797
Change-Id: I079f5c92bae85d6246c14077db06e381b572cda5
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-12-13 07:14:53 +00:00
Friedemann Kleint
ac7265e950 uic: No longer generate static_cast for enum values in legacy forms
Add a lookup for the affected enum values and use the names instead.

Task-number: PYSIDE-797
Change-Id: I6be166409000aff83d9465c9a3b2f37b44c5c085
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-12-13 07:11:12 +00:00
Thiago Macieira
d20c980576 Resources: reject compressed content we can't decompress
This solution is composed of two features:

1) C++ code generated by RCC uses two symbols exported from QtCore that
are only present if the feature was compiled in. If the feature was not
compiled in, this will cause a linker error either at build time or at
load time (if they were functions, the error could be at runtime).

2) Binary files generated by RCC have a new header field containing
flags. We're currently using two flags, one for Zlib and one for
Zstandard.

This means we now have binary RCC format version 3.

Change-Id: I42a48bd64ccc41aebf84fffd156545fb6a4f72d9
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-12-12 16:36:09 +00:00
Friedemann Kleint
b86d0b6215 uic: Small refactorings
- Do not use QString::number() to stream numbers.
- Do not use QLatin1String/Char to stream strings or characters.
- Add a convenience methods to determine the container page add method
  for simple containers.
- Similarly, extract a method to determine the layout method and
  simplify the code accordingly.
- Fix Clang warnings about else if after return/continue.
- Use QString::isEmpty() instead of size() to check emptiness.
- Fix QHash-contains()/value() Antipattern

Task-number: PYSIDE-797
Change-Id: I9c61d20f46c8d142b947126a27faaf54b41f9e0c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-12-12 07:27:15 +00:00
Friedemann Kleint
e209321966 Use Q_DISABLE_COPY_MOVE for private classes
Change-Id: I3cfcfba892ff4a0ab4e31f308620b445162bb17b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-12-12 07:23:54 +00:00
Jędrzej Nowacki
b28502182b Handle errors in moc generate.sh script
The script was happily ignoring all errors, relaying on a user reading
output.

Change-Id: I85edd228a40b5459c4649ab0c0bbbe3042a3abf5
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-12-12 06:21:24 +00:00
Thiago Macieira
57b4b45cbd RCC: introduce compression algorithm "best"
This compression algorithm is permitted in the XML sources, which
instructs RCC to apply the best compression algorithm it has available.
If we have Zstandard available, that's its level 19 (levels 20 and up
are experimental). If not, we apply zlib compression level 9.

And apply this technique for the XDG MIME database that is built-in to
QtCore.
             Payload size  Compr. time
 Previously        313916    17.9ms
 Zlib -9           310899    53.6ms
 Zstd -14          253364    63.3ms (plus 4.0 ms on L1 heuristic check)
 Zstd -19          230647   642.5ms

Change-Id: I343f2beed55440a7ac0bfffd1562de44dbaf09cd
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-12-11 03:57:41 +00:00
Thiago Macieira
2c9ac4fc3f RCC: Add support for Zstandard compression
[ChangeLog][RCC] RCC now supports compressing content using the
Zstandard (https://zstd.net) algorithm. Compared to zlib, it compresses
better for the same CPU time, so this algorithm is the default. To go
back to the previous algorithm, pass command-line option
--compress-algo=zlib. Compression levels range from 1 (fastest, least
compression) to 19 (slowest, best compression). Level 0 tells the
library to choose an implementation-defined default.
\
The default compression level is "heuristic" (level -1): under this
mode, RCC will attempt a very fast compression (level 1) and check if
the file was sufficiently compressed. If it was, then RCC will compress
again using an implementation-defined level.

The following are the 4 biggest files we store as resources in qtbase:
 Orig Size Name
   2197605 src/corelib/mimetypes/mime/packages/freedesktop.org.xml
   2462423 tests/auto/corelib/tools/qchar/data/NormalizationTest.txt
   6878748 tests/auto/other/qcomplextext/data/BidiCharacterTest.txt
   7959972 tests/auto/other/qcomplextext/data/BidiTest.txt

The current RCC (zlib, level -1 "default" and level 9), produces for
those files:
                        L(-1)    Compr.   L9      Compr.    Decomp.
 Name                   Ratio  CPU time   Ratio  CPU time   CPU time
BidiCharacterTest.txt   16.9:1  106.1ms   17.2:1  789.3ms     5.1ms
BidiTest.txt             6.3:1  228.0ms    6.1:1 1646.3ms    10.9ms
freedesktop.org.xml      7.0:1   17.5ms    7.1:1   53.6ms     2.6ms
NormalizationTest.txt    5.8:1   41.2ms    5.9:1  256.4ms     3.4ms

Zstandard produces the following for levels 1 ("check"), 14 ("store")
and 19 ("best"):
                       L1     Compr.   L14    Compr.    L19    Compr.     Decomp
 Name                  Ratio  time     Ratio  time      Ratio  CPU time   time
BidiCharacterTest.txt  15.8:1  8.0ms   26.1:1 168.9ms   49.2:1 2504.7ms    3.8ms
BidiTest.txt            8.2:1 17.0ms    8.7:1 323.9ms   14.9:1 1700.9ms   12.1ms
freedesktop.org.xml     6.7:1  4.0ms    8.7:1  63.3ms    9.5:1  642.5ms    1.7ms
NormalizationTest.txt   5.7:1  5.0ms    7.5:1  54.0ms    8.4:1  447.3ms    3.0ms

This shows use of zstd at the default RCC level settings always produce
smaller outputs compared to the current zlib-based defaults, with
roughly 50% CPU increase. It also produces better results at less CPU
time than the best compression zlib has to offer.

More importantly, the decompression time reduces in all cases (the
numbers listed are for max compression, with slightly better results for
the defaults).

For the sake of comparison, the same files compressed with libxz at
levels 3 and 6:
                        Level 3         Level 6           Decompr.
 Name                   Ratio   CPU     Ratio  CPU        time
BidiCharacterTest.txt   28.5:1 109.1ms  42.9:1 1390.5ms   16.7ms
BidiTest.txt            10.7:1 281.0ms  18.4:1 2333.1ms   43.6ms
freedesktop.org.xml      9.1:1  62.0ms  10.2:1  499.1ms   12.0ms
NormalizationTest.txt   10.2:1  75.5ms  13.2:1  417.6ms   14.7ms

LZMA at level 3 consumes roughly the same CPU time as Zstd at level 14
and produces incrementally smaller results, but the decompression time
increases considerably. It's not a good trade-off for the Qt resource
system.

Change-Id: I343f2beed55440a7ac0bfffd1562d754bd71d964
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-12-11 03:57:37 +00:00
Thiago Macieira
f25bc30d8d QResource: add support for resources compressed with Zstandard
See next commit for details on why this is a good idea.

[ChangeLog][Important Behavior Changes] The Qt resource system now
supports compressing content using the Zstandard (https://zstd.net)
algorithm. Compared to zlib, it compresses better for the same CPU time,
so this algorithm is the default. QResource::isCompressed() returns true
for either compression algorithm. Use QResource::compressionAlgorithm()
to find out which algorithm to decompress. QFile will automatically
decompress using the correct algorithm.

Change-Id: I343f2beed55440a7ac0bfffd1562e9a8f94933a7
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-12-11 03:57:35 +00:00
Thiago Macieira
163b5c0278 RCC: Modernize the compression algorithm selection
Instead of using compression level -2 to indicate no compression,
introduce CompressionAlgorithm::None and an equivalent XML attribute.
This commit includes some extra error checking for RCC.

Change-Id: I343f2beed55440a7ac0bfffd1562d64b024463ba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-12-11 03:57:32 +00:00
Sergio Martins
8576354b88 QtDbus: Remove unused QStrings [-Wclazy-unused-non-trivial-variable]
Change-Id: Iea776554aa5e01ecc6fa08ac2c8fb7b720d57126
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-10 13:05:41 +00:00
Sergio Martins
3464e1e5c7 Add a few qAsConst() to range-for to prevent detachments
places indicated by clazy

As a drive-by, fixed minor styling issues in the affected lines.

Change-Id: I88d3fc0c8573cde0e61f19a18dd9ea697ee40c34
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Luca Beldi <v.ronin@yahoo.it>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-12-10 11:47:28 +00:00
Sergio Martins
f5654d909a Pass non-trivial types by const-ref in range-loop [-Wclazy-range-loop]
corelib/serialization/qcbormap.h:176:14: warning: Missing reference in range-for with non trivial type (QPair<QCborValue, QCborValue>)
corelib/serialization/qjsoncbor.cpp:820:10: warning: Missing reference in range-for with non trivial type (QJsonValue)
gui/kernel/qguiapplication.cpp:1171:10: warning: Missing reference in range-for with non trivial type (QString)
printsupport/dialogs/qprintdialog_unix.cpp:741:10: warning: Missing reference in range-for with non trivial type (QString)
printsupport/kernel/qprinter.cpp:1851:10: warning: Missing reference in range-for with non trivial type (QVariant)
tools/qlalr/cppgenerator.cpp:463:8: warning: Missing reference in range-for with non trivial type (Name)

Change-Id: I327b0f116e329e55952ed5740a5f5af4b2918392
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-12-05 10:32:03 +00:00
Friedemann Kleint
f213e818f0 uic: Generate correctly qualified invocation of QCoreApplication::translate()
Change QApplication::translate() to QCoreApplication::translate()
in generator and tests.

Task-number: PYSIDE-797
Change-Id: I0bbaf1f280b74b3b2a701a39203c059ab82fce1f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-12-03 19:05:03 +00:00
Friedemann Kleint
68fc972ac8 uic: Remove unused code
Task-number: PYSIDE-797
Change-Id: I6958ad76c138dcb4126cda8b26f23311963d6d37
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-12-03 19:04:55 +00:00
Lars Knoll
b98c43ea60 Compile with QT_STRICT_ITERATORS defined
This will be the only options for Qt 6, so make sure the code compiles now.

Change-Id: I23f791d1efcbd0bd33805bb4563d40460954db43
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-11-26 07:04:24 +00:00
Liang Qi
bf58c70546 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	src/corelib/io/qdir.cpp
	src/corelib/kernel/qtimer.cpp
	src/corelib/kernel/qtimer.h

Done-With: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I683d897760ec06593136d77955f8bc87fdef3f9f
2018-11-22 01:53:29 +01:00
BogDan Vatra
6fdf398ab4 Android: Prepare for the worst, when the NDK will remove all GNU tools
In NDKr18 Google removed GCC, most probably the massacre will not end
there and they will remove all GNU tools, so we need to start using LLVM
ones.

This patch still keeps the compatibility with GNU tools if the Qt was
built with android-g++ mkspec.

Change-Id: Ibe1979577e08ce63604d55fc5bbd5f64b3737675
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-11-19 11:45:20 +00:00
Friedemann Kleint
85b4aaaa99 uic: Generate code for container page tooltips using the Qt configure system
Previously, the generation of this code was #ifdefed in uic itself.
However, the #ifdef should be in the generated code (anticipating
the cmake port where host and target builds might differ).

Task-number: PYSIDE-797
Change-Id: I46255f852f5f6a3d95d3a20456b6f00f2067a3fe
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-11-19 10:16:18 +00:00
Liang Qi
37d3bc9ad7 Merge remote-tracking branch 'origin/5.12.0' into 5.12
Change-Id: Ic1dd39044e19f50e1068d4ac70dacaad6440e570
2018-11-16 08:10:15 +01:00
Friedemann Kleint
24d1565789 uic: Use the Qt configure system when generating code
Replace the generation of #ifdef's for the macros by QT_CONFIG
checks. Implement it using streamable classes to make it easier
to switch the output language later.

Task-number: PYSIDE-797
Change-Id: I28b5ed3ec80cd525a3df0cd54d9be4f09149cde4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-11-13 18:53:12 +00:00
Qt Forward Merge Bot
0441d959ff Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I5dbdc13c6133e5b03e362c5461b4a599d781bd1e
2018-11-13 01:00:13 +01:00
Andy Shaw
1446cde812 Android: Make sure that the path is using / for separators
When passing \ to Gradle it will strip these out, so by using / it
ensures that it is able to find the Android SDK directory fine.

Change-Id: I053f087438ade6c30d015abe00e9958beb90a947
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-11-12 18:59:45 +00:00
Luca Weiss
b26ce2f0bf qdbuscpp2xml: Don't silently ignore unregistered property types
Change-Id: Icf23804cc4992314785f07cdc6aaf76eeea56465
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-11-12 07:14:34 +00:00
Liang Qi
58437fb125 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	src/corelib/serialization/qcborcommon.h
	src/corelib/tools/qlocale_data_p.h
	tests/auto/network/ssl/qsslsocket/tst_qsslsocket.cpp

Done-with: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: Ibed987f6d77a0294f78f67d78625237616082416
2018-11-10 11:38:40 +01:00
Kevin Funk
fe4448e9e8 moc: Modernize generated code a bit, use auto
Makes clang-tidy not trip over generated code while running the
modernize-use-auto checker. In theory clang-tidy just shouldn't look at
generated code of course; but in this case just modernizing the
generated code is easy, so let's do it.

Example:
.../moc_kastentoolviewwidget.cpp:78:9: warning: use auto when initializing with
 a cast to avoid duplicating the type name [modernize-use-auto]
        KastenToolViewWidget *_t = static_cast<KastenToolViewWidget *>(_o);
        ^~~~~~~~~~~~~~~~~~~~
        auto

Change-Id: I10c287320e1d5b5b8e66da3e0a22d517d0275dd1
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-11-09 21:43:12 +00:00
Liang Qi
bc07958f92 Merge remote-tracking branch 'origin/5.11' into 5.12
Conflicts:
	.qmake.conf
	qmake/Makefile.unix
	src/gui/text/qtextdocument.cpp
	src/gui/text/qtextdocument.h

Change-Id: Iba26da0ecbf2aa4ff4b956391cfb373f977f88c9
2018-11-09 10:34:33 +01:00
Liang Qi
825f988156 Modernize the "textcodec" feature
Also clean up QTextCodec usage in qmake build and some includes
of qtextcodec.h.

Change-Id: I0475b82690024054add4e85a8724c8ea3adcf62a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-11-07 13:19:54 +00:00
Qt Forward Merge Bot
290aac23a7 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: Id1e4664d3c942226b76e2c3b338df3116ff89297
2018-11-06 01:00:56 +01:00
Friedemann Kleint
235ea594ad uic: Remove remains of old Java generator
Preparing the use of the option for Python.

Task-number: PYSIDE-797
Change-Id: Ia1267b227ceac7f9dcbcfde6ed7c1480ef790f2a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-11-01 17:41:00 +00:00
Liang Qi
e28e91ae99 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	src/corelib/animation/qpropertyanimation.cpp
	src/gui/image/qicon.cpp
	tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp

Change-Id: I3698172b7b44ebb487cb38f50fd2c4a9f8a35b21
2018-10-25 07:21:53 +02:00
Friedemann Kleint
a517eb24fa uic: Ignore obsolete pixmap functions
After qtbase/550d2a0a15c9403894448ab83863e71bbac2d349,
pixmap functions are used for icons as well which can cause compile
errors for old UI files that still use them.

Task-number: QTBUG-8563
Change-Id: I61bd4b9c1bf774e071a35c5806657054a77ff4d0
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2018-10-16 11:25:35 +00:00
Simon Hausmann
c9aeb73fd1 Fix build with no-cast-from-ascii
Change-Id: I720ceb4e511c914b924c473470f65b5b248f682a
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-14 09:19:18 +00:00
Liang Qi
7344987c20 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	src/widgets/styles/qstylesheetstyle.cpp

Change-Id: I3a503b44ae413fbc0a90f4af70b8f84daffd86ad
2018-10-08 10:56:25 +02:00
Jarek Kobus
9f710b15f0 uic: Write the float and double properties in 'f' format
Make the code consistent with the DomProperty::write() method.

Task-number: QTBUG-70613
Change-Id: I622b4a019a4473823584de97304f8324f2cf0c6b
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-10-05 20:06:03 +00:00
Jędrzej Nowacki
5b99f3a34f Use std::addressof for taking an address instead of operator& in moc
Moc shouldn't artificially introduce calls to possibly overloaded
operator&. It can cause odd side effects in a user code.

Change-Id: Iaa1b491fe6a1a5ebd4dfa1172359dc792cc7604f
Fixes: QTBUG-68191
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-01 09:45:31 +00:00
Thiago Macieira
b66357e3eb moc: Fix compilation of text strings containing non-ASCII
On platforms where char is signed, like x86, the following is an error
(narrowing conversion):

 unsigned char x[] = { '\xc3' };

Change-Id: I495bc19409f348069f5bfffd15518f9ef4e43faf
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-09-10 04:17:03 +00:00
Thiago Macieira
1205f4a229 Moc: use QVector more often
It's more optimised and it vectorizes better, due to one level of
indirection fewer.

Change-Id: I495bc19409f348069f5bfffd1551e85092ed8dc2
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-09-09 05:23:08 +00:00
Friedemann Kleint
550d2a0a15 uic: Fix pixmap functions for QIcon
Task-number: QTBUG-8563
Change-Id: I69b16ac2327fee6dd6f26845bdda60ad4dde56fa
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-09-06 11:58:40 +00:00
Alex Blasche
c82d043de1 Bump copyright year of code generated by dbus tools
Change-Id: Ic5e2ecf672ea86e8ef70a9fa73c0535262d2e928
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2018-09-03 05:23:40 +00:00
Thiago Macieira
7bd79b3cff Plugins: Save some architectural requirement flags
...not just the debug flag. The information is saved outside of the CBOR
map for two reasons:

 1) removing the hack that depended on how QCborStreamWriter and
 TinyCBOR internally work, allowing for the extra parameter to be
 written directly. We wouldn't be able to use that hack anyway and would
 have needed a further, uglier hack to encode a byte whose value we
 don't know.

 2) outside the map, this information can be parsed more quickly and
 then we can discard any plugins we shouldn't actually load.

Since we're doing this for a flag, I decided to move the Qt version
there too for reason #2.

Change-Id: I61ecce6b1324410bbab4fffd153d4e5fc696d19e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-09-01 15:19:46 +00:00
Thiago Macieira
d9766ddc3d Plugins: store the metadata in CBOR instead of binary JSON
In preparation for Qt 6 deprecating the binary JSON format. Also reduces
the size of the metadata a little: for the xcb platform plugin, it went
down from 264 bytes to 138; for the jpeg image plugin, it went from 320
to 135.

I've had to change the signature so older versions of Qt won't try to
parse the CBOR data as Binary JSON. Unfortunately, before QJsonDocument
could get a chance to reject it, qJsonFromRawLibraryMetaData() needed to
allocate memory and that causes crashes with Qt < 5.11.2.

Change-Id: Ieb48f7c0dd0e4e0fb35efffd153bee34e16ce347
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-09-01 15:19:39 +00:00
Alessandro Ambrosano
5a707272a0 Tracepoints: fix ETW generator for pointers
Fixes compilation failure on Windows, due to TraceLoggingValue not
correctly casting pointer arguments to a known type.

Change-Id: I6027debe4ea3440588dd8677209d6d47048b6b0f
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-08-25 19:07:05 +00:00
Christian Kandeler
5be5b798b2 androiddeployqt: Add auxiliary mode
In this mode, library and other dependencies are copied into the build
directory, and the XML templates in the build directory are updated
accordingly, but the project is not built or installed.
Needed by qbs.
No existing code has been touched.

Change-Id: Ib8015f7c2315b39dfb21750fecc8618bce03cb8c
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-08-21 08:24:53 +00:00
Allan Sandfeld Jensen
1c623bc6d1 Fix QMetaObject naming of class enum flag
Adds an enumName to QMetaEnum to carry the name of the enum since for
flags that doesn't match the name of the Qt type, but is needed if the
flag is scoped.

Change-Id: I1c0f77eb9e40e6fd1eb6a59bea77caf0f33fcf43
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-08-11 07:59:15 +00:00
BogDan Vatra
490d461ab0 Fix apkPath for gradle 4.0+
This change keeps the compatibility with old gradle.
It is needed for projects that must use the old gradle version.

src/tools/androiddeployqt/main.cpp was moved from qttools into
qtbase in 5.11. So re-apply c03f5673 in qttools here.

Task-number: QTBUG-69755
Change-Id: I2399d445f8208766e4185d717bb51f1317fdcc00
Reviewed-by: Volker Krause <volker.krause@kdab.com>
(cherry picked from commit e2f4193112)
Reviewed-by: Vikas Pachdha <vikas.pachdha@qt.io>
Reviewed-by: Liang Qi <liang.qi@qt.io>
2018-08-09 07:21:19 +00:00
Volker Krause
86bea797dc Look for dependency XML files in all prefix paths
src/tools/androiddeployqt/main.cpp was moved from qttools into
qtbase in 5.11. So re-apply 07bc7c02 in qttools here.

Change-Id: I13a77a0c8567d07c4aa6369ed76bdb894b88f86f
Reviewed-by: Volker Krause <volker.krause@kdab.com>
2018-08-07 10:11:08 +00:00
Volker Krause
413ca86c29 Add support for additional prefix paths
That is, paths that are searched for dependencies too, next to the Qt
install prefix.

So far this only covers library dependencies, dependency meta data or
QML imports are subject to subsequent patches.

src/tools/androiddeployqt/main.cpp was moved from qttools into
qtbase in 5.11. So re-apply 14013829 in qttools here.

Change-Id: I5649e518cfa3deeac429b4142e6292cb514ef104
Reviewed-by: Volker Krause <volker.krause@kdab.com>
2018-08-07 10:11:05 +00:00
BogDan Vatra
e2f4193112 Fix apkPath for gradle 4.0+
This change keeps the compatibility with old gradle.
It is needed for projects that must use the old gradle version.

src/tools/androiddeployqt/main.cpp was moved from qttools into
qtbase in 5.11. So re-apply c03f5673 in qttools here.

Change-Id: Iaa669c6bf12277cb0cde422228a5c653b6bcf433
Reviewed-by: Volker Krause <volker.krause@kdab.com>
2018-08-07 10:11:02 +00:00
Friedemann Kleint
abc024eef7 uic: Fix clang-tidy warnings
- Simplify/streamline if statmenents
- Change else if to if after return/break/continue
- Use isEmpty() for containers instead of checking size()
- Replace index-based loops by range-based for

Change-Id: I008228a99082a4d0e27be9f6c6af392602140b2f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-08-03 20:35:41 +00:00
Allan Sandfeld Jensen
9ce4006565 Fix moc'ing of enum class flags
Keep the original class name around for a little longer so we can
generate the correct scoped enum in the moc output.

Task-number: QTBUG-47652
Change-Id: Ib5934316fa786cc475335b03c86b8ec2dc239055
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-07-26 22:14:56 +00:00
Ulf Hermann
e883ef6197 rcc: Add a --list-mapping option to output both resource and real paths
The --list option outputs only the file system paths, but does not tell
us where those files end up in the resource file system. This is
unfortunate because the resource paths are possibly the most interesting
thing to be expected from a listing of resource files. Add an option
that outputs a full mapping.

This is also useful for tools that need to resolve files for resource
paths from outside the application using the resources.

[ChangeLog][Tools][rcc] Added a --list-mapping option which shows a
mapping of resource paths to file system paths.

Change-Id: I0cb57fe091ef78b4a9eca8be2fc53278ae50cc11
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2018-07-25 07:08:31 +00:00
Friedemann Kleint
8d8a830f13 uic: Modernize the ui4.cpp/.h files
Apply a change from Qt Designer.
Silence clang-tidy warnings in the generated files

- use nullptr [modernize-use-nullptr]:

    Use nullptr where applicable and simplify the switch()
    statement in write() on this occasion to use member variables
    instead of accessors.

-  use '= default' to define a trivial destructor [modernize-use-equals-default]

    Check if any delete statements are required. If not, use "= default".

- use auto when initializing with new to avoid duplicating the type name [modernize-use-auto]

   Use auto.

Change-Id: I7b48872fd42a6118e7cca8510aacb9ffa7e01839
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-07-24 20:22:17 +00:00
Thiago Macieira
d6e9076891 moc: align and use newlines in the generated staticMetaObjects
Change-Id: Id59bdd8f1a804b809e22fffd154078f047078d70
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-07-23 03:44:44 +00:00
Jarek Kobus
ff18b02f21 uic: Revert the microoptimization patch introducing QStringLiteral
This reverts the following commits:
d12d2949d1
26c3bec09b
49b08f96e8

We can't easily predict all code paths for QDesigner
with such a microoptimization. We also don't want
to generate three different string constructions
depending on some sophisticated heuristics.

[ChangeLog][uic] The -no-stringliteral option is now deprecated and
UIC will not generate QStringLiteral anymore.

Task-number: QTBUG-65251
Task-number: QTBUG-51602
Change-Id: I34a5a1934a8df19c5c84ac2ba8e5168ce5665037
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-19 12:38:45 +00:00
Thiago Macieira
d0427759c6 Add qbswap for a memory region
The compiler was generating some vectorized code for qresource.cpp but
it wasn't very efficient. So improve upon it and make use in other
places where we read UTF-16BE strings.

[ChangeLog][QtCore] Added an overload of q{To,From}{Big,Little}Endian
that operates on a memory region.

Change-Id: I6a540578e810472bb455fffd1531fa2f1d724dfc
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2018-07-04 03:04:40 +00:00
Liang Qi
e3ed2281c0 Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/plugins/platforms/cocoa/qnsview.mm
	src/plugins/platforms/cocoa/qnsview_dragging.mm
	src/plugins/platforms/ios/qiosinputcontext.mm
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/plugins/platforms/xcb/qxcbwindow.cpp
	src/tools/androiddeployqt/main.cpp
		Was moved from qttools into qtbase in 5.11.
		So re-apply 32398e4d here.
	tests/auto/corelib/global/qlogging/test/test.pro
	tests/auto/corelib/global/qlogging/tst_qlogging.cpp
	tests/auto/corelib/io/qfile/tst_qfile.cpp
	tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp
	tests/auto/corelib/thread/qthreadstorage/test/test.pro
	tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp
	tests/auto/widgets/kernel/qapplication/test/test.pro

Done-with: Gatis Paeglis <gatis.paeglis@qt.io>
Done-with: Mårten Nordheim <marten.nordheim@qt.io>
Done-with: Oliver Wolff <oliver.wolff@qt.io>
Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
2018-07-02 11:23:45 +02:00
Giuseppe D'Angelo
d5e5e15c1c Tracegen: code tidies
* Do not rely on the side-effect that QTextStream returns _null_ strings
(rather than empty strings) to signal EOF; just check for it,
making the code easier to read.

* Scope a variable properly

* Use the char-based functions, rather than string-based functions
(e.g. QString::split(QChar), not QString::split(QString)) when we're
actually passing just one character

* Make error cases more verbose

Change-Id: I415773a60ea1b9013193a9a77e52655a6459047d
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2018-06-29 08:45:25 +00:00
Giuseppe D'Angelo
5e39b832e2 Tracegen: add support for pointers and intptr-like types
In general we want to support pointers and pointer-like types
(intptr and its variations); the main use case is tracing an object's
address. Adjust the lttgt generator to use hex formatting
for this kind of aguments; ETW recognizes the pointer argument type
automatically.

Change-Id: I8249a49b6d0b2d468b84c0fbb7624625421cde9a
Reviewed-by: Rafael Roquetto <rafael.roquetto@kdab.com>
2018-06-28 16:29:14 +00:00
Jan Arve Sæther
6af262b6d7 Move androiddeployqt to qtbase
androiddeploytqt is the only official way of deploying applications to the
device, so it is therefore part of the "platform". It therefore needs to live
in qtbase.

Change-Id: I52d7c4427275aacec792b71284a0c10edaf7ab69
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2018-06-21 11:08:57 +00:00
Liang Qi
f82e508516 Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	mkspecs/features/qt_common.prf
	src/corelib/tools/qstring.cpp
	src/plugins/platforms/windows/qwindowsmousehandler.cpp
	src/widgets/widgets/qmainwindowlayout_p.h

Change-Id: I5df613008f6336f69b257d08e49a133d033a9d65
2018-05-24 16:29:14 +02:00
Thiago Macieira
85278a6970 qlalr: fix build in C++17
std::unary_function and std::binary_function are gone. Remove their
uses.

Change-Id: I5d0ee9389a794d80983efffd152c96f0f2149b40
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-05-15 17:07:09 +00:00
Liang Qi
b5a956601f Merge remote-tracking branch 'origin/5.11' into dev
Conflicts:
	src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
	tests/auto/corelib/io/qresourceengine/qresourceengine_test.pro

Change-Id: I3169f709cc2a1b75007cb23c02c4c79b74feeb04
2018-05-08 20:43:45 +02:00
Friedemann Kleint
1b7337d23d qlalr: Fix startup crash in static builds
Replace the global variables qout, qerr by a functions to delay
the initialization.

Task-number: QTBUG-68166
Change-Id: Ib023da1bccc7eabc6e633ccb8945e5f209c5765e
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-05-08 15:19:14 +00:00
Oswald Buddenhagen
97d7a00989 rcc: don't drop entries with missing files in -list mode
the files may not exist _yet_. this change allows dynamically generating
the resource contents.

the ignoreErrors parameter is renamed to listMode and made less
aggressive, to better reflect the actual usage.

Change-Id: I2f6a75a23f1ef903f0d957f9a09f4df0ce2a2b35
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-05-07 11:50:13 +00:00
Mikhail Svetkin
194a404490 Make the use of -fdata-sections and --gc-sections more generic in Qt
Add qmake feature and configure option, which optimze the size of static
exectuable. Use for static build.
Enabled via configure --gc-binaries, or CONFIG += gc-binaries in 3rd party
projects.

Change-Id: I3c25b02caaef6a4afc6019afc9c67122dd11696d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-04-27 06:47:35 +00:00
Oswald Buddenhagen
1d537071de rcc: prune dead wildcard matching code
clearly, rcc was meant to support wildcard patterns in <file> entries.
however, since its inception, this code was broken: the exists() check
was done first, so the decomposition into path and wildcard would never
happen.
as actually supporting wildcards woulds just complicate matters, simply
remove that dead code.

on the way, re-arrange the code in a way that is advantageous for
subsequent changes, and insert a case that catches non-regular file
nodes (this would have previously run into the wildcard code).

Change-Id: Iac1a168b844ef5b176f6cc45d6a779fde0bec6f7
Reviewed-by: hjk <hjk@qt.io>
2018-03-29 18:16:50 +00:00
Jarek Kobus
4b24a61ecc uic: Add the include for QIcon conditionally
Task-number: QTBUG-66753
Change-Id: I31bd821396b59c8e83e19e02634cf1440a271215
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-03-06 06:49:00 +00:00
Andy Shaw
0da3ebd994 moc: Don't error our when parsing "using namespace __identifier(...)"
This follows on from a232251992 which
covered a similar instance of this. As with that change, we should not
abort the compilation, just ignore it.

Task-number: QTBUG-63772
Change-Id: Ide958080a90f43ed19edd8a320e7d45de1c96821
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-03-05 06:54:06 +00:00
Rafael Roquetto
48bce2e8f0 Support for LTTNG and ETW tracing
This commit introduces minimal support for instrumentation within Qt.
Currently, only LTTNG/Linux and ETW/Windows are supported.

Change-Id: I59b48cf83acf5532a998bb493e6379e9177e14c8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-28 19:17:02 +00:00
Thiago Macieira
a6b697ca13 Create corelib/serialization and move existing file formats into it
This is in preparation to adding CBOR support. We don't need yet another
dir for CBOR and placing it in src/corelib/json is just wrong.

Change-Id: I9741f017961b410c910dfffd14ffb9d870340fa6
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-01-26 20:59:50 +00:00
Friedemann Kleint
d4079b0797 uic: Support id-based translations
Use Ids from newly introduced id attribute depending
on the global form setting.

Change-Id: I0a5094d5543c0714c88511fa159b60afc9be3c81
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-18 11:31:09 +00:00
Jarek Kobus
748836dae8 Don't generate QAction include unconditionally
Generate it only when the form contains some actions.

Change-Id: Ic1d64003ccff6102174771c04999cf7c90ac2ae8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-15 15:50:12 +00:00
Jarek Kobus
000c76ada5 Don't generate QButtonGroup include unconditionally
Add it only when ui contains button groups.

Change-Id: I60a249a36565e6c7c3f7cb51bc146317bc7ddbe5
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-15 15:50:07 +00:00
Jarek Kobus
058474884c Don't generate QHeaderView include unconditionally
Generate it only when needed.

Change-Id: I7a89b18ec0f2ee7d55fcad1b3f9701269d7616ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2018-01-15 15:50:00 +00:00
Albert Astals Cid
537af27302 Simplify ifs since PP_WHITESPACE and WHITESPACE are the same
Change-Id: Ib18c60270d9275840db051f1eec86227cc8f6c1c
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-01-15 10:11:31 +00:00
Kai Koehne
42cb74aa81 MinGW: Remove workaround that disabled strict_c++
The workaround was needed in older versions of MinGW-w64 headers that
did disable some common functions for -std=c++1z. Anyhow, this is not
reproducable anymore with any recent MinGW-w64.

Change-Id: I8e34a2e055f8e2356696dd4fe131a757c1527574
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-12 11:41:37 +00:00
Liang Qi
f4d8cafc1b Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/3rdparty/harfbuzz-ng/src/hb-private.hh
	src/sql/doc/snippets/code/doc_src_sql-driver.cpp
	src/sql/doc/src/sql-driver.qdoc

Change-Id: I38f0e82fcd37926cbf3c1915e009a731040d4598
2018-01-11 18:10:41 +01:00
Martin Storsjö
74118a4784 moc: Initialize staticMetaObject with the highest user-settable priority
The referenced static meta object for the superclass might be in a
different DLL. In this case, the whole QMetaObject can't be initialized
all via preinitialized data in the data section of the binary, but must
run code at runtime to fill in the value of the dllimported pointer.

In these cases, both GCC and MSVC initialize as much as possible statically,
while only filling in the dllimported values (QMetaObject::d::superdata)
at runtime. Clang, on the other side, initializes the whole struct
at runtime if some part of it needs runtime initialization, leaving
the struct completely uninitialized before constructors are run.

In C++, there are no guarantees for in what order constructors in
different translation units are executed. This in particular means
that there are no guarantees as to whether qRegisterWidgetsVariant()
in qwidgetsvariants.cpp runs before or after the runtime initialization
of QWidget::staticMetaObject.

With GCC and MSVC, this doesn't seem to have mattered since only the
superdata pointer of the staticMetaObject was uninitialized - everything
else was initialized, and the superdata pointer doesn't seem to be
accessed during qRegisterWidgetsVariant.

With clang, the whole staticMetaObject is uninitialized, unless the
staticMetaObject has been initialized before (and the initialization
order is undefined).

By setting a manual priority (which is a GCC extension that also
clang supports) for the staticMetaObjects, we can be sure that
these are initialized before the actual explicit constructor
invocations (without any explicit initialization priority) that
can access the staticMetaObjects.

Change-Id: I64a82f12d690528567509791bae088b6304e189b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2018-01-09 18:36:46 +00:00
Oswald Buddenhagen
2226f01d74 qlalr: fix description
amends 710875efde.

Change-Id: Ia5e9dd6f3b080b876e4dc1eb99f2b43d73999c04
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2018-01-05 10:32:20 +00:00
Lars Knoll
0f315adf91 Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	.qmake.conf
	sc/corelib/io/qfsfileengine_p.h
	src/corelib/io/qstorageinfo_unix.cpp
	src/platformsupport/eglconvenience/qeglpbuffer_p.h
	src/platformsupport/input/libinput/qlibinputkeyboard.cpp
	src/platformsupport/input/libinput/qlibinputpointer.cpp
	src/plugins/platforms/cocoa/qcocoamenu.mm
	src/plugins/platforms/ios/qiosscreen.h
	src/plugins/platforms/ios/qioswindow.h
	src/plugins/platforms/ios/quiview.mm
	src/printsupport/dialogs/qpagesetupdialog_unix_p.h
	src/printsupport/dialogs/qprintpreviewdialog.cpp
	src/printsupport/widgets/qcupsjobwidget_p.h
	src/widgets/widgets/qmenu.cpp
	tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
	tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp

Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
2018-01-02 09:58:44 +01:00
Lars Knoll
db92f2f3aa Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	.qmake.conf
	mkspecs/win32-g++/qmake.conf
	src/corelib/global/qglobal_p.h
	src/corelib/global/qoperatingsystemversion_p.h
	src/corelib/io/qfilesystemengine_win.cpp
	src/network/bearer/qbearerengine.cpp
	src/platformsupport/input/libinput/qlibinputpointer.cpp
	src/sql/doc/snippets/code/doc_src_sql-driver.cpp
	src/widgets/kernel/qwidget_p.h
	src/widgets/kernel/qwidgetwindow.cpp
	src/widgets/styles/qfusionstyle.cpp
	tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp

Change-Id: I80e2722f481b12fff5d967c28f89208c0e9a1dd8
2017-12-30 12:09:53 +01:00
Jake Petroules
44da5b8635 Allow moc to handle Unicode output filenames on Windows with MSVC
The C standard library functions cannot handle UTF-8 filenames. Instead,
we need to use the wide-character versions which accept UTF-16 input.

Task-number: QTBUG-65492
Change-Id: If4b3b4eeeec4f3bbb428b8f6b0311a65d01463b0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-12-28 15:29:02 +00:00
Jake Petroules
f0d226e4c5 Add a "shim" to allow use of Clang 5's __builtin_available everywhere
This is mostly relevant for Apple platforms, where we can use the new
unguarded availability warnings to guarantee that proper version checks
are present when using APIs that are not necessarily available on the
deployment target.

Change-Id: Ie408704b2924e1220491a9ea30f0141dfa4867d9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
(cherry-picked from 70422449ef)
2017-12-08 19:23:04 +00:00
Oswald Buddenhagen
0f1b8fd2dc work around flex bug
flex emits code using isatty(), but fails to include the required
unistd.h. we can work around it by including the header ourselves.

Task-number: QTBUG-64771
Change-Id: I05313eeb79f7a0e25365dee5f05a0142f87209ae
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-30 20:24:39 +00:00
Liang Qi
153e8b49ad Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/network/access/qhttp2protocolhandler_p.h
	src/network/kernel/kernel.pri
	src/network/ssl/qsslkey_qt.cpp
	src/plugins/platforms/cocoa/qcocoascreen.mm
	src/plugins/platforms/windows/accessible/iaccessible2.cpp
	src/plugins/platforms/windows/accessible/iaccessible2.h
	src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
	src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
	src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h
	src/widgets/widgets/qmenu_p.h
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/other/qaccessibility/tst_qaccessibility.cpp
	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

Done-with: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
2017-11-23 09:36:03 +01:00
Bernhard M. Wiedemann
38271e9298 Allow to override resource file date
because some packages create resource input files at build time
and thus get the build date embedded in binaries,
so that they differ for each build.

See https://reproducible-builds.org/ for why this matters
and https://reproducible-builds.org/specs/source-date-epoch/
for the definition of this variable.

Task-number: QTBUG-62511
Change-Id: I8908ac6182fab066e6ea398df2567f6d050c77e7
Reviewed-by: hjk <hjk@qt.io>
2017-11-13 16:00:34 +00:00
Liang Qi
a7e4b645dc Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/corelib/global/minimum-linux.S
	src/network/access/qhttpthreaddelegate.cpp
	src/widgets/kernel/qwidgetwindow.cpp

Change-Id: Id2e817e85f85c68f5482c9a12912d35590f9d5f8
2017-11-05 18:02:18 +01:00
Liang Qi
17d5141113 Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	src/plugins/platforms/windows/qwindowswindow.cpp
	tests/auto/widgets/kernel/qaction/tst_qaction.cpp

Change-Id: Ia017a825ed2ca2d53ac586f4ae48df6f65818d40
2017-10-30 08:54:05 +01:00
Friedemann Kleint
44401d26af uic: Fix clazy warnings clazy-qstring-left, clazy-unused-non-trivial-variable
Change-Id: Ibbb9a85dba7773bb70298906bc370b4e24d7d901
Reviewed-by: Robert Loehning <robert.loehning@qt.io>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2017-10-27 20:01:51 +00:00
Friedemann Kleint
5eb508a317 Fix clazy-strict-iterators
Change-Id: I9276a85f0a8061b2636687cf694b8ed1abaa18b8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-10-25 09:19:19 +00:00
Olivier Goffart
abcf558e49 moc: Restore compatibility with Qt 5.7's -b option
In Qt 5.7, it was possible to call moc "-bfoo.h" or "-b foo.h" and it had the
same effect. With the port to QCommandLineOption, we broke the -b option as it
was not annotated as a short option.
(Regression in a7e3c17e75)

Task-number: QTBUG-63706
Change-Id: I161d0f1a4e65d129063b5e8431802257677da19d
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-10-24 16:43:47 +00:00