Commit Graph

1517 Commits

Author SHA1 Message Date
Friedemann Kleint
fdef9c8039 uic: Implement form window setting to disable QObject::connectSlotsByName()
Task-number: QTBUG-76375
Change-Id: I16ad147366aa7d52b7a0e17ae240127d8ac34b3c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-07-02 09:15:47 +02:00
Marvin Scholz
a03270f891 rcc: Add -d option to output a Makefile-syntax depfile
The -d option makes rcc output a dependency file with the specified
file name.

The resulting dependency file is useful for make or ninja based build
systems.

[ChangeLog][Tools][rcc] Added -d option to generate a dependency file.

Fixes: QTBUG-45460
Change-Id: I495ade50f8d9865d4c00dce9373b2b6d1a6c8f2f
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-06-29 02:26:23 +02:00
Giuseppe D'Angelo
f66c1db16c Introduce Q_NAMESPACE_EXPORT
A recurring problem with the Q_NAMESPACE macro is that it declares
an object (staticMetaObject) in the surrounding namespace. That
object lacks any export/import qualification to make it usable
with shared libraries.

Introduce therefore another macro to work around this issue, allowing
the user to prefix the object with an exporting macro, f.i. like this:

Q_NAMESPACE_EXPORT(Q_CORE_EXPORT)

The old macro can simply then be rewritten in terms of this new one,
supplying an empty export macro.

Note that NOT passing an argument to a macro expecting one is well
defined behavior in C99 -- the macro will expand an empty token.
Of course, MSVC doesn't like this and emits warnings. As a
workaround, use a variadic macro.

[ChangeLog][QtCore] Added the new Q_NAMESPACE_EXPORT macro. It
can be used just like Q_NAMESPACE to add meta-object information
to a namespace; however it also supports exporting of such
information from shared libraries.

[ChangeLog][Potentially Source-Incompatible Changes] Prefixing
Q_NAMESPACE with an export macro may no longer work. Use the new
Q_NAMESPACE_EXPORT macro for that use case.

Fixes: QTBUG-68014
Change-Id: Ib044a555ace1f77ae8e0244d824ec473550f3d8e
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-06-28 06:47:29 +02:00
Friedemann Kleint
94bee657c1 uic: Fix remaining clang warnings
Fix remaining nullptr and member initialization issues which
Qt Creator did not catch.

Change-Id: If5492259aea9849c790f00809a27f4c78b446b9b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-06-28 00:24:51 +02:00
Friedemann Kleint
6301d5e51b uic: Add option to disable the call to QObject::connectSlotsByName()
The code was actually there, but not connected to the command line
parser.

Task-number: QTBUG-76375
Change-Id: I801cf2bbd2f207a6ce1dabd1ee1dfbd892089bbc
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-06-28 00:24:47 +02:00
Liang Qi
25eb97d2d4 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	.qmake.conf
	src/network/ssl/qsslsocket_openssl.cpp

Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: Ibb57a0548b4977797b400637487a56245ac1c024
2019-06-27 14:38:03 +02:00
Simon Hausmann
7810209ba3 Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: I4ea2b77cc201daed94fbe321f146dfd20365a534
2019-06-26 11:33:19 +02:00
Thiago Macieira
cbdc9a7786 RCC: Change the default compression to Zlib
Codebases using QResource::isCompressed() and assuming it is Zlib break
if zstd is enabled. So change the default back to Zlib until Qt 6.0.

[ChangeLog][Important Behavior Changes] RCC's default compression
algorithm was changed back to Zlib, as it was in all previous releases
until 5.13.0. The default will remain Zlib for all Qt 5.x releases but
will change in Qt 6.0. To activate Zstd compression for your resources,
either pass the --compress-algo=zstd option to the rcc tool or add the
XML attribute compression-algorithm="zstd" to the <file> tags in the
.qrc file.

Task-number: QTBUG-76521
Change-Id: Ief874765cd7b43798de3fffd15a9f56fd9ad1ad4
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-06-20 09:51:40 -07:00
Alexandru Croitor
4e875d988e Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: Ieb8efee9d74229b9f141ec715e3a9557586b51e8
2019-06-11 11:16:42 +02:00
Giuseppe D'Angelo
3e75c2965c Remove QLatin1Literal usages
That's an undocumented Qt 4/3/2 remnant, start remove usages.

Fix incorrect include header in qclass_lib_map.h as a drive-by.

Change-Id: I939be2621bc03e5c75f7e3f152546d3af6d37b91
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-10 16:50:31 +00:00
Alexandru Croitor
2a302a7361 Merge remote-tracking branch 'origin/dev' into wip/qt6
Change-Id: Iac12a37fa6536ebe30e6548f7c54ec0c402c9f5d
2019-06-06 19:00:41 +02:00
Thiago Macieira
5e40d3d982 qfloat16: Check in the tables to Git
It's a 38k source file, which makes it MUCH smaller than other generated
files like qlocale_data_p.h (982k) and qunicodetables.cpp (718k). The
constants are platform-independent, since they are defined by IEEE 754,
so they will never change.

The generator tool is moved to util/ and removed from the build. That's
one fewer bootstrapped tool to have to worry about.

The output file is committed as .cpp so it won't get installed.

Fixes: QTBUG-76165
Change-Id: I2b1955a995ad40f3b89afffd15a3ded58dc3e35f
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-06-03 10:42:53 -07:00
Thiago Macieira
26e5aa45e1 De-bootstrap the qfloat16 generator tool
It doesn't really need Qt. So remove the dependency. I've confirmed that
the output is identical to what used to be generated.

This ought to be replaced by a script. Or just committed to Git, since
the generated output is not really supposed to change, ever.

Change-Id: I46363e5b8944459e8c48fffd158bb5d74fb6184c
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-06-03 10:42:44 -07:00
Jan Arve Sæther
cefaa2ff4c Fix androidtestrunner for windows
First, we cannot quote the whole command in double quotes, since the
command itself very often have double quotes inside it.

Secondly, we should use the same that the ssh(1) command does:
Instead of adb shell setprop foo 'a b' we should use
adb shell setprop foo "'a b'" as explained here:
[https://developer.android.com/studio/command-line/adb#shellcommands]

Last hunk in isRunning():
The pipe character got eaten by the shell if we used a single quote (so
the stuff after the pipe (grep) was actually run locally).
Switching to ssh-style quoting fixed that.

Change-Id: I3075cdf8595ac2549cec8019f2cba79f77815e0b
Reviewed-by: BogDan Vatra <bogdan@kdab.com>
2019-06-19 13:00:19 +02:00
Kai Koehne
5505d25be9 uic: Remove deprecated options
The --no-stringliteral option got introduced by commit d12d2949d1
for 5.10.0, but already deprecated in commit  ff18b02f21 for 5.12.0.

[ChangeLog][uic] uic does not accept the --no-stringliteral/-s option
anymore.

Change-Id: I7a0f647ad91b3760bc826884702bf8581f5565f2
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-05-27 09:56:38 +00:00
Edward Welbourne
9ff6df8929 Convert the one extant use of QTime as a timer to use a local class
Use QDateTime::currentMSecsSinceEpoch() instead of a QTime with funky
wrapping at midnight and potential DST glitches.

Change-Id: I2455db5778635fc00b4ffdef6edee6d6793e50eb
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-24 16:37:39 +02:00
Edward Welbourne
548513a4bd Separate out the time, zone, date code from corelib/tools/
We'll be adding calendar code here as well, and tools/ was getting
rather crowded, so it looks like time to move out a reasonably
coherent sub-bundle of it all.

Change-Id: I7e8030f38c31aa307f519dd918a43fc44baa6aa1
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-06-06 15:54:32 +02:00
Qt Forward Merge Bot
93f7a24df0 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ic7c790602e4ac3f4a0d3d4630441b28cf76f75fc
2019-06-11 01:00:06 +02:00
Friedemann Kleint
7ff7d73f6a moc: Fix indentation of generated code
Clang warns about misleading indentation when parsing moc-generated
files. Amends 4ed39bed4e.

Change-Id: Ie8c5b38a28316cb2541304eb712ad2ca60be0e42
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-06-07 11:43:28 +02:00
Ville Voutilainen
2a1651cc16 Make moc grok binary literals with digit separators
Task-number: QTBUG-75656
Change-Id: I6011ef2fb07497cc2a055d6828a1b6356927c281
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-05-10 18:34:02 +00:00
Qt Forward Merge Bot
f8212b87d9 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I0c00ffe0eabebc919f22d6faa4bf958b288e8fd9
2019-05-12 01:00:08 +02:00
Liang Qi
76efe79d5c Merge "Merge remote-tracking branch 'origin/5.12' into 5.13" into refs/staging/5.13 2019-05-03 12:55:47 +00:00
Liang Qi
b5c2535eb0 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/3rdparty/pcre2/qt_attribution.json

Change-Id: Ibae941cb12662f27bd6962ee02bc235971c59a15
2019-05-03 10:44:24 +02:00
Mitch Curtis
42d865e08c androiddeployqt: print qmlimportscanner command in verbose mode
This helps debugging import issues, and will produce output like this:

Running qmlimportscanner with the following command: /media/dev2/qt5.13-android-x86-debug/qtbase/bin/qmlimportscanner -rootPath /media/dev2/qt5.13/qtquickcontrols2/tests/auto/customization/ -importPath /media/dev2/qt5.13-android-x86-debug/qtbase/qml /media/dev2/qt5.13/qtquickcontrols2/tests/auto/customization/

Task-number: QTBUG-73572
Change-Id: I3c8fe16cb76f1b11913a3b9cc98470f6071438ab
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-03 08:39:02 +00:00
BogDan Vatra
595d816c58 Android: Copy extra libs in aux mode
Change-Id: Ibbdd6b9c23c094923bc60a8a013f3ac356444510
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-05-02 14:50:33 +00:00
Qt Forward Merge Bot
0dff40adf8 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I6ecf7074eda57ef4954fb3fdc7a6d1e8cd229340
2019-04-26 01:00:13 +02:00
BogDan Vatra
fc2e9ac7e0 Revert "androiddeployqt: Do not check for stdcpp-path in auxiliary mode"
stdcpp-path is needed to set the correct stdc++ library in libs.xml file.

This reverts commit 1366c4f046.

Change-Id: I79b398c5d97c1e98bf503ef7b95b2e9f0f18bc11
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2019-04-25 08:20:22 +00:00
Qt Forward Merge Bot
ce7f14d2e0 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Iec860bb703f983b7438e67c695b9c454e72b3e0f
2019-04-06 01:00:08 +02:00
Milian Wolff
6ce2a87c23 Forward declare all types required for compilation with -trace
This patch fixes compilation with `-trace lttng` or `-trace etw`. We
need to forward declare QEvent, QImageReader etc., otherwise the types
will be unknown while compiling the trace points.

In order to handle this generically, the tracegen utility is extended
to support a 'prefix text' in the `*.tracepoints` input files. Any
text within curly braces will be embedded as-is in the generated file.
This can then be used to add forward declarations for the types we
need, including potential namespaces and such.

Change-Id: I5cb16763ce0fcb48ce3ea4577578d468ff3a4f4b
Reviewed-by: Konstantin Tokarev <annulen@yandex.ru>
2019-04-05 11:57:39 +00:00
Allan Sandfeld Jensen
0683bbc67c Fix remaining Q_DECL_OVERRIDE instances
Change-Id: I512ea5a6c8cf2928b276af7f83f00a1df5879595
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2019-04-02 10:48:29 +00:00
Qt Forward Merge Bot
6893919b0c Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/gui/kernel/qplatformintegration.cpp
	src/gui/kernel/qplatformintegration.h
	src/plugins/platforms/wasm/qwasmintegration.cpp
	src/plugins/platforms/xcb/qxcbconnection_screens.cpp

Change-Id: I15063d42e9a1e226d9d2d2d372f75141b84c5c1b
2019-03-20 14:09:30 +01:00
BogDan Vatra
079dafc42f Run prebuilt android test APKs
androidtestrunner now checks is the apk is build and if it is, it will skip the build phase.
Now we can build the apks in parallel (which takes most of the time) and run them sequentially.
This way running tests on Android is much faster.

Change-Id: I82f34723ac08f7728cc0daab3366e03821335eed
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-06-13 07:26:20 +00:00
BogDan Vatra
0ad4da0c64 Android: Nuke ant support
Ant is history for so many years, yet we forgot to remove it from
androiddeployqt.

[ChangeLog][Android] Remove ant support from androiddeployqt

Change-Id: I093295e18e8710c565e9d101e21c49b3c62f6322
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2019-06-06 15:25:12 +03:00
BogDan Vatra
a5e03f59f4 Say hello to androidtestrunner
androidtestrunner is a tool needed to run qt tests on Android.
Now you can run tests as simple as you run them on Linux, macOS,
Windows.
"$ make check" it's all you need to run tests on the default android
device.

ANDROID_DEVICE_SERIAL env variable can be used to use a specific android
serial.

Use cases:
$ make -j1 check
-j1 is needed to make sure we don't run multiple tests in parallel.

$ ANDROID_DEVICE_SERIAL="emulator-5554" make check
Run the test on "emulator-5554"

$ make TESTARGS="-- -xml" check
Switch to xml output. All params after -- are passed to test
application.

$ make TESTARGS="-- -o out.xml,xml -o out.txt,txt -o -,tap -vs" check
Create two files out.xml and out.txt in the current folder and print
"tap" format to stdout and enable logging of every signal emission.

[ChangeLog][Android] Make it easy to run Qt tests on Android.
"$ make check" is all it's needed to run a test on an Android device.

Change-Id: I1a7f64b62608f7367b5a6aabf5d6c6e7e50242e6
Reviewed-by: Jędrzej Nowacki <jedrzej.nowacki@qt.io>
2019-06-06 15:25:07 +03:00
Liang Qi
b1a216649e Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	qmake/generators/makefile.cpp
	qmake/generators/unix/unixmake2.cpp
	src/corelib/thread/qthread_unix.cpp
	tests/auto/corelib/tools/qsharedpointer/tst_qsharedpointer.cpp

Change-Id: I1df0d4ba20685de7f9300bf07458c13376493408
2019-06-14 13:45:18 +02:00
Friedemann Kleint
2e20ae3c1b uic: Fix some clang warnings
- Use range-based for
- Use isEmpty() instead .size(), streamline code
- Fix warnings about class definitions, use Q_DISABLE_COPY_MOVE
  and '= default' for trivial constructors

Change-Id: I76255fd9d80c3faffebda9a438e86e918c16d289
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-06-06 11:08:01 +02:00
Friedemann Kleint
5343a7018e uic: Replace 'typedef' by 'using'
Apply Fixits by Qt Creator with some amendments.

Change-Id: I152cb5935ff7d649de297b010b9253c625c7da84
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-06-06 10:57:04 +02:00
Friedemann Kleint
2f84ec4bcd uic: Introduce nullptr
Apply Fixits by Qt Creator.

Change-Id: Ic2d65b2604d1d71d910773e02bcdf2466f49e52c
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-06-11 09:05:38 +02:00
hjk
166753d8e0 rcc: Avoid needless use of macro
strlen on literals gets typically optimized out nowadays.

Adjust callee side to handle the off-by-one between sizeof(literal)
and strlen().

Change-Id: I1551f69a160922681d66024701ba1bd8f6dc03bf
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2019-05-28 12:30:11 +02:00
Qt Forward Merge Bot
a1808c5dbe Merge remote-tracking branch 'origin/5.12.2' into 5.12
Change-Id: I5f9d8090a07056411fb65d7de60eb679d00e99a3
2019-03-15 11:10:10 +01:00
Qt Forward Merge Bot
e608b5d555 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: I2bf3b4ceb79364330eae4cbf3cdee9a82d1be46d
2019-03-15 01:00:43 +01:00
Christian Ehrlicher
02c25f334d uic: write out min/maximumSectionSize property before current size
Since faff43348b the min/maxSectionSize is
respected when setting the current/default section size programatically.
This is not honored when writing out the properties and therefore the
default section size is not correctly set when it's smaller then the
default minimum section size.
Therefore make sure to set min/maxSectionSize property before all other
properties.

Fixes: QTBUG-74352
Change-Id: I8f9ede3e90b7c9c65f8440953b00e1d9d6006d38
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-03-14 16:50:57 +00:00
Ulf Hermann
a6154ca648 androiddeployqt: Also shellquote rootPath as part of importPaths
Fixes: QTBUG-74212
Change-Id: Ie0c9b5b230e93e50d6e636a6105c3bd717715374
Reviewed-by: Andy Shaw <andy.shaw@qt.io>
2019-03-14 16:46:44 +00:00
Thiago Macieira
9649c41ed9 qfloat16: suppress the tables if FP16 is supported by the CPU
If QtCore is being compiled to a system with FP16 support, then all
applications are too and, therefore, we don't need the tables. Saves 12k
of read-only data.

Change-Id: I46363e5b8944459e8c48fffd158bb53d906df297
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-03-14 14:59:28 +00:00
Friedemann Kleint
c1721cc859 uic/Python: Generate empty strings as "" instead of QString()
Task-number: PYSIDE-797
Change-Id: I4ce12ba01318e5ed7e88178dfd2450d9fe78c708
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-05-08 19:29:50 +00:00
Lars Knoll
92f9842732 Deprecate conversion functions between QList and QSet
Users should use range constructors instead to do the conversion.
Keep conversion methods between QList and QVector as these will turn
into a no-op in Qt 6, whereas forcing people to use range constructors
would lead to deep copies of the data.

Change-Id: Id9fc9e4d007044e019826da523e8418857c91283
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-07 14:15:44 +00:00
Ulf Hermann
587bdd144b Add QUrl to bootstrap set
The QML language server needs to use QUrl as that is what the language
server protocol uses to specify files.

As we cannot implicitly cast char to QChar in the bootstrap library, we
need to apply a build fix in qipaddress.cpp.

Change-Id: Ifaf8421457b1f734402b5aad965ecdec764a73e8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
2019-05-07 13:22:42 +00:00
Liang Qi
c2b553784d Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/corelib/kernel/qobject.cpp
	src/corelib/kernel/qvariant.h
	src/corelib/tools/qlist.h

Done-With: Milian Wolff <milian.wolff@kdab.com>
Done-With: Allan Sandfeld Jensen <allan.jensen@qt.io>
Change-Id: I6803f7239aa137a51a7467fab7cc7a01302a848d
2019-05-07 11:58:30 +02:00
Lars Knoll
1f1e04f29f Deprecate providing a function as a property flag
Property flags such as SCRIPTABLE should not get controlled by
a function. I can't see this feature being used anywhere and it
leads to additional overhead that I'd like to get rid of for Qt 6.

Change-Id: Iaa10b2b3bfb7eec11401f7b6bb887c9467b67183
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-05-03 09:36:48 +00:00
Lars Knoll
343528841e Prefix textstream operators with Qt::
As the non prefixed variants are deprecated

Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf
Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
2019-05-02 11:52:02 +00:00
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