Commit Graph

579 Commits

Author SHA1 Message Date
Lars Knoll
52f3a7d9d4 Build qmake with QT_USE_STRINGBUILDER
Should improve performance and is going to be required in
the future anyway.

Change-Id: I89d7c50441d2491da1ab0a4d564dcc91f52ade85
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
2020-05-05 18:41:10 +02:00
Friedemann Kleint
ae7e701074 uic: Generate string-based connections for custom slots
Qt Designer let's you add custom slots and signals to the main
form; they should use string-based connection syntax since the
class is not known in setupUI(). Amends
da3cb1deb6.

Task-number: QTBUG-76375
Change-Id: I5a3a5630f77c812d48db1cdb7a8658a4d2718228
Reviewed-by: Liang Qi <liang.qi@qt.io>
2020-05-05 15:35:51 +02:00
Friedemann Kleint
da3cb1deb6 uic: Generate Qt 5 connection syntax
Add a enum and formatting for member function pointer based
connections. Now preferably use member function pointer for Qt classes
or parameterless connections.

This should not require qOverload() within Qt classes after the
Signal/Slot disambiguation.

Add command line option to force either syntax for all connections.

Task-number: QTBUG-76375
Change-Id: Icdb4051e1173172a71cd536bdbc7d1ab1edf267d
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-05-04 08:12:33 +02:00
Simon Hausmann
3d7265db90 Provide a way of exposing private QProperties with a fake API
The API reduces the amount of manual plumbing required to offer a
conceptual property through the traditional setter/getter API as well as
through QProperty<T> API. Since the latter would require inlining the
type and thus making it impossible to add new properties without
breaking binary compatibility, this patch introduces a fake API that
behaves similar but does not contain the property by value.

Change-Id: Ib9bccd867f0e4e36a520e5583ba348e728284253
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-04-30 19:39:25 +02:00
Simon Hausmann
b480acb372 Allow for private properties to be implemented using QProperty
Recently the moc learned that Q_PROPERTY(int x ...) can mean that "x" is
implemented as QProperty and then allows installing bindings, etc. -
this works by scanning the same class' members.

For our own use of QProperty, we need to place the QProperty member
itself into the d-pointer to be able to maintain the ability to add new
properties without breaking binary compatibility. That however means
that moc can't know that a certain property is backed by QProperty - we
don't scan the members of the private class.

As a workaround, this change enables the syntax where the property type
used in Q_PRIVATE_PROPERTY may be wrapped with QProperty<T>.

In addition this patch fixes the compilation of such declared properties
by ensuring the accessor prefix (t->$accessor) is applied also for the
QProperty related meta call variants.

Change-Id: I8fbdc49319048b57f4eb0b65b56daba0459e9598
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2020-04-30 19:39:19 +02:00
Friedemann Kleint
a19d743b2c uic tests: Update version in baseline
Change-Id: I74334587727097a59fdeccd2fc58d18096cfed0a
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2020-04-29 22:48:26 +02:00
Lars Knoll
56ebc2363d Fix autotests after the QHash changes
Some test cases are sensitive to the exact ordering inside
QHash, and need adjustments when we change QHash or the
hashing functions.

Some rcc tests now also need 32bit specific data, as the hashing
functions for 32 and 64 bit are different now (as we use size_t).

Change-Id: Ieab01cd55b1288336493b13c41d27e42a008bdd9
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-04-09 20:04:15 +02:00
Simon Hausmann
5422fb7948 Allow declaring QProperty<> based Q_PROPERTYies with a notify signal
This requires mostly making moc a bit more permissive, which has the
advantage that it also simplifies the code a little bit.

The newly added test case demonstrates how to connect such a property
with a change signal.

One test case needed to be changed regarding the callback as the
publicProperty member now has a (permanent) observer and therefore
re-assigning the binding will re-evaluate it as the value might have
changed.

Change-Id: Ia7edcec432de830bdd4e07d943c5d4550c175ca4
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2020-04-08 11:26:39 +02:00
Lars Knoll
7f267360f2 Port test to QRegularExpression
Change-Id: I4026fa2fa5da34974cdc37353e7ea5a8e8806033
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2020-03-31 15:28:23 +02:00
Volker Hilsheimer
bcaff2b06f Remove QGuiAction again and split QAction implementation up instead
Duplicating the number of classes is a high price to pay to be able to
have some QAction functionality behave differently, or be only available
in widgets applications.

Instead, declare the entire API in QtGui in QAction* classes, and
delegate the implementation of QtWidgets specific functionality to
the private. The creation of the private is then delegated to the
Q(Gui)ApplicationPrivate instance through a virtual factory function.

Change some public APIs that are primarily useful for specialized tools
such as Designer to operate on QObject* rather than QWidget*. APIs that
depend on QtWidgets types have been turned into inline template
functions, so that they are instantiated only at the caller side, where
we can expect the respective types to be fully defined. This way, we
only need to forward declare a few classes in the header, and don't
need to generate any additional code for e.g. language bindings.

Change-Id: Id0b27f9187652ec531a2e8b1b9837e82dc81625c
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-29 11:18:57 +01:00
Lars Knoll
53f8f23369 Get rid of QRegExp usage in rcc
As a drive-by, enable testing of rcc in the cmake build.

Change-Id: I4150ff3ffe7404bab0cbc72f80b23b47a60cf33d
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
Reviewed-by: Samuel Gaist <samuel.gaist@idiap.ch>
2020-03-25 09:34:37 +01:00
Simon Hausmann
d4f0445331 Add support for exposing public QProperty members in the meta-object system
At the moment this makes the type as well as the setter/getter available
through the meta-call as well as the ability to register observers and
bindings. Only QProperty members that are annotated with
Q_PROPERTY(type name) are made public through the meta-object.

Change-Id: I16b98fd318122c722b85ce61e39975284e0c2404
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-03-18 15:42:58 +01:00
Qt Forward Merge Bot
63312fe2ec Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: If36d96c0fef3de5ab6503977501c55c62a2ecc97
2020-03-03 14:13:02 +01:00
Edward Welbourne
305ddbeb5b Use Qt::SplitBehavior in preference to QString::SplitBehavior
The Qt version was added in 5.14 "for use as eventual replacement for
QString::SplitBehavior." Move another step closer to that goal.

Change-Id: I399b5ea56e9255e775ca1746632f7421519a6616
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-02-28 15:37:11 +01:00
Edward Welbourne
26b1cf2bba QMake: Use Qt::SplitBehavior in preference to QString::SplitBehavior
The Qt version was added in 5.14 "for use as eventual replacement for
QString::SplitBehavior." Move another step closer to that goal.

Change-Id: I3f1b836cfb47bba0fdc27f2c3aa7b0576d123dca
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-02-28 15:37:11 +01:00
Qt Forward Merge Bot
75c0ffaf6d Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/network/bearermonitor/CMakeLists.txt
	examples/network/CMakeLists.txt
	src/corelib/tools/qlinkedlist.h
	src/sql/kernel/qsqldriver_p.h
	src/sql/kernel/qsqlresult_p.h
	src/widgets/kernel/qwidget.cpp
	src/widgets/kernel/qwidget_p.h
	tests/auto/network/socket/platformsocketengine/tst_platformsocketengine.cpp
	tests/auto/network/socket/qtcpsocket/tst_qtcpsocket.cpp
	tests/auto/tools/moc/allmocs_baseline_in.json

Change-Id: I21a3c34570ae79ea9d30107fae71759d7eac17d9
2020-02-26 18:39:21 +01:00
Olivier Goffart
46f407126e MetaObject: store the QMetaType of the properties
Change-Id: I563e7232b70e94de4184f2c23a581319313dcf5c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-02-25 15:43:15 +01:00
Olivier Goffart
4dbac23e53 Normalize types at compile time
This also fix the normalization algorithm:
 - Some 'const' after pointers were not removed as they should.
 - No need to keep the space in '> >' and '< :' in C++11 anymore
 - Fix normalization of 'long unsigned int' and similar

Change-Id: I2b72f0fede96c1063e7b155d9f25a85fccfc7bf9
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-20 16:11:02 +01:00
Liang Qi
6b2535ea15 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/widgets/graphicsview/boxes/scene.h
	src/corelib/Qt5CoreMacros.cmake
	src/corelib/Qt6CoreMacros.cmake
	src/network/ssl/qsslsocket.cpp
	src/network/ssl/qsslsocket.h
	src/platformsupport/fontdatabases/windows/qwindowsfontenginedirectwrite.cpp
	src/testlib/CMakeLists.txt
	src/testlib/.prev_CMakeLists.txt
	tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp

Disabled building manual tests with CMake for now, because qmake
doesn't do it, and it confuses people.

Done-With: Alexandru Croitor <alexandru.croitor@qt.io>
Done-With: Volker Hilsheimer <volker.hilsheimer@qt.io>
Change-Id: I865ae347bd01f4e59f16d007b66d175a52f1f152
2020-02-13 18:31:40 +01:00
Ulf Hermann
35f973d222 moc: Record whether a meta object is an object, gadget, or namespace
So far, objects had no identification, and both gadgets and namespaces
were called "gadget". qmltyperegistrar, however, is especially
interested in the distinction between namespaces and anything else.

Task-number: QTBUG-68796
Change-Id: Ic5739727bdef7766de6e535c6568920198fadb2b
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2020-02-13 11:40:05 +01:00
Qt Forward Merge Bot
9634055543 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I5d80d84d1fd9f52e7c8e4895cc34d4d29043f400
2020-02-08 01:00:08 +01:00
Ulf Hermann
f64694647a moc: Extend revision markers to allow for major and minor version
As we want Qt's own revisions to follow the Qt versioning scheme, we
need to allow for the minor version to reset to 0 now. In order to
facilitate this, we interpret the argument passed the current Q_REVISION
macro as major version and allow for an optional minor version. Both are
encoded it into the resulting revision number.

Change-Id: I3519fe20233d473f34a24ec9589d045cdd162a12
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@qt.io>
Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2020-02-07 21:23:55 +01:00
Friedemann Kleint
e9efd96e62 uic/Python: Add imports for Q(Date)Time, QKeySequence
Those types are used as properties of Q(Date)TimeEdit,
QKeySequenceEdit.

Fixes: PYSIDE-1215
Change-Id: I8b9ffebb8229fff447aa7dd6bee6e037d708333c
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-02-06 17:46:21 +01:00
Qt Forward Merge Bot
8ce0ad805d Merge remote-tracking branch 'origin/5.14' into 5.15
Conflicts:
	src/network/ssl/qsslsocket_openssl_symbols.cpp

Change-Id: I8c13b5c48a8ecce96540b39c6d5f8ca146eb2339
2020-02-06 11:10:34 +01:00
Friedemann Kleint
6baed76654 uic/Python: Set form object name correctly
Add missing "not" for the isEmpty() check.

Fixes: PYSIDE-1210
Change-Id: I3798d483df9d077300ff69dc5d3a8d08812f534e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-02-05 10:37:02 +01:00
Alexandru Croitor
a1dbdcbd6e Merge remote-tracking branch 'origin/dev' into wip/cmake
Conflicts:
        src/corelib/Qt5CoreConfigExtras.cmake.in
        src/corelib/Qt5CoreMacros.cmake
        src/dbus/Qt5DBusConfigExtras.cmake.in
        src/widgets/Qt5WidgetsConfigExtras.cmake.in

Change-Id: Ib782f3b177c38b2cce83beebe15be9c0baa578f7
2020-01-29 16:57:27 +01:00
Qt Forward Merge Bot
558fc903ac Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/io/qsettings.cpp
	src/corelib/kernel/qvariant.cpp
	src/corelib/serialization/qjsoncbor.cpp
	src/corelib/serialization/qjsonvalue.cpp
	src/corelib/tools/tools.pri
	src/gui/image/qimage.cpp
	src/gui/kernel/qguivariant.cpp
	src/widgets/kernel/qshortcut.cpp
	tests/auto/tools/moc/allmocs_baseline_in.json
	tests/auto/tools/moc/tst_moc.cpp
        src/opengl/qglframebufferobject.cpp

Done-With: Edward Welbourne <edward.welbourne@qt.io>
Done-With: Leander Beernaert <leander.beernaert@qt.io>
Change-Id: Ie7f5fa646c607fe70c314bf7195f7578ded1d271
2020-01-28 14:14:20 +00:00
Leander Beernaert
502d3d6744 Merge remote-tracking branch 'origin/dev' into merge-dev
Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
2020-01-24 13:17:33 +01:00
Fabian Kosmale
cb3152086c Introduce Q_PROPERTY attribute REQUIRED
This is meant to correspond to required properties in QML.

Change-Id: I2645981e13f7423bc86b48370c165b3cfe2aaa62
Task-number: QTBUG-81561
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2020-01-23 16:47:45 +01:00
Qt Forward Merge Bot
c70208c2d0 Merge "Merge remote-tracking branch 'origin/5.15' into dev" 2020-01-17 08:52:14 +01:00
Olivier Goffart
983432effd Introduce Q_MOC_INCLUDE
A new macro that can be added in the header file parsed by moc to tell moc
to include that file in the generated file

Change-Id: I03ad702c3fcd8380371015f226ee4b7456daf132
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-17 02:22:22 +01:00
Qt Forward Merge Bot
0a4e5bb265 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/widgets/kernel/qshortcut.cpp
	tests/auto/network/access/spdy/tst_spdy.cpp

Change-Id: If76c434beac2c0a393440aa365f89f77439774ce
2020-01-16 11:20:42 +01:00
Leander Beernaert
7c6f763d85 Regenerate Tests
Change-Id: I78f1efbec809610bcf6a8224392fa0dc8dbf3b3b
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-01-16 08:16:17 +00:00
Qt Forward Merge Bot
c3123c757a Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I8dbcf23835d52d3aa7d018ed250814d60c68aa83
2020-01-15 01:00:39 +01:00
Leander Beernaert
3854b5892b Add QT_TEST_RUNNING_IN_CTEST environment variable for test
When running tests with CMake's CTest, set the environment
QT_TEST_RUNNING_IN_CTEST to 1. This can be useful to deal with tests
that do not properly work when running from CTest.

For instance, the qmake test in this patch has one test that only works
when not run from CTest.

Change-Id: I01eea9131de69c18118a9ed9f96e9296d5ea20f1
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-01-14 13:24:55 +00:00
Friedemann Kleint
21a14767b3 uic/Python: Fix missing QCursor import
Fixes: PYSIDE-1182
Change-Id: I1ccc524a152ea75508166f3d2c0c60f8d829cd8f
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-01-14 14:17:52 +01:00
Cristián Maureira-Fredes
3f6275960c uic: add customwidget imports support for python
Fixes: QTBUG-81073
Change-Id: I29659481b14927ffcb8f2cb1829b577a67e4b937
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-01-14 08:11:53 +01:00
Qt Forward Merge Bot
0dc5562fa4 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I784e23d7913294225686879c9bd77dafe3580bac
2020-01-10 01:01:15 +01:00
Qt Forward Merge Bot
9bb9de461f Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I9b4816b4aa6f0c51a446742db58b9d0dcf69aa09
2020-01-09 01:00:08 +01:00
Friedemann Kleint
c72322804d uic: Extend the baseline test for Python
Previously, there was only a Python compile test which triggers
only when PySide2 is found. Rename it to pythonCompile().

Extend the TestEntry structure by adding the base line file
and flags, which represent all special cases found in the code.
Check for the presence of a Python base line file in addition
to the C++ one.

Prototypically add one form. Further forms can be added
on the go.

Task-number: PYSIDE-797
Change-Id: Ic2983fa3cab2399a6809e244f93c663e0212f675
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2020-01-07 13:33:14 +01:00
Liang Qi
a503bf5470 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/tools/qvector.h
		Make QVector(DataPointer dd) public to be able to properly merge
		5b4b437b30 from 5.15 into dev.
	src/widgets/kernel/qapplication.cpp
	tests/auto/tools/moc/allmocs_baseline_in.json

Done-With: Christian Ehrlicher <ch.ehrlicher@gmx.de>
Change-Id: I929ba7c036d570382d0454c2c75f6f0d96ddbc01
2020-01-04 15:32:34 +01:00
Milian Wolff
656d6f2a9b Support Q_GADGET QMetaObject super class hierarchies across templates
This patch fixes the QMetaObject::superClass hierarchy for Q_GADGETs
that inherit from a template which in turn inherits another Q_GADGET.
One common scenario where this is applied is for the CRTP. Without this
patch, moc would stop at the template and then sets the superClass
QMetaObject to a nullptr. For QObjects this works, since there moc knows
that every child must by definition inherit QObject. In order to support
this for Q_GADGETs too, we defer the judgment about the availability
of a staticMetaObject in the base class to compile time through the
existing QtPrivate::MetaObjectForType<Base>::value() helper.

[ChangeLog][QtCore][moc] Moc now correctly sets a non-null
QMetaObject::superClass for Q_GADGETs that inherit from a template which
inherits another Q_GADGET.

Change-Id: I103b5efd74ed24172dffce477ca2ed6d0f374d44
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-12-12 13:02:52 +01:00
Olivier Goffart
b0498b1864 Fix tst_moc for C++17
The throw() specification is no longer accepted in C++17 mode, so remove that.

Also pass the -std=c++1z to the compiler as Qt is going to require C++17 soon

Change-Id: I6d249e574d90cd1cf5c0ea595830d2db07681050
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-12-06 16:19:27 +01:00
Leander Beernaert
43f341a137 Moc Sort json file list in collectjson
This patch ensures that the list of input files are sorted before being
collected. This provides consistency when comparing results generated
from the CMake port which do not have the same order as qmake.

Change-Id: I46e3acf7c26dfd21fd0c1196bdeddf22acbf6ba5
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-11-27 10:59:58 +01:00
Leander Beernaert
26e8769124 Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: Ifecc2d9db396d783124df8567553ba5f846f30bb
2019-11-19 13:53:21 +01:00
Alexandru Croitor
f7d7021460 Regenerate tests/auto/tools
Change-Id: I25268499ff966ebf134150accbaec7634726fe40
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-11-12 17:25:41 +00:00
Lars Knoll
5357231c0a Make QList an alias to QVector
This is almost 100% source compatible with Qt 5. Exceptions are

* Stability of references for large or non movable types
* taking a PMF for types that are now overloaded with r-value references
  in QVector
* The missing prepend optimization in QVector (that is still planned
  to come for Qt 6)

Change-Id: I96d44553304dd623def9c70d6fea8fa2fb0373b0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-30 11:52:48 +01:00
Alexandru Croitor
440286655e Merge remote-tracking branch 'origin/dev' into wip/cmake
Change-Id: I4a78428a8ea273b6960792e3b8043f816fa37fcf
2019-10-14 17:46:34 +02:00
Alexandru Croitor
f4b4c4f79b Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I3a1d7673c3c20019ab12a2ea0a60f1619920a34c
2019-10-11 16:23:19 +02:00
Qt Forward Merge Bot
327b305e95 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I554a2762890391b3b6013c8b82211a8386a4ced8
2019-10-05 01:01:06 +02:00
Simon Hausmann
da284ef10e Add support for machine-readable JSON output to the MOC
The --output-json parameter will make moc produce a .json file next to
the regular output file. With --collect-json the .json files for a
module can be merged into a single one.

Task-number: QTBUG-68796
Change-Id: I0e8fb802d47bd22da219701a8df947973d4bd7b5
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2019-10-04 18:35:29 +02:00
Joerg Bornemann
5ab8efd66a Make conflicting targets check less strict
People tend to "turn off debug and release builds" by just not building
one of the variants. For example, Qt's own rcc is built in release only,
however it is configured for debug_and_release with the same TARGET for
both.

Let qmake complain about conflicting TARGETs only we're about to build
all of those conflicting targets, i.e. if build_all is set.

Change-Id: I0448bf5cb421e2d801d3cc30e0d80353fba0d999
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-10-03 20:28:03 +02:00
Mårten Nordheim
89e347ba42 Fix for getting windows running tests
By adding the path to the DLLs early on in the path. This fixes the
issue seen in CI (0xc0000135, DLL not found) and resolves local issues
where you might have forgotten to add this to path yourself potentially
grabbing libraries from elsewhere.

The ${path} seems to be a holdover that is no longer used, so it was
removed while the code was changed anyway.

Also disable WIN32_EXECUTABLE for all tests so that we can actually get
some output from them :)

Change-Id: Iec42c809c37be4f31c7f0a7af3a30c3528022dbe
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Qt CMake Build Bot
2019-09-17 17:11:59 +00:00
Ville Voutilainen
1b1248d7cd cmake: Enable building more of the tools tests
This is incomplete. moc has compilation problems, some
advanced parts of qmake tests are not supported by the converter.

Change-Id: Ic389ddfa10a7558f21cf7ba9ead8e58157c760da
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-09 10:45:21 +00:00
Liang Qi
6a36fe904c Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/corelib/codecs/qicucodec.cpp
	src/dbus/qdbusserver.cpp
	src/gui/painting/qbezier.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
	src/plugins/printsupport/cups/qppdprintdevice.cpp

Change-Id: I2703128bb64baf5580fbc2c2061b55b0f0611d2a
2019-09-04 07:03:54 +02:00
Paul Olav Tvete
2f52e1da0d Merge remote-tracking branch 'qt/5.12' into 5.13
Conflicts:
	src/gui/configure.json
	src/gui/util/qtexturefilereader.cpp
	src/gui/util/util.pri
	tests/auto/gui/util/qtexturefilereader/tst_qtexturefilereader.cpp

Change-Id: I2bc4f84705b66099e97330cda68e0b816aceb9cc
2019-08-20 10:41:56 +00:00
Qt Forward Merge Bot
56f46ba13d Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: Ia3645f92b9debf3e1fe2d972300c7d0dbd649268
2019-08-16 01:00:33 +02:00
Alexandru Croitor
c7ec7cd2a1 Merge branch 'wip/qt6' into wip/cmake
Change-Id: I50ac36b8803c296998149e98cc61e38687cdd14b
2019-08-15 16:53:19 +02:00
Joerg Bornemann
31e0d171d6 Fix qinstall on Windows for directories containing read-only files
Initial patch by: Vlad Lipskiy <eswcvlad@yahoo.com>

Fixes: QTBUG-77299
Change-Id: I803b809d1f23d844252b701cb070f6e4ba34eca1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-08-15 09:24:14 +02:00
Qt Forward Merge Bot
c5c9380555 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Id7954ada1f8658d3b1da5e8241a09f2d201a7c56
2019-08-15 01:00:30 +02:00
Joerg Bornemann
08192d6097 Add tst_qmake::qinstall
...with a failing test case for QTBUG-77299.

Task-number: QTBUG-77299
Change-Id: I42c4fc4bb96f8660f8ff9bea97e6096ca6cec972
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-08-14 16:36:48 +02:00
Joerg Bornemann
42d32e468a Determine dependencies of Windows resource files
Windows resource files support a subset of C preprocessor directives.
Among others they can have #include directives.

Use QMake's own scanner to retrieve the files that are included by a
Windows resource file and add them to its dependencies.

For the test case the TestCompiler class had to be extended:
runCommand is now public, and commandOutput is less peculiar.

Fixes: QTBUG-3859
Change-Id: I138703352c37c98297c0574a9a440510c1c494b8
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-08-13 09:38:46 +02:00
Joerg Bornemann
e75aed1a96 Warn about conflicting DESTDIR/TARGET combination in debug_and_release
If a project has DESTDIR and TARGET set to fixed values, then the
target paths conflict when doing debug_and_release builds.

With this change we're detecting this situation and yield a warning.

Fixes: QTBUG-2736
Change-Id: Ib163db3463322792ab9fa5b997285ac9fc9819ab
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2019-08-09 10:29:28 +02:00
Joerg Bornemann
38cfd3a8cb tst_qmake: Pass /nologo to jom like we do for nmake
Change-Id: Id9b2ac4dd7d591d471d3e21e8d78d4915620a2c1
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-08-09 10:29:03 +02:00
hjk
4fa0b41523 uic: Avoid use of Q_UNUSED in the generated code
Instead, use (void)x; directly.

The current use of Q_UNUSED(x); generates warnings for an
empty statement the expansion of Q_UNUSED contains a semicolon
already.

Emitting Q_UNUSED(x) without the extra semicolon would be
an option, too, but as the future of Q_UNUSED's embedded
semicolon seems unclear right now, avoid its use altogether.

The change affects only generated code that's barely ever
read by a human, so the overall utility of "improved readability"
of Q_UNUSED in that place is questionable anyway.

Change-Id: I332527ed7c202f779bd82290517837e3ecf09a08
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2019-07-30 09:34:36 +02:00
Thiago Macieira
9b8493314d Qt6: Fix uninitialized meta objects on Windows
Windows has a problem relating to cross-DLL variable relocations: they
are not supported. Since QMetaObject's link to the parent class is done
via a pointer, every QMetaObject in a DLL or in the EXE that derives
from a class from another DLL (such as QObject) will be dynamically
initialized.

This commit changes the meta object pointers in QMetaObject::d from raw
pointers to a wrapper class SuperData, which is almost entirely source-
compatible with the pointer itself. On all systems except for Windows
with Qt 6, it's binary compatible with the current implementation.

But for Windows with Qt 6, this commit will store both the raw pointer
and a pointer to a function that returns the QMetaObject, with one of
them non-null only. For all meta objects constructed by moc, we store
the function pointer, which allows the staticMetaObject to be statically
intialized. For dynamic meta objects (QMetaObjectBuilder, QtDBus, QtQml,
ActiveQt), we'll store the actual raw pointer.

[ChangeLog][QtCore][QMetaObject] Some internal members of the
QMetaObject class have changed types. Those members are not public API
and thus should not cause source incompatibilities.

The macro QT_NO_DATA_RELOCATION existed in Qt 4 but was called
Q_NO_DATA_RELOCATION and only applied to Symbian. It was removed in
commit 24a72c4efa ("qglobal: Remove
symbian specific features").

Task-number: QTBUG-38876
Fixes: QTBUG-69963
Change-Id: Id92f4a61915b49ddaee6fffd14ae1cf615525e92
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-07-16 18:34:41 -07:00
Alexandru Croitor
4dac45c9ee Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
Change-Id: I715b1d743d5f11560e7b3fbeb8fd64a5e5ddb277
2019-07-11 17:17:51 +02:00
Sona Kurazyan
9b3e8b32f2 Remove usages of deprecated APIs of corelib
- Replaced the usages of deprecated APIs of corelib by corresponding
  alternatives in the library code and documentation.

- Modified the tests to make them build when deprecated APIs disabled:
    * Made the the parts of the tests testing the deprecated APIs to
      be compiled conditionally, only when the corresponding methods are
      enabled.
    * If the test-case tests only the deprecated API, but not the
      corresponding replacement, added tests for the replacement.

Task-number: QTBUG-76491
Task-number: QTBUG-76539
Task-number: QTBUG-76541
Change-Id: I62ed4a5b530a965ec3f6502c6480808f938921aa
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-07-05 11:25:46 +02:00
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
Alexandru Croitor
e4079eca49 Merge remote-tracking branch 'origin/dev' into wip/cmake
Take 5.

Change-Id: Ifb2d20e95ba824e45e667fba6c2ba45389991cc3
2019-06-03 15:14:42 +02:00
Tobias Hunger
bbb75d9614 Merge remote-tracking branch 'gerrit/dev' into wip/cmake
Change-Id: I2e1812e4f40131ff74919aa3b558db5c261fe412
2019-04-16 16:50:27 +02:00
Tobias Hunger
6630937e63 Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
2019-04-16 16:32:08 +02:00
Friedemann Kleint
7a84a0a6d1 uic test: Test Python
Add a test that checks for the Presence of Qt for Python
and runs Python compile tests on the baseline files.

Task-number: PYSIDE-797
Change-Id: I7e15c3c75261a7d94fc6654a95d49ba323cbe7d6
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-04-16 07:40:45 +00:00
Friedemann Kleint
7fe52779f4 uic test: Pre-populate the test data array
Task-number: PYSIDE-797
Change-Id: I2beed73f20bbfc8b5b4f2352cc53d80a64b95d8e
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-04-16 07:40:41 +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
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
Allan Sandfeld Jensen
5c90a96998 Remove handling of missing Q_COMPILER_CLASS_ENUM
Change-Id: I1fd6d601e49e803b4c3308fb0ca41136c628afbc
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-06 16:19:14 +00:00
Allan Sandfeld Jensen
4628e5cded Remove handling of missing very old compiler feature check
Removes handling of missing Q_COMPILER_NULLPTR, Q_COMPILER_AUTODECL,
Q_COMPILER_LAMBDA, Q_COMPILER_VARIADIC_MACROS and
Q_COMPILER_AUTO_FUNCTION.

We haven't supported any compilers without these for a long time.

Change-Id: I3df88206516a25763e2c28b083733780f35a8764
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-06 13:27:15 +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
Qt Forward Merge Bot
ffe9c395dc Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ia5d893e57deb78bc32e2053a5a79543ff847fe32
2019-04-02 01:00:26 +02:00
Joerg Bornemann
9e97d64ccd Fix installation of .pdb files for applications that have VERSION set
For applications that set VERSION the installation targets of pdb
files were wrong in qmake's nmake Makefile generator.

Replace code that tries to reconstruct that target's versioned
extension with TARGET_EXT which already contains the fully resolved
target extension.

Fixes: QTBUG-74265
Change-Id: I9553a5f70170e077a59c866079ae51647ae80bef
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-03-31 12:45:24 +00:00
Liang Qi
29f01b32f5 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/corelib/configure.json

Change-Id: I93ac67f3bf4844bc7c691183e94bceb922b7b919
2019-03-31 12:39:42 +02:00
Qt Forward Merge Bot
b176a6a159 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ia3591d7288bac3bf441f27e486d35e2c5c481993
2019-03-27 10:28:55 +01:00
Friedemann Kleint
7f635d9777 Merge remote-tracking branch 'origin/5.13' into dev
Change-Id: I38389a69411f4549fed432f1181dbe23398b34a2
2019-03-26 08:24:59 +01:00
Joerg Bornemann
63156e2062 tst_qmake: Add XFAILing test
Task-number: QTBUG-74265
Change-Id: I916eaf7b64a8777bf2523ddf9da65226d7d06417
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-03-26 06:28:18 +00:00
Qt Forward Merge Bot
19510477b4 Merge remote-tracking branch 'origin/5.12' into 5.13
Change-Id: Ie7f68dcd5650e0037b6c3313cc9ffdcd7c494fbe
2019-03-21 01:00:07 +01:00
Joerg Bornemann
2abd969ef6 tst_qmake: Keep the source dir clean
Copy the test data into a temporary directory and do all the work there
without tainting the source directory. More importantly, do not pull in
any settings from the Qt build to test what actual users will encounter.

Change-Id: I793b86bfadb7597efb47c8f2d3fc863384c78a79
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-03-20 08:39:55 +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
Friedemann Kleint
ba3480ebc6 rcc test: Streamline test
- Add the path to expand the timestamp files as a parameter to doCompare()
  and check that the file is found. It is then no longer necessary to change
  the working directory in rcc().
- Fix the line number output in doCompare()
- Move helper readLinesFromFile() up and make the split mode a parameter so
  that it can be used for reading files without stripping empty lines
- Remove the helper findExpectedFile() which apparently was meant to
  introduce some version scheme in Qt 4.5 but was never continued.

Task-number: PYSIDE-855
Change-Id: I3d8cf957995fec8e34cddb4992fc8854148c7bdc
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-03-06 20:59:59 +00:00
Friedemann Kleint
6bb22c12a6 rcc test: Properly check QProcess errors
Separate waitForStarted() and waitForFinished() to properly
catch startup errors and kill hanging processes. Also check
exit status and code.

Task-number: PYSIDE-855
Change-Id: Ic8e623f4a8c716a2892767a8dbc06ba4ffb90b5a
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
2019-03-05 18:28:15 +00:00
Friedemann Kleint
d41a46bc39 rcc test: Avoid repetitive invocation of QFINDTESTDATA()
Store the test data path in a member variable.

Task-number: PYSIDE-855
Change-Id: Ibb81e4024c870e67e209c79ec95264e747632bc6
Reviewed-by: Cristian Maureira-Fredes <cristian.maureira-fredes@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2019-03-05 09:50:23 +00:00
Liang Qi
c0359bd3c3 Merge remote-tracking branch 'origin/5.13' into dev
Conflicts:
	src/corelib/global/qfloat16.cpp
	src/corelib/global/qfloat16.h
	src/plugins/platforms/windows/qwindowswindow.cpp

Change-Id: I0938aaa6a9771f55e48c95ed29f6f5291431b947
2019-05-15 07:11:41 +02:00
Joerg Bornemann
ce1830fd21 Migrate Windows system libs to external dependencies
Started-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I211ce3252b836894aeeac1c85eb316d9596bca57
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
2019-05-08 08:30:02 +00:00
Lars Knoll
08101b2b27 Fix qplugin.h for Qt 6
Change-Id: I3ae6594a2982f990a5b3851a063b0b2f02d16bd9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-05 17:34:57 +00: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
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
Qt Forward Merge Bot
c497f79ad4 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: Ieb57137ee2b7d0c505e3531d5aa1bcb66978847e
2019-01-07 01:00:08 +01:00
Oswald Buddenhagen
f89ac0101a qmake: add $$read_registry() function
Change-Id: I7f9f17e0f44c273e4754d1decc92a8594cad8658
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-01-05 20:33:07 +00: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
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
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
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
d1e3a21631 tst_uic: Brush up the uic autotest
- Fix some clang nags (QFileInfo::exists(), raw string literals).
- Update the version numbers in the baseline to be 5.12 consistently
  to make future modifications easier.
- Introduce another environment variable to redirect the diff
  output to stderr. This can be used to generate a diff for applying
  when making larger changes to uic.

Task-number: PYSIDE-797
Change-Id: I3f6716f0fe8e5939f6bef3965d90b2bb2c37f4c4
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2018-11-13 18:55:30 +00: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
Simon Hausmann
e9c45bbddd Begin port of qtbase to CMake
Done-by: Alexandru Croitor <alexandru.croitor@qt.io>
Done-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
Done-by: Kevin Funk <kevin.funk@kdab.com>
Done-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
Done-by: Simon Hausmann <simon.hausmann@qt.io>
Done-by: Tobias Hunger <tobias.hunger@qt.io>
Done-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
Done-by: Volker Krause <volker.krause@kdab.com>
Change-Id: Ida4f8bd190f9a4849a1af7b5b7981337a5df5310
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Mikhail Svetkin <mikhail.svetkin@qt.io>
2018-11-01 11:48:46 +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
Qt Forward Merge Bot
f21330b749 Merge remote-tracking branch 'origin/5.12' into dev
Change-Id: I799e2ca2fefa140c8b73b73aa959c6ed8da6eae6
2018-09-07 01:00:48 +02: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
hjk
d9e2bd5388 rcc: Add some tests
- three more tests cases on expected .qrc generation
- a new test comparing data read via resource with
  the same data directly read from the original file

Change-Id: Ic34e68c9fc3fa110110161b57d4129ae44419020
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2018-08-24 08:25:42 +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
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
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
Oswald Buddenhagen
811d8b82b5 qmake: make argument validation of built-ins data driven
at the time this patch was conceived, it was meant as an exercise in
getting rid of usages of ProString::toQString(m_tmp). however, this was
meanwhile superseded by use of toQStringView().
but the change itself should have been done a long time ago already, and
there is no harm in going through with it.

on the way, this also unifies and fixes some of the error messages.

Change-Id: I337aff994c508df783df4794c3fa0762d83a691b
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-06-27 17:23:57 +00:00
Oswald Buddenhagen
e5d909d6d6 qmake: make VFS aware of exact vs. cumulative evaluation
sync-up with qt-creator; no effect on qmake.

comment on cherry-pick: this is actually a lot more than a cherry-pick,
because the dual VFS needs to deal with the file ids which were
concurrently introduced on the qmake side.

Change-Id: I2c1eb16c97526fa275a1c6a2eae9266d385859ac
(cherry picked from qtcreator/424639ecac9d2e404d2bfaff7f46b45ed98664b8)
(cherry picked from qtcreator/a8010b0fff47d903d4a1f80e3adb1a2ef41beb33)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-03-29 18:15:10 +00:00
Oswald Buddenhagen
e2de837198 qmake: let QMakeVfs::readFile() report ENOFILE explicitly
when the QFile object is already constructed, querying whether the file
exists is actually cheap, so do it right away instead of later on
demand. that makes the calling code a bit cleaner.

fwiw, that we need to explicitly query the file's existence at all is a
result of QFile's completely useless error "codes" (which merely say
which function failed, as if the caller would not know).

Change-Id: Ifec39d05b1713d8128046f679287e510f10e45dc
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
(cherry picked from qtcreator/5ba32e3484ead2e35cc7732dcd59a97e7459dbfd)
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2018-03-29 18:14:58 +00:00
Edward Welbourne
58b373c9e3 Make sure $$relative_path() uses an absolute path as its first arg
Thanks to QTBUG-61373, this qmake function was called with
/usr/local/5.10.1 as baseDir, which isn't absolute, leading to an
assertion failure.  We could raise the error within qmake but it
proved easier to simply resolve any non-absolute baseDir using PWD,
before trying to use it as an absolute path.

Did the same for $$absolute_path().  Documented both.  Adjusted the
assert that caught this to report any non-absolute path that upsets
it.  Added simple tests, fixed an existing test.

Task-number: QTBUG-66156
Change-Id: Icfef2e2f5b236e071177c9beffa38d71bf404292
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-22 08:40:45 +00:00
Ulf Hermann
90ec3aba06 Clean up the moc "no-keywords" test
We can use the QT_LIB_FOO #defines instead of our own WITH_FOO ones to
determine if a library is available. Also, it doesn't currently make
sense to refer to libraries which are not part of qtbase here. We might
add that in the future, but QtScript (being deprecated) is probably not
the first one we should add.

Change-Id: I7f2397ca5499ba6003088478161182e960e815fb
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-03-21 10:31:20 +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
Liang Qi
305dd1b61f Merge remote-tracking branch 'origin/5.9' into 5.11
Conflicts:
	.qmake.conf
	src/corelib/animation/qvariantanimation.cpp
	src/corelib/global/qglobal.cpp
	src/corelib/global/qlogging.cpp
	src/corelib/io/qprocess_win.cpp
	src/corelib/json/qjsonarray.cpp
	src/corelib/tools/qsimd_p.h
	src/corelib/tools/qtimezoneprivate_p.h
	src/corelib/xml/qxmlstream_p.h
	src/gui/kernel/qsimpledrag.cpp
	src/gui/kernel/qsimpledrag_p.h
	src/plugins/generic/generic.pro
	src/plugins/platforms/cocoa/qcocoamenu.mm
	src/widgets/styles/qmacstyle_mac.mm
	tests/auto/concurrent/qtconcurrentmap/BLACKLIST
	tests/auto/corelib/io/qfileinfo/tst_qfileinfo.cpp
	tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
	tests/auto/gui/kernel/qwindow/BLACKLIST
	tests/auto/widgets/dialogs/qmessagebox/BLACKLIST

Change-Id: I508d686cf20f7f8cc6a7119b9bc7c3bbb505c58e
2018-02-14 12:51:24 +01:00
Edward Welbourne
e86f3c0188 qmake: require a drive in a DOS path for it to be absolute
For Q_OS_WIN, a path is only truly absolute if it includes a drive
letter; merely starting with a slash is not enough.  (We can't support
UNC paths, so don't even try: qmake runs various commands in the
source directory using CMD.exe, which doesn't support UNC as PWD.)
This requires, when resolving a path relative to a root, transcribing
the root's drive to such not-quite-absolute paths.

Changed QMakeGlobals, $$absolute_path() and $$relative_path() to now
use IoUtils::resolvePath() rather than delegating to QDir's absolute
path method, since that doesn't correctly recognize the need for a
drive letter (and qmake did run into problems with some paths, from
splitPathList and a failing test, as a result).

Moved existing ioUtils tests for handling of relative / absolute paths
out into separate functions and expanded significantly.  Fixed some
existing tests to use an absolute path where one is needed; added two
tests involving driveless (but rooted) paths; and fixed the test init
to set a value for QT_HOST_DATA/src property (the lack of which lead
to an assertion failure with this fix).

Task-number: QTBUG-50839
Change-Id: I2bfc13c1bfbe1ae09997274622ea55cb3de31b43
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2018-01-18 13:46:54 +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
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
Liang Qi
9bee6712fc Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I840849c072075a69819eb185b20bc42c3de0f825
2018-01-09 21:27:30 +01:00
Jani Heikkinen
907a99f65b Fix license headers
Old header.LGPL21 header was used at some files. Replase those with
new header.LGPL one

Remove old header.LGPL21

Task-number: QTBUG-57147
Change-Id: I650e39024ed4876bba27e954c7d61fdb025b46ef
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2018-01-09 07:47:20 +00:00
Jake Petroules
cd542a82b0 Remove references to obsolete platforms
ultrix and reliant have not seen a release since 1995. dgux not since
2001. bsdi not since 2003. irix not since 2006. osf not since 2010.
dynix... unclear, but no later than 2002. symbian needs no mention.
All considered obsolete, all gone.

sco and unixware are effectively obsolete. Remove them until someone
expresses a real need.

Change-Id: Ia3d9d370016adce9213ae5ad0ef965ef8de2a3ff
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-05 06:33:53 +00:00
Kevin Funk
58c14c4a7e Replace Q_NULLPTR with nullptr where possible
Remaining uses of Q_NULLPTR are in:
src/corelib/global/qcompilerdetection.h
  (definition and documentation of Q_NULLPTR)
tests/manual/qcursor/qcursorhighdpi/main.cpp
  (a test executable compilable both under Qt4 and Qt5)

Change-Id: If6b074d91486e9b784138f4514f5c6d072acda9a
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-09-19 11:53:55 +00:00
Kevin Funk
47c92fbb0b Replace Q_DECL_OVERRIDE with override where possible
Remaining uses of Q_DECL_OVERRIDE are in:

src/corelib/global/qcompilerdetection.h
src/corelib/global/qglobal.cpp
doc/global/qt-cpp-defines.qdocconf
  (definition and documentation of Q_DECL_OVERRIDE)
tests/manual/qcursor/qcursorhighdpi/main.cpp
  (a test executable compilable both under Qt4 and Qt5)

Change-Id: Ib9b05d829add69e98a86238274b6a1fcb19b49ba
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-09-19 11:53:42 +00:00
Liang Qi
112a4af107 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	examples/examples.pro
	qmake/library/qmakebuiltins.cpp
	src/corelib/global/qglobal.cpp
		Re-apply b525ec2 to qrandom.cpp(code movement in 030782e)
	src/corelib/global/qnamespace.qdoc
	src/corelib/global/qrandom.cpp
	src/gui/kernel/qwindow.cpp
		Re-apply a3d59c7 to QWindowPrivate::setVisible() (code movement in d7a9e08)
	src/network/ssl/qsslkey_openssl.cpp
	src/plugins/platforms/android/androidjniinput.cpp
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/widgets/widgets/qmenu.cpp
	tests/auto/widgets/kernel/qwidget_window/tst_qwidget_window.cpp

Change-Id: If7ab427804408877a93cbe02079fca58e568bfd3
2017-08-31 14:31:31 +02:00
Alexander Volkov
d61e61fa1a uic: Use nullptr instead of Q_NULLPTR in generated code
nullptr can be used directly in the Qt code since Qt 5.7.
Use it in generated code for consistency.

Change-Id: I249aeaf0a39b46ce1106b29d3ea4569a399908b7
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2017-08-28 15:25:07 +00:00
Edward Welbourne
515b905150 Adapt qmake's raw-string parser to avoid confusion by macros
A macro name ending in R might expand to a string; if this precedes a
string constant, we're juxtaposing the strings.  My first parser for
raw strings would mistake it for a raw string instead, ignoring the
part of the identifier before R.  Re-worked the exploration of what
came before the string to catch these cases, too.

The backwards parsing would also allow any messy jumble of [RLUu8]* as
prefix for the string; but in fact R must (if present) be last in the
prefix and *it* can have at most one prefix, [LUu] or u8.  Anything
else is an identifier that happens to precede the string.  Reworked
the parsing to allow only one prefix and not treat R specially unless
it's immediately (modulo BSNL) before the string's open-quotes.

Add link to the cppreference page about string literals, on which the
grammar now parsed is based.

Added a test for the issue this addresses.
Verified that this fails on 5.6, dev and 5.9 without the fix.
Expanded the existing test to cover R-with-prefix cases.

Task-number: QTBUG-55633
Change-Id: I541486c2ec909cfb42050907c84bee83ead4a2f4
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-08-24 14:27:50 +00:00
Simon Hausmann
407302fb1b Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/io/qwindowspipewriter.cpp
	src/widgets/styles/qcommonstyle.cpp

Change-Id: I0d33efdc4dc256e234abc490a18ccda72cd1d9e6
2017-07-19 09:47:29 +02:00
Thiago Macieira
f3205a4949 Merge qt_error_string and QSystemError
This removes a lot of duplicated code that existed in both qglobal.cpp
and qsystemerror.cpp, including the hack to get the correct strerror_r
signature.

This removes the incorrect use of EACCES, EMFILE, ENOENT, and ENOSPC
from qt_error_string on Windows. qt_error_string is supposed to be used
only with Win32 error codes from GetLastError(), despite there being a
lot of uses in cross-platform and even Windows-specific code that pass
errno constants.

It may or may not work: that depends on whether the constants happen to
match. ENOENT matches ERROR_FILE_NOT_FOUND and one could argue that
ENOSPC matching ERROR_OUT_OF_PAPER is acceptable, but EMFILE isn't the
same as ERROR_BAD_LENGTH nor is EACCES, ERROR_INVALID_DATA.

Change-Id: I1eba2b016de74620bfc8fffd14cccb7f77f4b510
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-18 15:51:22 +00:00
Jarek Kobus
8e40050efe uic: Don't clear and readd combobox items in retranslateUi
Task-number: QTBUG-61778
Change-Id: If7a15ef69fcfe459f177ff8b671f53a6022ab335
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2017-07-05 12:20:09 +00:00
Liang Qi
c2b224a758 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/io/qprocess_unix.cpp
	src/plugins/platforms/xcb/qxcbconnection.cpp
	src/plugins/platforms/xcb/qxcbwindow.cpp
	src/widgets/util/util.pri
	tests/auto/corelib/thread/qthread/qthread.pro
	tests/auto/corelib/thread/qthread/tst_qthread.cpp

Change-Id: I5c45ab54d46d3c75a5c6c116777ebf5bc47a871b
2017-07-04 16:05:53 +02:00
Liang Qi
ce09ef4313 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/corelib/io/qprocess_unix.cpp
	src/corelib/io/qprocess_win.cpp
	src/plugins/platforms/android/qandroidplatformintegration.h
	src/plugins/platforms/windows/qwindowscontext.cpp
	src/plugins/platforms/windows/windows.pri
	src/tools/uic/cpp/cppwriteinitialization.cpp
	src/widgets/doc/src/widgets-and-layouts/gallery.qdoc

Change-Id: I8d0834c77f350ea7540140c2c7f372814afc2d0f
2017-06-19 16:12:34 +02:00
Olivier Goffart
a232251992 Moc: Don't error out when parsing namespace __identifier(...)
Present for example in the Windows's Atlbase.h header.
We should not abort the compilation, just ignore that construct

Task-number: QTBUG-56634
Change-Id: Id6e4c9f03cb1cef46e330f4fbcae80ce4f3730c6
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-06-19 07:32:18 +00:00
Jarek Kobus
73f8b605e3 uic: Fix possible crash when reading the size hint property
It may crash on (probably a bit broken)
qtbase/src/printsupport/dialogs/qpagesetupwidget.ui

Change-Id: Ibca95a3d8aa4899adbc952aee7b46621ac888c6a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-06-13 06:56:10 +00:00
Olivier Goffart
94a2aec05b moc: Don't error out when defining a keyword
Normaly, in C++ It's not valid to define a keyword, but it turns out that some
system header do, so we just silently accept it.

[ChangeLog][moc] moc no longer errors out if a C++ keyword is #define'ed

Task-number: QTBUG-61204
Change-Id: Ia4d3ff9c77b6ff261b6140c220cfb81bd13f1d6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2017-06-06 22:53:07 +00:00
Albert Astals Cid
2ca187caa3 moc: Allow NOTIFY signals defined in parent classes
Limitation is that the signal needs to be parameter-less

[ChangeLog][moc] moc now supports NOTIFY signals of parent classes in Q_PROPERTY

Change-Id: Iad64c96c3ec65d4be8ad9ff1a9f889938ab9bf45
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Brett Stottlemyer <bstottle@ford.com>
2017-05-23 11:11:52 +00:00