Commit Graph

823 Commits

Author SHA1 Message Date
Lars Knoll
ed8acbeb7c Automatically register data/debug stream operations in QMetaType
And remove the old manual registration code for those operators.

Add some special handling for long/ulong, as these types could be
streamed as a QVariant so far, but are not directly streamable
through QDataStream.

[ChangeLog][QtCore][QMetaType] The QMetaType::registerStreamOperators()
and QMetaType::registerDebugStreamOperator() methods have been
removed. The streaming operators for a type are now automatically
registered together with the type registration.  This implies that the
operators should be visible wherever the type is visible and being used.

[ChangeLog][Behavior Incompatible Changes] Because the QDataStream and
QDebug serialization operators are automatically registered with
QMetaType, the declarations of those functions must be present at any
point where the type is used with QMetaType and QVariant.

Change-Id: I4a0732651b20319af4a8397ff90b848ca4580d99
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2020-08-24 00:17:03 +02:00
Alexandru Croitor
5138a970f3 CMake: Workaround building DBus 'car' example with qmake
While trying to implement instructions for building examples with
qmake in the CI, an issue has surfaced.

When building examples with CMake with -DBUILD_EXAMPLES=ON in the CI,
the examples are built in-source, aka source dir == build dir.
This means that the header files generated by qdbusxml2cpp will be
placed in the qtbase source dir.

The instructions that try to build examples with qmake build the
examples in a separate build dir after building the examples with CMake.

Unfortunately the qtbase/examples/dbus/remotecontrolledcar/car example
includes the generated DBus adaptor header via a statement like
  #include "car_adaptor.h"
and the compiler prefers to pick up the header file from the example
source dir (the one generated by CMake), rather than the one generated
by qmake in the example build dir.

Because CMake's DBus integration uses different flags than qmake's
DBus integration, the generated header file code is not compatible
with the qmake generated cpp file, and the example fails to link when
building with qmake, because it can't find an appropriate constructor
symbol.

In an ideal world, we wouldn't do in-source builds with the CMake
build, but that leads to other issues which I currently don't recall.

To circumvent the issue, adapt the CMake DBus qt6_add_dbus_adaptor
function to allow not passing the problematic '-l' flag by making it
optional. This shouldn't break existing code, but allows us to
generate a compatible header that will be used by qmake and succeed in
linking the example.

Task-number: QTBUG-85986
Change-Id: I06759f79aeb66bb32da7f158f55dd4734c4a9887
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-08-23 11:04:04 +02:00
Lars Knoll
8929c0a355 Remove QVariant(int type, void *data, ...) constructor
It was marked internal anyway. Use the constructor taking a
QMetaType instead.

Change-Id: I15b9cd0911aac063a0f0fe0352fa2c84b7f7c691
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-08-15 10:56:29 +02:00
Allan Sandfeld Jensen
5747f31392 Another round of 0->nullptr cleanup
Change-Id: Ic8db7dc252f8fea46eb5a4f334726d6c7f4645a6
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2020-07-31 12:56:50 +02:00
Steffen Kieß
6d880185b1 Fix passing QDBusUnixFileDescriptors over peer-to-peer connections
Passing QDBusUnixFileDescriptors over peer-to-peer connections currently
does not work, because QDBusConnectionPrivate::setPeer() does not set
this->capabilities (unlike QDBusConnectionPrivate::setConnection()
which is executed for bus connections).

Keep track of whether the connection already has been authenticated, and
once the connection does get authenticated, update this->capabilities.

Note that sending a message directly after connecting (before any
message has been received from the peer) might still fail if the message
contains a QDBusUnixFileDescriptor.

Pick-to: 5.15
Fixes: QTBUG-85396
Change-Id: Ib83213ebcd3255fb091c6faefb3618745b8d736c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-13 20:45:20 +02:00
Jarek Kobus
89ecbf0978 Use QList instead of QVector
Task-number: QTBUG-84469
Change-Id: Ia365c958e3b2d0c8210f5d693d907bb2012887c2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-07-09 16:10:11 +02:00
Fabian Kosmale
986d89c2ee Automatically register comparison operators in QMetaType
This removes the fully manual registration of comparison operators in
QMetaType and replaces it with an automatic registration through
Q_DECLARE_METATYPE().

[ChangeLog][QMetaType] The QMetaType::registerComparator() and
QMetaType::registerEqualsComparator() have been removed.
Q_DECLARE_METATYPE() now automatically registers any
operator==() and/or operator<() for a type visible where
it is used on that type, as part of declaring its meta-type.

Change-Id: I3df451b652b735c093533838bf32f3cc785439f8
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-07-08 14:13:59 +02:00
Lars Schmertmann
6ce2f3f26b Add ; to Q_UNUSED
This is required to remove the ; from the macro with Qt 6.

Task-number: QTBUG-82978
Change-Id: I3f0b6717956ca8fa486bed9817b89dfa19f5e0e1
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2020-07-07 11:51:48 +02:00
Lars Schmertmann
fdc5e91dcf Only use one macro per line
Also add a ; where it is missing.

Task-number: QTBUG-82978
Change-Id: Ic5d2a07363c25ab641d234baca89bc62238458cb
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-07-03 11:14:11 +02:00
Friedemann Kleint
2eea8e0754 QDBusReply<void>: Fix warning about implicit copy constructor
Provide a copy constructor, fixing:

src/corelib/kernel/qmetatype.h:2702:11: warning: implicitly-declared QDBusReply<void>::QDBusReply(const QDBusReply<void>&) is deprecated [-Wdeprecated-copy]

Pick-to: 5.15
Change-Id: I725be78ace9d1b31fa2de9a23a82f92d5969dc27
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-07-03 05:39:35 +00:00
Nico Vertriest
05b60631a2 Doc: Make dbus snippets compilable
Task-number: QTBUG-84470
Change-Id: Idfe86ae0f38e43678cc5e746e30e5eeaf8eb72dc
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
2020-07-02 05:49:32 +02:00
Nico Vertriest
d0ccacaf28 Doc: Update docs with cmake package information
Task-number: QTBUG-85179
Change-Id: I70dda9b906ecd0b8d8f4d88b0562af8e6c428143
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-06-30 10:11:23 +02:00
Jarek Kobus
48c8322a61 Use QList instead of QVector in dbus
Omitted type replacement in qDBusParametersForMethod() for now.

Task-number: QTBUG-84469
Change-Id: Ieb9fbb30b431c5e4183ad57acd35640e9556bf6c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-25 22:31:13 +02:00
Giuseppe D'Angelo
3e1d03b1ea Port Q_STATIC_ASSERT(_X) to static_assert
There is no reason for keep using our macro now that we have C++17.
The macro itself is left in for the moment being, as well as its
detection logic, because it's needed for C code (not everything
supports C11 yet).  A few more cleanups will arrive in the next few
patches.

Note that this is a mere search/replace; some places were using
double braces to work around the presence of commas in a macro, no
attempt has been done to fix those.

tst_qglobal had just some minor changes to keep testing the macro.

Change-Id: I1c1c397d9f3e63db3338842bf350c9069ea57639
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-19 19:38:23 +02:00
Lars Knoll
6bbfae9457 Port dbus from QStringRef to QStringView
Task-number: QTBUG-84319
Change-Id: Ifdfad6b7ac8b61ead71382e5ae3cb22b50b2504c
Reviewed-by: Karsten Heimrich <karsten.heimrich@qt.io>
2020-06-15 10:44:10 +02:00
Fabian Kosmale
630c7b4811 Cleanups in QMetaProperty
This changes the layout of the meta object data, so
also bump the meta object revision.

Original-patch-by: Lars Knoll <lars.knoll@qt.io>
Change-Id: I176fb16c207e8ebe59e358e69554be813406232f
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-06-11 19:39:54 +02:00
Fabian Kosmale
fa987d4441 MetaObject: Store the QMetaType of the methods
This does the analog of 46f407126e for the
methods we care about (signals, slots, Q_INVOKABLEs). In addition to the
actual QMetaType, we store an array with offsets so that we later can do
a mapping from methodIndex to metatype.

The newly added QMetaMethod::{return,parameter}MetaType methods can then
be used to retrieve the metatypes.

This does however require that all involved types are complete. This is
unfortunately not a feasible requirement. Thus, we only populate the
metatype array on a best effort basis. For any incomplete type, we store
QMetaType::Unknown. Then, when accessing the metatype, we fall back to
the old string based code base if it's Unknown.

Squashes "moc: support incomplete types" and  "Fix compile failures
after QMetaMethod change"


Fixes: QTBUG-82932
Change-Id: I6b7a587cc364b7cad0c158d6de54e8a204289ad4
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-06-02 22:42:15 +02:00
Kai Koehne
1c0ca1f3d8 Document how to use CMake for Qt DBus
Task-number: QTBUG-73058
Change-Id: Ibe0779d109682cc41e21783a3ba5fa5130d5ff7f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-05-26 15:11:40 +02:00
Kai Koehne
948134371e Licenses: Remove reference to change in Qt 5.4
Qt 5.4 is not documented anymore since quite some time.

Change-Id: I6811ead502178f7acbed8cf450e42d7fd33ae29b
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-05-22 15:38:28 +02:00
Marc Mutz
7c070ac959 Sweep Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6 -> Q_DECLARE_SHARED
This is Qt 6, so Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT6 is the same as
Q_DECLARE_SHARED.

Let's hope we'll collectively get better at detecting missing
Q_DECLARE_SHARED so we won't need a
Q_DECLARE_SHARED_NOT_MOVABLE_UNTIL_QT7 in the future.

Change-Id: I3da9faff4c66b64a3b257309012a2a10a6c6d027
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-05-19 23:45:54 +02:00
Qt Forward Merge Bot
efd7757154 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/widgets/widgets/qabstractbutton.cpp
	src/widgets/widgets/qbuttongroup.cpp
	src/widgets/widgets/qbuttongroup.h
	src/widgets/widgets/qsplashscreen.cpp
	tests/auto/widgets/widgets/qbuttongroup/tst_qbuttongroup.cpp
        tests/benchmarks/opengl/main.cpp

  Needed update:
	src/plugins/platforms/cocoa/CMakeLists.txt

Change-Id: I7be4baebb63844ec2b3e0de859ca9de1bc730bb5
2020-04-22 15:28:01 +02:00
Mårten Nordheim
487dd80bce Introduce QSocketNotifier::activate(QSocketDescriptor, QSN::Type)
The pre-existing overload passes an int, but this can mean the
descriptor gets truncated in compilations where the descriptor
is 64-bit.

The old overload with int is visible when querying the metaobject system
so string-based connects still work as before, and connecting to it will
produce a deprecation warning in the output.
At the same time the PMF-based connect will, on recompile, pick the
QSocketDescriptor overload. As an added improvement it also comes with
the notification type, removing the need for separate slots where the
code would be mostly shared anyway.

The QSocketDescriptor type can be implicitly converted to and from
qintptr to ensure existing code still compiles. It can also be
constructed from Qt::HANDLE on Windows.

In this same patch I also update the existing string-based connects in
this module, which then includes updating the parameters for some slots
as well.

[ChangeLog][QtCore][QSocketNotifier] Added
QSocketNotifier::activated(QSocketDescriptor, QSocketNotifier::Type).
This replaces the activated(int) signal which in 64-bit environments
could truncate the socket descriptor. If you use "activated" with the
string-based connect() then you need to update the parameter type of the
signal and slot if it had one. If you use it with the pointer to member
function based connect() then all you need to do is update your slot's
parameter type if it has one. If you need to compile your source code
with multiple versions of Qt then connect() to this function using
pointer to member function and update the slot's parameter type if
needed.

Task-number: QTBUG-70441
Change-Id: Ic43d6bc4c5bcb4040867b2ffad8d36fb01eed8af
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2020-04-16 13:52:11 +02:00
Lars Knoll
c6cdf38e75 Change qHash() to work with size_t instead of uint
This is required, so that QHash and QSet can hold more
than 2^32 items on 64 bit platforms.

The actual hashing functions for strings are still 32bit, this will
be changed in a follow-up commit.

Change-Id: I4372125252486075ff3a0b45ecfa818359fe103b
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-04-09 20:03:25 +02:00
Qt Forward Merge Bot
8823bb8d30 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	examples/opengl/doc/src/cube.qdoc
	src/corelib/global/qlibraryinfo.cpp
	src/corelib/text/qbytearray_p.h
	src/corelib/text/qlocale_data_p.h
	src/corelib/time/qhijricalendar_data_p.h
	src/corelib/time/qjalalicalendar_data_p.h
	src/corelib/time/qromancalendar_data_p.h
	src/network/ssl/qsslcertificate.h
	src/widgets/doc/src/graphicsview.qdoc
	src/widgets/widgets/qcombobox.cpp
	src/widgets/widgets/qcombobox.h
	tests/auto/corelib/tools/qscopeguard/tst_qscopeguard.cpp
	tests/auto/widgets/widgets/qcombobox/tst_qcombobox.cpp
	tests/benchmarks/corelib/io/qdiriterator/qdiriterator.pro
	tests/manual/diaglib/debugproxystyle.cpp
	tests/manual/diaglib/qwidgetdump.cpp
	tests/manual/diaglib/qwindowdump.cpp
	tests/manual/diaglib/textdump.cpp
	util/locale_database/cldr2qlocalexml.py
	util/locale_database/qlocalexml.py
	util/locale_database/qlocalexml2cpp.py

Resolution of util/locale_database/ are based on:
https://codereview.qt-project.org/c/qt/qtbase/+/294250
and src/corelib/{text,time}/*_data_p.h were then regenerated by
running those scripts.

Updated CMakeLists.txt in each of
	tests/auto/corelib/serialization/qcborstreamreader/
	tests/auto/corelib/serialization/qcborvalue/
	tests/auto/gui/kernel/
and generated new ones in each of
	tests/auto/gui/kernel/qaddpostroutine/
	tests/auto/gui/kernel/qhighdpiscaling/
	tests/libfuzzer/corelib/text/qregularexpression/optimize/
	tests/libfuzzer/gui/painting/qcolorspace/fromiccprofile/
	tests/libfuzzer/gui/text/qtextdocument/sethtml/
	tests/libfuzzer/gui/text/qtextdocument/setmarkdown/
	tests/libfuzzer/gui/text/qtextlayout/beginlayout/
by running util/cmake/pro2cmake.py on their changed .pro files.

Changed target name in
	tests/auto/gui/kernel/qaction/qaction.pro
	tests/auto/gui/kernel/qaction/qactiongroup.pro
	tests/auto/gui/kernel/qshortcut/qshortcut.pro
to ensure unique target names for CMake

Changed tst_QComboBox::currentIndex to not test the
currentIndexChanged(QString), as that one does not exist in Qt 6
anymore.

Change-Id: I9a85705484855ae1dc874a81f49d27a50b0dcff7
2020-04-08 20:11:39 +02:00
Topi Reinio
e16137d2db Doc: Document QDBusReply copy constructor
Change-Id: Ice71b8d48f92b9ecd3075fba1927d3657934b018
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-26 15:26:48 +01:00
Simon Hausmann
ff922e7b87 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/kernel/qmetatype.cpp

Change-Id: I88eb0d3e9c9a38abf7241a51e370c655ae74e38a
2020-03-16 18:41:27 +01:00
Edward Welbourne
ebb2d85612 Record that we're still up to date with latest dbus
DBus does have dbus-1.13.* releases these days, as well as its stable
1.12.* releases, but there's no change in the fragments we've
extracted from its headers, since the last (1.12.12) release we
checked against. We're thus in sync with 1.12.16 and 1.13.12.

Fixes: QTBUG-82748
Change-Id: Ic550e3cd7486db712643711d010f5b45c347a95b
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2020-03-16 08:52:10 +01:00
Topi Reinio
26ed956cbc Doc: Remove \contentspage commands
The command is deprecated and has no effect apart from generating
a documentation warning.

Change-Id: I30871bfd6975f8268930cce99993a8579242fdb8
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-03-15 10:48:58 +01:00
Lars Knoll
e87768a880 Use qsizetype for size related methods in QVarlengthArray
Change-Id: Ib94b9a4e6e17da21f592e71a36fd1b97d42dfe62
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2020-03-14 10:36:56 +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
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
33cd680ddb New QMetaType representation
the QMetaType is represented as a pointer to a "vtable" in the form of
a QtPrivate::QMetaTypeInterface*

The recomanded use of QMetaType is to construct an object with
QMetaType::fromType. This does not require any registration.

There is still an id() function which will do some registration
for compatibility with Qt5. Also the patch does not really touch
the other extra things that can be registered (data stream operator,
comparison operator, iteratable, ...) and this still uses the previous
system.

This is only the change in QMetaType, other changes to use it in QVariant
and QMetaObject will follow

Change-Id: Iffad20085cf33f33447f58a68236013a8b60fdbf
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-20 16:11:02 +01:00
Alexandru Croitor
3af9d49bb7 Merge remote-tracking branch 'origin/wip/cmake' into dev
Change-Id: If75ae006db6eb977cf66af4c3d36cb5c8098a1f1
2020-02-10 18:35:07 +01:00
Alexandru Croitor
1c571e5fe7 Merge "Merge remote-tracking branch 'origin/wip/cmake' into dev" 2020-02-07 18:19:51 +00:00
Alexandru Croitor
ac38fa1182 Regenerate projects to correctly handle private dependencies
Change-Id: I7d84bc9962bff5c89a90367ae704974c6ce2ec89
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-05 14:36:31 +00:00
Lars Knoll
eea82ab75d Cleanup QDBusArgument marshalling for containers
There's no need to specialize the marshalling for QList, QHash and QMap
when we can simply have generic code here that works for all containers

Change-Id: I442ac6009953d2bd8e5a7012262cffeb8e912034
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-02-03 17:43:30 +01:00
Leander Beernaert
465949420a Update add_custom_command and add_custom_target dependencies
If we don't add the executable used by the custom_target and/or
custom_command to list of the command's/target's dependencies
(DEPENDS) the generated file will not update should the executable
change.

Change-Id: Idce30f3dd4f756d9e8f6848c5e16f5dd6c7c8f0a
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-02-03 08:07:03 +00: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
Alexandru Croitor
f53ca8a4fc CMake: Add Qt 5 backward compatible CMake API
Create versionless function names, that coincide with the Qt 5 CMake
API.

Task-number: QTBUG-74137
Task-number: QTBUG-80477
Change-Id: I8559b2c8a49b23e5a89ec81603aaec54ea634d70
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2020-01-27 11:49:44 +00:00
Alexandru Croitor
e9a797799e CMake: Add Qt6 forward compatible CMake API and targets
Create Qt:: versionless targets for libraries and tools. So
Qt::Core will link to Qt5::Core.

Add additional feature properties to targets, with the same name
they have in Qt6: QT_ENABLED_PUBLIC_FEATURES,
QT_DISABLED_PUBLIC_FEATURES, QT_ENABLED_PRIVATE_FEATURES,
QT_DISABLED_PRIVATE_FEATURES, to be forward-compatible with Qt6.
Prefix properties with INTERFACE_ for interface libraries.

Create functions with no major version in their prefix, so qt_foo
instead of qt5_foo.
The non-versioned functions will call the versioned functions,
depending on the value of QT_DEFAULT_MAJOR_VERSION, which can be
set by an application developer before finding the Qt package.

Set QT_DEFAULT_MAJOR_VERSION to 5 if the value has not been defined
in the current scope.

Application developers can set QT_NO_CREATE_VERSIONLESS_FUNCTIONS to
TRUE before calling find_package(Qt5) to suppress creation of the
non-versioned functions.

Application developers can set QT_NO_CREATE_VERSIONLESS_TARGETS to
TRUE before calling find_package(Qt5) to suppress creation of the
non-versioned targets.

Setting these can be useful when both find_package(Qt5) and
find_package(Qt6) are in the same project.
If none of these are set by the user, then the first find_package(Qt5)
will create versionless targets with the major version being "5",
which means the second find_package(Qt6) will not create versionless
targets.

Handle versionless plugin names in qt_import_plugins, so both
Qt::QCocoaIntegrationPlugin and Qt5/6::QCocoaIntegrationPlugin
are recognized by the function.

Allow specifying multiple types in EXCLUDE_BY_TYPE in
qt_import_plugins, to be consitent with the Qt 6 version.

Make sure to set the QT_PLUGIN_CLASS_NAME property to compatible with
Qt 6.

Task-number: QTBUG-74137
Task-number: QTBUG-80477
Change-Id: Ib89d090ea6f7794d7debd64f03f29da963a17ca7
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2020-01-25 18:10:26 +01:00
Leander Beernaert
502d3d6744 Merge remote-tracking branch 'origin/dev' into merge-dev
Change-Id: I31b761cfd5ea01373c60d02a5da8c33398d34739
2020-01-24 13:17:33 +01:00
Olivier Goffart
73d1476fb1 Replace most use of QVariant::type and occurrences of QVariant::Type
I made a clazy automated check that replaced the use of QVariant::Type
by the equivalent in QMetaType.
This has been deprecated since Qt 5.0, but many uses were not yet removed.

In addition, there was some manual changes to fix the compilation errors.

Adapted the Private API of QDateTimeParser and QMimeDataPrivate
and adjust QDateTimeEdit and QSpinBox.

QVariant(QVariant::Invalid) in qstylesheet made no sense.

But note that in QVariant::save, we actually wanted to use the non-user type.

In the SQL module, many changes were actually reverted because the API
still expects QVarient::Type.

Change-Id: I98c368490e4ee465ed3a3b63bda8b8eaa50ea67e
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2020-01-23 16:46:51 +01:00
Qt Forward Merge Bot
35a461d026 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I68702c9f9680772d332b5bb777ddd2663168abd5
2020-01-19 01:00:10 +01:00
Qt Forward Merge Bot
3e9f8b5249 Merge remote-tracking branch 'origin/5.14' into 5.15
Change-Id: I12148e7b20bcdb72d9b328035d528c99633b1e92
2020-01-18 01:00:08 +01:00
Nico Vertriest
28f95d4688 Doc: Fix qdoc compilation errors qtbase
Task-number: QTBUG-79824
Change-Id: I5a39525e3e735415ba96e2d585c5de754deb15de
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2020-01-17 12:56:08 +00:00
Qt Forward Merge Bot
d14fd32d40 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	tests/benchmarks/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/network/access/spdy/tst_spdy.cpp

Change-Id: I3196c5f7b34f2ffc9ef1e690d02d5b9bb3270a74
2020-01-15 10:14:05 +01:00
Olivier Goffart
2cbc5f6f7a Fix -Wdeprecated-copy warning
QDBusReply has an user-specified operator= but no copy constructor.

Change-Id: If7fcec3193af375f1bf2dd913d82548d6e035b48
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-01-14 16:52:34 +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
Olivier Goffart
d6266c757d Replace usages of QVariant::value by qvariant_cast
This is done automatically with a clazy check

Change-Id: I3b59511d3d36d416c8eda74858ead611d327b116
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-12-15 12:30:52 +01:00
Mårten Nordheim
40f28b1a8a Don't use QMap::unite for merging maps
Other code using these maps are not treating them like multi-maps

Change-Id: I3381fde3b3612a29110cfe890f20f96f3c0bd3a2
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-12-12 15:25:47 +01:00
Mårten Nordheim
43837f38b2 Change some uses of QMap::insertMulti to QMultiMap::insert
By casting it, these are situations where we cannot change the type
itself to QMultiMap. For QVariant it's a public define and for dbus
it's the type of an argument to the function.

Change-Id: I0f385dc857fce5de3e8254d18268fd84a6d7707c
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-12-12 15:25:41 +01:00
Lars Knoll
9c124b1b0a Qt 6: Deprecate QHash::insertMulti
[ChangeLog][QtCore][QHash] insertMulti(), unite() and
values(const Key &key) are now deprecated. Please use
QMultiHash instead.

Change-Id: Ic14907fd5fd38d585708e2dcf2c0200d221ebb25
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
2019-12-12 15:25:26 +01:00
Qt Forward Merge Bot
bef74b6c3a Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ia24cc8b86def0d9d9c17d6775cc519e491b860b1
2019-12-09 10:16:01 +01:00
Lars Knoll
e58b44d557 Change representation of string data in the meta object
Don't store our string data as QByteArrayLiterals anymore, but revert
back to simply storing them as an array of char* and offsets into that
array.

This is required to be able to inline size and begin into QByteArray
itself. Once that change is done, we can then avoid creating copies of
the string data again.

Change-Id: I362a54581caefdb1b3da4a7ab922d37e2e63dc02
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-12-08 18:19:58 +01:00
Allan Sandfeld Jensen
ece0c0a5e7 Tidy nullptr usage
Move away from using 0 as pointer literal.

Done using clang-tidy. This is not complete as
run-clang-tidy can't handle all of qtbase in one go.

Change-Id: I1076a21f32aac0dab078af6f175f7508145eece0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2019-12-06 12:13:20 +01:00
Qt Forward Merge Bot
0c29ebe374 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I4134c0c6b6c9911950f58b3b5c86e789d28a185b
2019-12-04 01:00:23 +01:00
Kai Koehne
b6632443d4 CMake: Use lower-case macro/function names
CMake is case-insensitive for macro and function names. Still, it is
"strongly recommended to stay with the case chosen in the function
definition." So let's make the function and macro definition lower-case,
like we also recommend in the documentation.

Change-Id: I1f64b18716f034cb696d2e19a2b380aaadd6cd07
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-12-03 12:51:10 +01:00
Elvis Angelaccio
c0fb2a8173 QDBusInterface: mention QtDBus caching in documentation
QtDBus caches well known interface objects when there is a non-emtpy
interface name passed to the QDBusInterface constructor.

This commit amends the constructor documentation to explain this
behavior.

Change-Id: Ic51836be6d833411500ea05fcc895cd4f6e96407
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-11-30 15:24:14 +01:00
Qt Forward Merge Bot
58c69df4d3 Merge remote-tracking branch 'origin/5.15' into dev
Conflicts:
	src/corelib/tools/qhash.h
	src/gui/kernel/qevent.h
	src/widgets/kernel/qshortcut.cpp
	src/widgets/kernel/qshortcut.h

Change-Id: If61c206ee43ad1d97f5b07f58ac93c4583ce5620
2019-11-25 11:30:04 +01:00
Allan Sandfeld Jensen
af2daafde7 Deprecate constructing QFlags from a pointer
This was used to support QFlags f = 0 initialization, but with 0 used
as a pointer literal now considered bad form, it had been changed many
places to QFlags f = nullptr, which is meaningless and confusing.

Change-Id: I4bc592151c255dc5cab1a232615caecc520f02e8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-11-20 19:43:38 +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
e9a58ba9e5 Regenerate src/*
Change-Id: I0314b4faa1e4860e86198eea4189987e527dfec2
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-11-14 09:05:48 +00:00
Alexandru Croitor
cb6f92c481 Regenerate everything under ./src
Change-Id: Ibdbdc17f8c2ee41356f490dd839a47e1bcf4c586
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:27:29 +00:00
Lars Knoll
66b6e28c01 Use QMultiHash::insert() instead of insertMulti()
Change-Id: I5daeba708a9efcf60e92cfc9a04e80546e9ae6a2
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-11-05 17:32:34 +01: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
Qt Forward Merge Bot
e164d61ca8 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: I129dd579f92cb2592a38ca043472b45cb926ae12
2019-10-14 01:00: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
Liang Qi
9c84b7786c Merge remote-tracking branch 'origin/5.13' into 5.14
Conflicts:
	src/plugins/platforms/xcb/qxcbscreen.h
	src/src.pro

Change-Id: I4e1981e69a1ddcbe4078ec6ab2a64b0da6a445de
2019-10-10 09:13:49 +02:00
Lars Knoll
4c571032f8 Add support for slots to receive the raw void ** arguments array
This is currently being used by dbus und our state machine framework,
and supported by hand editing moc generated code.

Get rid of that hack, and instead add support to moc to forward
the raw arguments array to the slot.

Change-Id: I0e36626f91eb01041464e6d931dc1d4660de91d2
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-10-07 20:40:51 +02:00
Leena Miettinen
0c1d23db7b Doc: Add info about QDBusConnection::ExportChildObjects
Child objects need QObject::objectName.

Fixes: QTBUG-17740
Change-Id: Iebf8bcd7252f8a441d7c265aae3d4dd81b3cfa54
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
2019-10-07 10:56:45 +02:00
Qt Forward Merge Bot
2c4b44d750 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ife31dad3c8dc43c5ff4d266e6d646230c5d20a50
2019-10-06 01:01:08 +02:00
Albert Astals Cid
3afe4a402c Convert a few sizeof(array)/sizeof(element0) fors to range fors
Increases readability

Change-Id: I81ea915517fd2cd6bc2780f37ba8d8097c63f44b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2019-10-04 09:00:24 +02:00
Qt Forward Merge Bot
4c8814a341 Merge remote-tracking branch 'origin/5.15' into dev
Change-Id: Ideaa64d583746f1ce8265997131fb1ce3a9acbcf
2019-10-02 08:39:15 +02:00
Alexandru Croitor
0e14bd586a Regenerate qtbase/src projects
To get less diffs for next merges and pro2cmake changes.

Change-Id: I7fb5ff34bb884072a9964e8e3488c69f4290fca2
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-09-30 18:41:11 +00:00
Alberto Mardegan
20b823f5a7 Doc: remove wrong documentation for Qt D-Bus delayed replies
People implementing D-Bus services *should not* immediately call
QDBusConnection::send() when intending to delay their reply, as this
indeed causes a reply to be sent to the client.

Change-Id: I50817f6b91ac1a02a2a25f6d31e73ad9832f1092
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-09-29 00:33:48 +03:00
Alexander Volkov
388d539865 doc: Fix variable name in QDBusArgument snippet
Change-Id: I751802d3f9f389e80cbb9aabcdb637d4742d3832
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-09-27 18:27:17 +03:00
Simon Hausmann
ceb2937498 Fix add_qt_docs calls
Brown paper bag for me, don't use a comma to separate parameters when
calling a function.

Change-Id: I21e16142fab4fd1c2714df13cd6a892b036e899a
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-09-19 07:43:13 +00:00
Simon Hausmann
655b2ed90c Re-generate main module CMake files
This fixes the calls to add_qt_docs to include the target.

Change-Id: I2c4c807bca8faa48bb49f4b8710035f21abfca0e
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-09-18 09:45:23 +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
Leander Beernaert
bf298499a0 Update public CMake macros' version
Update all public Qt macros to use qt6/QT6 instead of qt5/QT6.

Change-Id: Ib178f4fa21f37dfb8da7d4d8c097aa0e96c9d9f9
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-08-23 10:04:30 +00:00
Marc Mutz
e913b690b9 QtDBus: port all QMutexLocker users to qt_{scoped,unique}_lock
Change-Id: Ibba27351a81b0b132ce702c1dfd49d56f23bd8c1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-08-23 08:44:03 +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
Mårten Nordheim
6d3a454693 DBus: fix deadlock when destroying QDBusServer
Observed infrequently in the QDBus tests, it would deadlock when
destroying QDBusServer at the same time as qDBusNewConnection was being
executed as they were locking the same locks, but in opposite order.

QDBusServer locks d->lock, then QDBusConnectionManager::instance()->mutex.
While qDBusNewConnection locks QDBusConnectionManager::instance()->mutex,
then serverConnection->lock (and serverConnection here
is QDBusServer's d-pointer).

QOrderedMutexLocker cannot be used in this situation because it
operates on QMutex*, which d->lock (QReadWriteLock) is not.

Change the code to lock QDBusConnectionManager's mutex before d->lock
and then unlock the QMutexLocker where it would previously destruct.
If QDBusConnectionManager has already been destroyed then we pass a
nullptr to the QMutexLocker which is fine and will not do anything.

Fixes: QTBUG-74635
Change-Id: I7f02d7759da67377996ef042c81b0969ccb8aadb
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-08-16 20:47:33 +00:00
Alexandru Croitor
c7ec7cd2a1 Merge branch 'wip/qt6' into wip/cmake
Change-Id: I50ac36b8803c296998149e98cc61e38687cdd14b
2019-08-15 16:53:19 +02:00
Marc Mutz
80179e3b7e Port users of QDBusAbstractInterface::(async)callWithArgumentList() to new variadic (async)Call()
Except in the auto-generated files.

Required to add a cast operator from QDBusObjectPath to QVariant, as the
variadic call() uses QVariant(arg) instead of QVariant::fromValue(arg).

[ChangeLog][QtDBus][QDBusObjectPath] Added explicit cast operator to QVariant.

Change-Id: I3f3004f7b9300a6340d27488f5b97981cbab3c24
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-08-07 20:09:17 +00:00
Thiago Macieira
3183e428a9 Mark QDBusError::ErrorType a Q_ENUM
Easier qDebugging.

Fixes: QTBUG-77183
Change-Id: Ife213d861bb14c1787e1fffd15b63a1f8d64cc30
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2019-08-05 20:41:51 -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
Kai Uwe Broulik
777c98ad9f QDBusConnectionInterface: Add activatableServiceNames
This allows to query all names that can be activated on the bus.

Change-Id: I8f894bf858eb18b67a074ca666ad3200ed99c373
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-07-07 12:16:11 +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
Liang Qi
aedc59b1c3 Merge remote-tracking branch 'origin/5.12' into 5.13
Conflicts:
	src/corelib/io/qstorageinfo_unix.cpp
	src/network/ssl/qsslsocket_openssl.cpp

Change-Id: Ibc9ce799bef62d60d616beaa9fbde8ebeadfbc20
2019-06-25 15:47:42 +02:00
Liang Qi
ef37ab9970 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	.qmake.conf
	src/gui/painting/qdrawhelper.cpp
	src/gui/text/qdistancefield.cpp
	src/gui/text/qdistancefield_p.h
	src/network/ssl/qsslsocket_openssl.cpp
	src/plugins/platforms/android/qandroidinputcontext.cpp
	src/widgets/styles/qstylesheetstyle.cpp

Done-With: Timur Pocheptsov <timur.pocheptsov@qt.io>
Change-Id: Ia7daad21f077ea889898f17734ec46303e71fe6b
2019-06-25 13:04:27 +02:00
Alexandru Croitor
fe3bd212fc Merge remote-tracking branch 'origin/wip/qt6' into wip/cmake
This changes many different CMake places to mention Qt6 instead of
Qt5.

Note that some old qt5 cmake config files in corelib are probably not
needed anymore, but I still renamed and kept them for now.

Change-Id: Ie69e81540386a5af153f76c0242e18d48211bec4
2019-06-14 16:31:09 +02:00
Kai Koehne
29670528d8 Qt D-Bus: Document CMake commands
Task-number: QTBUG-72159
Change-Id: I4b2f29a9d976f4b81acef3170b90016d2e8b5ef8
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2019-06-21 11:04:05 +02:00
Alexandru Croitor
891c897b80 Regenerate the main qtbase modules
There were some changes done in pro2cmake, so regenerate the main
qtbase modules to keep everything up to date.

Some new whitespace got added.
Some special cases were removed (ZLIB).
Some opengl code got moved around.
Some plugin types were added.
And some other minor things.

Change-Id: Ie8cba4a9aa6b4b163c39d6cf546ea9e0bfc05c01
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-06-05 07:39:14 +00:00
Marc Mutz
f8f4a75d82 QtDBus: use new QLatin1String::arg()
Saves more than 4KiB in text size (~0.7%) on optimized GCC 9.1
Linux AMD64 builds.

Change-Id: I5b29eae620370abd91e3a7f98e660c32470aed1c
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2019-06-03 23:28:18 +02:00
Marc Mutz
08103d3a52 QDBusAbstractInterface: make call() and asyncCall() variadic templates
... and use a variant of the QString::multiArg() trick to pass the
variable number of arguments into an out-of-line function.

The idea of this patch is to make the lowly asyncCall() and call()
functions the principal interface for DBus calls again.

Currently, it is more efficient to build up a QList<QVariant> and pass
that to the *WithArgumentList() methods. With more efficient, I mean
that the equivalent calls with QList expand to less client code,
probably because of the need to construct eight QVariant instances,
destroy them again, and then take the hit for a function call with so
many arguments, which can all but be efficient.

Consequently, when porting the NM bearer plugin to use call() instead
of callWithArgumentList(), text size increased by ~3KiB on my machine.

So, looking for a way to avoid the overhead of so many default
arguments, while at the same time allowing to pass even more arguments
than the predefined eight, I considered the QString::arg() method, but
discarded it because it does not scale to arbitrarily
(ie. SEP-limited) many arguments.

Variadic templates scale to SEP-limited many arguments, but they are
templates and deduce the exact type, so constraining the template to
only QVariants would have broken all users of the API which pass
non-QVariants and expect an implicit con- version to resolve the call.

So I decided to make a virtue of necessity, accept all argument types
and convert them to QVariant when constructing the
QString::multiArg()-inspired QVariant array.

To bring this patch to its consequential end would require to pass the
arguments as arrays instead of QLists, but to get a feeling of how
much impact this new API has, I backed the new implementation by
converting the array to a QList and calling the *WithArgumentList()
methods.

The result is, if I may say so, satisfying. Said bearer plugin drops
from +3KiB (baseline: callWithArgumentList()) to -5KiB (2.0% and 3.2%,
resp.); the (unmodified) connman bearer plugin, which already used
call(), dropped by almost 6KiB (2.5%).

While GCC can deal with the zero-sized array in a nullary call to the
variadic templates, MSVC cannot, so an extra overload provides an
alternative for zero arguments.

[ChangeLog][QtDBus][QDBusAbstractInterface] The call() and asyncCall()
methods now accept more than eight QVariant arguments.

Change-Id: Ic85faca40949f9bb8c08756be3bfe945c9cdd952
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-06-21 09:18:13 +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
Simon Hausmann
8fa646dbe2 Add basic support for compiling applications with qmake
* Generate module .pri files
* Generate qconfig.pri
* Propagate MODULE_CONFIG from the .pro files

This enables the basic use-case of simple application builds that for
example use the moc. Omitted from the patch is support for private
module configurations, prl files (should we do this?) and possibly more
hidden gems that need to be implemented to for example support building
Qt modules with qmake.

Task-number: QTBUG-75666
Change-Id: Icbf0d9ccea4cd683e4c38340b9a2320bf7951d0d
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-31 12:53:09 +00:00
Giuseppe D'Angelo
34fe9232db Port from QAtomic::load() to loadRelaxed()
Semi-automated, just needed ~20 manual fixes:

$ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)load\(\)/$1loadRelaxed\(\)/g' -i \{\} +
$ find \( -iname \*.cpp -or -iname \*.h \) -exec perl -pe 's/(\.|->)store\(/$1storeRelaxed\(/g' -i \{\} +

It can be easily improved (e.g. for store check that there are no commas
after the opening parens). The most common offender is QLibrary::load,
and some code using std::atomic directly.

Change-Id: I07c38a3c8ed32c924ef4999e85c7e45cf48f0f6c
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2019-06-20 20:48:59 +02:00
Alexandru Croitor
0711d497d9 Regenerate dbus
And add the first version of the .prev file.

Change-Id: I8375591a8cfc087291774370b8308c808dd5f0b4
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-20 09:36:37 +00:00
Alexandru Croitor
0efe6fc90f Don't link against dbus-1_nolink when dbus_linked feature is off
dbus1_linked is only evaluated to true when the dbus package is found.
If it was not found, then it makes no sense to link against the
_nolink target, because no package was found in the first place.

When the package is not found, QtDBus uses a minimal dbus header which
is included with QtDBus sources, so there is no need for the _nolink
target.

This amends cc141cc5c6 and fixes a build
failure on macOS.

Change-Id: I71dcbb7465ad13b0bf03579f51412c373125caba
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
2019-05-08 12:32:53 +00:00
Tobias Hunger
cc141cc5c6 CMake: Fix dbus build after dbus library detection update
Change-Id: If4d773136b1aa01204e012c6900458673a4c5670
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-07 15:07:07 +00:00
Tobias Hunger
42648ff993 CMake: Regenerate src/dbus
Change-Id: Iff9890ead883bac5f75425a2d0367e639d648399
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-05-06 14:22:36 +00:00
Topi Reinio
4ad915425d Doc: Replace example file lists with links to code.qt.io
Instead of generating .html page for each file in an example
project, generate links to code.qt.io, under the correct
path and branch, where the user can browse the example source.

Store all URLs under QT_INSTALL_DOCS/config where other qt5
submodules can access them. The repository name appears in
the URL, so we cannot define a single URL for all modules.

Task-number: QTBUG-74391
Change-Id: I63d4d6d2c352877797b1ee8e057d48c0cd789bff
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-05-03 14:24:42 +02:00
Tobias Hunger
6630937e63 Merge commit 'dev' into 'wip/cmake-merge'
Change-Id: I176c40d031be26a1dd1cf08843e448a660598783
2019-04-16 16:32:08 +02:00
Martin Smith
0e2c013a45 doc: Add dontdocument.qdoc files
Each module that has publically declared classes or structs
that are not meant to be documented is given a dontdocument.qdoc
file to tell qdoc that these classes are not meant to be
documentented. Then qdoc will not print warnings about missing
\class comments for these classes and structs.

Change-Id: I9195f0b546032e1c7642c9da34d85a0a4a9bfb08
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2019-05-07 16:58:09 +02:00
Allan Sandfeld Jensen
1ef274fb94 Replace qMove with std::move
Change-Id: I67df3ae6b5db0a158f86e75b99f422bd13853bc9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2019-04-06 11:00:38 +00:00
Qt Forward Merge Bot
ed485243b5 Merge "Merge remote-tracking branch 'origin/5.13' into dev" into refs/staging/dev 2019-04-04 23:01:17 +00:00
Allan Sandfeld Jensen
8d7c97d428 Remove remaining Q_DECL_NOEXCEPT/Q_DECL_NOTHROW usage
Change-Id: I91ac9e714a465cab226b211812aa46e8fe5ff2ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-04-04 18:01:38 +00:00
Lars Knoll
999c26dd83 Add a QAbstractMetaCallEvent
And use it to clean up the reimplementations in Qt DBus.

Change-Id: I8e3fe35e8db6405cbcbfb45b42a8f2efecc1cef0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2019-03-29 13:46:22 +00:00
Tobias Hunger
432f7232e3 CMake: Add public dependency from Qt::Dbus to Qt::Core
Anything that uses Qt::Dbus also needs to link to Qt::Core, so encode
that in the target.

Change-Id: Ibc984d5b5e118aae8d1c0d21117fcff1664b0ae3
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2019-03-20 12:29:53 +00: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
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
Tobias Hunger
bfca573f87 CMake: Re-generate CMakeLists.txt file for dbus
Change-Id: I13ce987d4db99e160bf579ea3a785ac45cc1417b
Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
2019-03-04 09:24:37 +00:00
Edward Welbourne
241533962c Add ### Qt6 comment requested in code-review
Task-number: QTBUG-73484
Change-Id: I7c1c5faf3d32fa21d8d2277ec434084450290156
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-25 09:29:14 +00:00
Chris Adams
d7afd8bb38 Remove dead code from qdbusintegrator.cpp
This code has been there since the initial public commit, but has no
effect.

Change-Id: Iae80ae22a363b3bd0e6cf7706619b38edc47790f
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-22 16:57:27 +10: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
Allan Sandfeld Jensen
b32b61f17e Remove handling of missing Q_COMPILER_RVALUE_REFS
Remove remaining handling of missing support for rvalue refs.

Change-Id: I78bab8bccfeeb9c76f464f345874364a37e4840a
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-05-01 20:24:45 +00:00
Edward Welbourne
1c55948ee8 DBus: verify up to date with dbus-1.12.12
The attirubtion previously only sayd 1.12, so verified up to date at
1.12.12; and tweaked the header slightly to make it easier to verify
(content is now in the same order as in the dbus sources).  Updated
the list of years in which Red Hat claims copyright on various parts.

Fixes: QTBUG-72622
Change-Id: Idcec9edbf42860bca61d838e75889a55eb0859d5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2019-02-21 13:25:58 +00:00
Kevin Funk
43ff1b568a cmake: Fix more old-style CMake macros
Use the proper target name for the Qt tools

Change-Id: I04b3aed7b58d44e60597223340d66ac97ea083cb
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-12 14:20:32 +00:00
Kevin Funk
988162eaf8 cmake: Start to use ConfigExtra.cmake files
Enables the use of e.g. QT_NO_DEBUG in compiler flags, -fPIC, passing on of
QT_NAMESPACE, etc. pp.

Dropping a lot of custom code which handled adding imported targets for
the command-line tools (this is all being handled by CMake already).

It needs to be investigated if we need to resurrect
Qt5GuiConfigExtras.cmake.in in one way or the other.

Change-Id: I4fa141b68fddaad4f33e628c59d5d0b3a7b3a096
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2019-02-12 13:37:08 +00:00
Friedemann Kleint
e209321966 Use Q_DISABLE_COPY_MOVE for private classes
Change-Id: I3cfcfba892ff4a0ab4e31f308620b445162bb17b
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
2018-12-12 07:23:54 +00:00
Liang Qi
5d5c00c676 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	src/gui/painting/qdrawhelper.cpp

Change-Id: I4916e07b635e1d3830e9b46ef7914f99bec3098e
2018-12-04 09:58:43 +01:00
Kirill Burtsev
030b17ecc0 QDBusConnection: prevent leaking connection/server on destroy
Amends fix 68964b1023

Change-Id: I05816f4b4d2128ed0b669e124d9c9eef92122ec0
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-11-28 11:19:34 +00:00
David Edmundson
d761c62783 QDBusServiceWatcher namespace prefix support
This allows a user to efficiently watch for services with a common
domain prefix.

This is exposed in the API via a wildcard character in the service name.

For example creating a watcher on "org.mpris*" will match
"org.mpris.foo" "org.mpris.bar" and "org.mpris" itself. It will not
match org.mprisasdf.

Internally the argument match rules have been expanded from a single
QStringList to a struct containing args and arg0namespace. This was done
so that we can easily use argpath in match rules in the future.

Change-Id: I55882ab603cc6ba478e8c0ea9a6800f6e483a50c
Reviewed-by: Kai Uwe Broulik <kde@privat.broulik.de>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: David Faure <david.faure@kdab.com>
2018-11-06 09:52:09 +00:00
Martin Smith
81d8319276 doc: Fix all clang parse errors in QtBase during PCH build
This update eliminates ALL parsing errors when clang parses the
Qt headers to build the precompiled header qdoc needs. These errors
are often cases where an old use of Q_QDOC no longer works because
clang sees the enclosed fake declarations as erroneous.

In a few cases, clang reported errors because two dummy function
declartations under the Q_CLANG_QDOC guard were indistinguishable,
so one of them was removed, and the documentation was patched
accordingly.

Using the macro Q_DECLARE_INTERFACE(...) causes clang to report errors
because the class parametewr is abstract. These uses of the macro are
not needed, so they are removed with #ifndef Q_CLANG_QDOC.

Some declarations of default GL types that had been provided for qdoc
were no longer needed, so they are removed.

Now there are some member function signatures in QDBusPendingReply
and QDBusPendingCall that have very long template clauses and qualifiers
in their signatures. These unwieldy signatures will be unnecessary in the
documentation and will look bad there, but for now they are correct. The
ultimate solution will be to add a metacommand to qdoc, something like
\simplify-signature to tell qdoc to generate the documentation for these
member functions without the long template caluses and qualifiers.

Change-Id: I012cf17a544fbba2ebc71002f31bdc865119bb8e
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-11-05 13:10:11 +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
Frederik Gladhorn
102a919b73 Generate documentation .tags files for all of the docs
This allows others to link to QtDBus and the other libraries/tools using
doxygen.

Fixes: QTBUG-60933
Change-Id: I026895a432a328f224c40cf231ad12d109dc648f
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-10-31 08:38:02 +00:00
Liang Qi
e28e91ae99 Merge remote-tracking branch 'origin/5.12' into dev
Conflicts:
	src/corelib/animation/qpropertyanimation.cpp
	src/gui/image/qicon.cpp
	tests/auto/widgets/itemviews/qtableview/tst_qtableview.cpp

Change-Id: I3698172b7b44ebb487cb38f50fd2c4a9f8a35b21
2018-10-25 07:21:53 +02:00
Edward Welbourne
c14103be50 Update dbus header and document its provenance
There's been one minor change in a struct and some minor re-ordering
of other things within their files (reflected here to simplify future
checks); and qt_attribution.json didn't document enough details to
ensure reliable review.

Task-number: QTBUG-70011
Change-Id: Iccff9cfd899e58cb42837c4628acacd7877c5b01
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
2018-10-19 12:15:51 +00:00
Mikhail Svetkin
b472e73b02 qdbuserror: Use qOffsetStringArray instead of script generated code
Change-Id: I2498702bcf4706cb717a7481cf6f81ceebb29ae8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-10-16 18:32:18 +00:00
Frederik Gladhorn
eb4d39ada0 Remove separation of headers into two lists
This doesn't add any value and just complicates things.

Change-Id: I3a011174e330f212eda99371d2806517ceec45d7
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-10-16 14:42:44 +00:00
Qt Forward Merge Bot
295cd87c6d Merge remote-tracking branch 'origin/5.11' into 5.12
Change-Id: I66c7f18a2abd13601da0947919436f7da3549ae9
2018-09-07 01:00:21 +02:00
Venugopal Shivashankar
059b10f295 Doc: Check before including the \snippet from a .pro file
Change-Id: Icc7552b46a2657c81958e40f33596ddeee045172
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-08-30 09:23:42 +00:00
Ulf Hermann
0a06e1baf9 Modernize the "thread" feature
Add it to configure.json and replace all occurrences of QT_NO_THREAD
with QT_CONFIG(thread). Add conditions for other features that depend
on thread support. Remove conditions where we can use the QMutex and
QThreadStorage stubs.

Change-Id: I284e5d794fda9a4c6f4a1ab29e55aa686272a0eb
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@qt.io>
2018-08-17 00:34:36 +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
Frederik Gladhorn
ff78e6fe35 Fix build without 'library'
Without QT_CONFIG(library) qdbus_resolve_conditionally would be declared
but not defined.

Change-Id: Id90f6c736080e4c1609568b3fab1f464c0e46aa3
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
2018-07-16 15:23:27 +00:00
Kai Uwe Broulik
d743df975d Support interactive authorization flag in DBusMessage
This flag was introduced to serve as a replacement for a dedicated "interactive" boolean
argument in method calls guarded by Polkit.

Change-Id: Ida91c9872e70f8ca6672563d0ca6642f38c498ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-07-10 19:46:40 +00:00
Paul Wicking
7f7ceb567f Doc: Add references to QDBusAbstractAdaptor implementation example
Adding references where applicable, as removed by
023a818738 when removing stale example.

Add example run snippet to the example landing page.
Remove stale example qdoc file that is superceded by current example.

Task-number: QTBUG-69191
Change-Id: I62dc66edc86da5efb4c79fd124edb2fa619aeb6b
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-06-29 05:16:04 +00:00
Paul Wicking
023a818738 Doc: Remove old and broken QDBus adaptor example
Task-number: QTBUG-69091
Change-Id: I991a5bc01c316a5e23204550618d730af755292c
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-06-28 07:37:25 +00:00
Paul Wicking
8bd73ad989 Doc: Add missing full stops in briefs
Task-number: QTBUG-68933
Change-Id: I3f2a9f8c562f9a44bb32bddd31d75abbfe6de04d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-06-21 14:23:30 +00:00
Qt Forward Merge Bot
552c45bea9 Merge remote-tracking branch 'origin/5.11.0' into 5.11
Change-Id: Id6e2acd5e31c1ac858ddf1d8873a6f10694141de
2018-05-09 13:48:42 +02:00
Volker Krause
9ac9bea16c Fix handling of QDBusMessage in qdbuscpp2xml in bootstrapped mode
In bootstrapped mode QDBusMessage isn't available, so looking up the type
via QMetaType wont work. QDBusMetaTypeId has this special-cased, but that
alone isn't enough for qdbuscpp2xml to produce the same result as in non-
bootstrapped mode.

The effect of this has also been described here before in detail:
http://lists.qt-project.org/pipermail/development/2017-February/028756.html

Change-Id: Id309a3a910f971c6150cdc6d06f2b48f1b95c787
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-04-29 16:44:32 +00:00
Kai Koehne
c579a77f84 Document libdbus-1 code in Qt D-Bus
[ChangeLog][Third-Party Code] Libdbus-1 code in Qt D-Bus is now properly
documented. The code is licensed under AFL-2.1 OR GPL-2.0-or-later.

Change-Id: I38bd6f38175562fff03ae84fc7a5c435de4cb972
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-04-20 06:45:12 +00:00
Rolf Eike Beer
25956a1e7c DBus: merge calls to set_source_files_properties() in CMake functions
This can handle multiple files at once just fine.

Change-Id: I9dcf7b0c72df432f02200ac7f3967f36a408f306
Reviewed-by: David Faure <david.faure@kdab.com>
2018-03-23 16:38:56 +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
Kai Koehne
c4b596fb79 Document licenses for all Qt modules
Follow the example of the other modules and explicitly mention
the valid licenses on each module landing page, optionally
combining it with trademark information.

Change-Id: I9f1fea0f002e0ab607da89a0cbfe7c53060582d7
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2018-01-24 13:19:24 +00:00
Liang Qi
65a97fccc6 Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp

Change-Id: If089d5010d15c33b3c1f13912d4386207456c1a9
2018-01-20 22:36:19 +01:00
Martin Storsjö
5eaecaa966 Undef interface in more places, fixing builds with libc++ on windows
After including windows.h, interface is a define that expands to
"struct" (unless WIN32_LEAN_AND_MEAN is defined). This name is
used as a normal identifier in multiple places within Qt.

This has already been worked around in a number of places
(in e.g. 3ba61d9baa and
786d23bb49).

After qrandom.h was included in <QtCore/QtCore>, this header
implicitly includes <random>. In libc++ on windows, this header
then transitively includes windows.h, exposing the clash with
the name "interface" in even more locations than before.

For cases within qtbase internals, it could also alternatively be
handled by defining WIN32_LEAN_AND_MEAN while building QtDbus, but
for occurrences in public headers, the undef trick needs to be
used.

Change-Id: I89754f38f55ae7f2145255a2c8a71b23492be6a1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-18 04:44:44 +00:00
Martin Smith
bcc1eaab70 doc: Fix remaining qdoc warnings in QtDBus
Added many template clauses to \fn commands. Also added or
modified some uses of Q_CLANG_QDOC in some dbus include files
to work around some seriousl ugly template clauses that could
not be added to \fn commands. Also modified a few parameter
names in the documentation.

The first attempt at making this change caused syncqt to fail
to create QtDBus/QDBusPendingReply. This second attempt works.

Change-Id: I96c1fb9bcb1d9debf9409f6baf8c42e18fb9e75d
Reviewed-by: Martin Smith <martin.smith@qt.io>
2018-01-15 15:00:58 +00:00
Friedemann Kleint
9031069e12 Add more Q_FALLTHROUGH()
Silence g++ 7.X warnings.

Change-Id: Id06d06e7e3b5be2cf3934d81f1891da58dea2649
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2018-01-12 07:10:25 +00:00
Friedemann Kleint
3439f523b8 QtDBus: Raise minimum supported MSVC version to 2015
Remove code for older versions and streamline #ifdefs.

Task-number: QTBUG-51673
Change-Id: I0c0ba4e914a1f3b7a324c68c59544a5074f7b075
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2018-01-04 20:24:09 +00:00
Lars Knoll
0f315adf91 Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	.qmake.conf
	sc/corelib/io/qfsfileengine_p.h
	src/corelib/io/qstorageinfo_unix.cpp
	src/platformsupport/eglconvenience/qeglpbuffer_p.h
	src/platformsupport/input/libinput/qlibinputkeyboard.cpp
	src/platformsupport/input/libinput/qlibinputpointer.cpp
	src/plugins/platforms/cocoa/qcocoamenu.mm
	src/plugins/platforms/ios/qiosscreen.h
	src/plugins/platforms/ios/qioswindow.h
	src/plugins/platforms/ios/quiview.mm
	src/printsupport/dialogs/qpagesetupdialog_unix_p.h
	src/printsupport/dialogs/qprintpreviewdialog.cpp
	src/printsupport/widgets/qcupsjobwidget_p.h
	src/widgets/widgets/qmenu.cpp
	tests/auto/corelib/tools/qdatetime/tst_qdatetime.cpp
	tests/auto/widgets/itemviews/qtreeview/tst_qtreeview.cpp

Change-Id: Iecb4883122efe97ef0ed850271e6c51bab568e9c
2018-01-02 09:58:44 +01:00
Martin Smith
a942721edc doc: update dbus sources for clangqdoc
Changed some uses of Q_QDOC to Q_CLANG_QDOC;
eliminated some uses of Q_QDOC; correct some
function signatures used for qdoc; added docs
for swap() functions.

Change-Id: I0d3c62d462bd3b10fd35d411bdfb93d952e6423d
Reviewed-by: Martin Smith <martin.smith@qt.io>
2017-12-08 17:38:06 +00:00
Martin Smith
929ea50393 doc: Document remaining anonymous enums
This change adds qdoc comments for the remaining nameless
enum types.

Change-Id: I4da8b67883c8020323437cf74c938d3655d8c384
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2017-12-06 07:11:48 +00:00
Liang Qi
153e8b49ad Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/network/access/qhttp2protocolhandler_p.h
	src/network/kernel/kernel.pri
	src/network/ssl/qsslkey_qt.cpp
	src/plugins/platforms/cocoa/qcocoascreen.mm
	src/plugins/platforms/windows/accessible/iaccessible2.cpp
	src/plugins/platforms/windows/accessible/iaccessible2.h
	src/plugins/platforms/windows/accessible/qwindowsaccessibility.cpp
	src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.cpp
	src/plugins/platforms/windows/accessible/qwindowsmsaaaccessible.h
	src/widgets/widgets/qmenu_p.h
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/auto/other/qaccessibility/tst_qaccessibility.cpp
	tests/auto/testlib/selftests/expected_cmptest.lightxml
	tests/auto/testlib/selftests/expected_cmptest.teamcity
	tests/auto/testlib/selftests/expected_cmptest.txt
	tests/auto/testlib/selftests/expected_cmptest.xml

Done-with: Edward Welbourne <edward.welbourne@qt.io>
Change-Id: I4217cc7d840cbae3e3dd28574741544469c4c6b9
2017-11-23 09:36:03 +01:00
Topi Reinio
0817e2a81e Doc: Update the list of highlighted examples
Update the list of highlighted examples for modules in qtbase, based on
which examples have been updated to use C++11 features, the new
signal/slot connection syntax, and documentation improvements.

Not all the modules have highlighted examples yet as some of the
work is still ongoing.

Task-number: QTBUG-60641
Change-Id: If28d59c10ca1a30e5db408970f20159434ac94f8
Reviewed-by: Nico Vertriest <nico.vertriest@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2017-11-22 07:39:53 +00:00
Andreas Hartmetz
eeca8895fc Remove obsolete DBus dispatch lock
In c2049f67e4, all DBus I/O was
moved into a service thread. The dispatch lock used to protect
DBus I/O in the threading setup before that commit. It is not
needed anymore.
No discernible difference in QtDBus benchmarks, roughly 500
bytes code size reduction on AMD64. The main point is to reduce
confusion from unnecessary code.

Change-Id: Idcbdd2b7e2b317cf6da0b5bfc5ec70afed1f1b48
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-11-08 05:38:39 +00:00
Liang Qi
17d5141113 Merge remote-tracking branch 'origin/5.9' into 5.10
Conflicts:
	src/plugins/platforms/windows/qwindowswindow.cpp
	tests/auto/widgets/kernel/qaction/tst_qaction.cpp

Change-Id: Ia017a825ed2ca2d53ac586f4ae48df6f65818d40
2017-10-30 08:54:05 +01:00
Friedemann Kleint
5eb508a317 Fix clazy-strict-iterators
Change-Id: I9276a85f0a8061b2636687cf694b8ed1abaa18b8
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-10-25 09:19:19 +00:00
Allan Sandfeld Jensen
fa9d12f4a2 Merge remote-tracking branch 'origin/5.10' into dev
Conflicts:
	src/plugins/platforms/windows/qwindowsmousehandler.cpp
	src/plugins/platforms/xcb/qxcbimage.cpp
	tests/auto/network/access/qnetworkreply/tst_qnetworkreply.cpp
	tests/manual/qtabletevent/regular_widgets/main.cpp

Done-with: Friedemann Kleint<Friedemann.Kleint@qt.io>
Done-with: Mårten Nordheim<marten.nordheim@qt.io>
Change-Id: I5b2499513a92c590ed0756f7d2e93c35a64b7f30
2017-10-24 13:40:55 +02:00
Liang Qi
01afc8c810 Merge remote-tracking branch 'origin/5.9' into 5.10
Change-Id: I3cf73c53cf131d0babfb558c2507bed0e0fc5f08
2017-10-16 22:21:52 +03:00
Jędrzej Nowacki
2d4fe257ca Remove some unused, local variables
Change-Id: I453162d2d396bb3427064d3b1593bb6c71376605
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2017-10-14 07:04:39 +00:00
Kai Koehne
f6cca6ab8a Replace 'an unique' with 'a unique'
Unique begins with a "y" sound, hence a unique is correct.

Change-Id: I9eb6b4d4c9ddab45af931e97c041c24edf163eca
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
2017-10-11 18:44:57 +00:00
Frederik Gladhorn
2b1ab81eda Register QVector with basic DBus types
In order to reduce surprises when using DBus, also register QVector
where QList is pre-registered.

Change-Id: I7fdc0a52b11cdc4ebb8338f9a8ba00c8a46c3ed5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-09-25 12:56:32 +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
Thiago Macieira
883dfb3d15 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/widgets/kernel/qwidget.cpp

This merge also extends the expected output of the pairdiagnostics
teamcity output (added in dev in commit
c608ffc56a) after the recent addition of
the flowId attribute to the teamcity output (commit
8f03656211 in 5.9).

Change-Id: I3868166e5efc45538544fffd14d8aba438f9173c
2017-08-08 11:48:10 +02:00
Romain Pokrzywka
02b0f44fab Fix race condition in QDBusAbstractInterfacePrivate::initOwnerTracking()
The current code fetches currentOwner in the constructor, then sets up
a connection between a service watcher and _q_serviceOwnerChanged() in
initOwnerTracking(). But an owner change notification could arrive
after we fetch the current owner and before the connection is made.
In this case the owner change notification will be lost, and the
interface will keep reporting being invalid permanently.

The fix is to delay initializing currentOwner until after the connection
is made.

Task-number: QTBUG-62284
Change-Id: I92b9d61004e14fd2ee2543488740a542dc7a9b7a
Reviewed-by: Romain Pokrzywka <romain.pokrzywka@gmail.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-08-04 18:47:55 +00:00
Oswald Buddenhagen
ee07b912a1 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	src/plugins/platforms/xcb/qxcbconnection.h
	src/plugins/platforms/xcb/qxcbconnection_xi2.cpp
	src/plugins/sqldrivers/sqlite/qsql_sqlite.cpp
	src/plugins/styles/mac/qmacstyle_mac.mm
	src/widgets/widgets/qdockarealayout.cpp
	src/widgets/widgets/qmainwindow.cpp
	src/widgets/widgets/qmainwindowlayout.cpp
	src/widgets/widgets/qmainwindowlayout_p.h
	tests/auto/corelib/tools/qlocale/tst_qlocale.cpp
	tests/auto/other/macnativeevents/BLACKLIST
	tests/auto/widgets/widgets/qmenu/BLACKLIST

Change-Id: Ic8e724b80a65e7b1af25511b0e674d209265e567
2017-08-02 22:52:32 +02:00
Alex Blasche
2e2fa2a283 Fix documentation for QDBusError::Other
Change-Id: I12c29833599793f0d42de6742109926ba78d5a6d
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-24 06:14:10 +00:00
Gabriel de Dietrich
d38fe875c7 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
    src/widgets/widgets/qmainwindowlayout.cpp

Change-Id: I306b4f5ad11bceb336c9091241b468d455fe6bb6
2017-07-13 16:36:10 -07:00
Kevin Funk
9db09b4700 Fix modernize-use-bool-literals issues
Reported by clang-tidy. Skipped fixes in implementation files, only
changed headers.

Change-Id: I5cfd266b3d4046f90baebc0c538b1b6ab03a02d2
Reviewed-by: Volker Krause <volker.krause@kdab.com>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-07-08 11:49:55 +00:00
Liang Qi
7f269a5db8 Merge remote-tracking branch 'origin/5.9' into dev
Conflicts:
	.qmake.conf

Change-Id: I43531e087bb810889d5c1fbfcdffb29b78804839
2017-07-06 13:54:25 +02:00
David Faure
f7aaff01de Fix Qt5DBusMacros.cmake for CMake 3.9
CMake gained support for running AUTOMOC on generated headers,
so we need to mark them with SKIP_AUTOMOC since we're generating
moc files for those already. Otherwise we get duplicated symbols.

Change-Id: Iabd387832cfc74809fc5e6ff4782f4fc83cc07d8
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Rolf Eike Beer <eb@emlix.com>
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: Stephen Kelly <steveire@gmail.com>
2017-07-05 17:11:59 +00:00
Friedemann Kleint
9656e972d1 Remove remains of wince in .pro files
Task-number: QTBUG-52590
Change-Id: I444fc9eedc8a8e4ad2ede224d66e7c410bedbb48
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-07-03 05:32:51 +00:00
Jesus Fernandez
e400b7e326 Ensure QDBusConnectionPrivate pointer initialization
Change-Id: Id7ca5b412462b5d7a18d12f9a227fdf9ef7b2344
Coverity-Id: 180869
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Alberto Mardegan <mardy@users.sourceforge.net>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-06-06 20:26:23 +00:00
Lars Knoll
51f095e655 Revert "Merge the QDBusMetaType's custom information to QDBusConnectionManager"
This reverts commit daeb334039.

The commit was causing race conditions, and random failures in CI.

Task-number: QTBUG-60792
Change-Id: I6e49b733965632a1a268f0e88809794098465ec0
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-05-17 13:42:47 +00:00
Thiago Macieira
67f466505e Fix some QtDBus crashes during application destruction
It's possible that some code executes after QDBusConnectionManager is
destroyed and still tries to access QtDBus. Protect against such
crashes.

Change-Id: I87e17314d8b24ae983b1fffd1453c13fbd3cf48e
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
Reviewed-by: Alex Blasche <alexander.blasche@qt.io>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-05-11 08:35:33 +00:00
Thiago Macieira
daeb334039 Merge the QDBusMetaType's custom information to QDBusConnectionManager
This allows us to get rid of two Q_GLOBAL_STATIC in QtDBus, which means
fewer opportunities for screwing up the order of destruction. And since
QDBusConnectionManager now ensures that the types are initialized, we
don't need to re-initialize them everywhere.

The Q_GLOBAL_STATIC for QDBusConnectionManager ensures the proper
thread-safe locking, so we don't need to lock for every type that we're
trying to register. This should make things faster.

But as a side-effect, trying to register a D-Bus metatype will cause the
QDBusConnectionManager thread to start too.

Change-Id: Ifea6e497f11a461db432ffff1449a4e535234485
Reviewed-by: René J.V. Bertin <rjvbertin@gmail.com>
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-05-11 08:35:24 +00:00
Rolf Eike Beer
6ef07e0902 Qt5DBusMacros: remove intermediate variable
This has been there probably forever, likely from the time when the code
was derived from upstream CMake. Since this is just copying one variable
to another and the latter has a wrong name (_qt4_*) just drop it.

Change-Id: Ica74f3bc9a6b0a6669d80cfc0ebafc003f5b908e
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Reviewed-by: David Faure <david.faure@kdab.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-04-11 14:07:29 +00:00
Liang Qi
d51c3ecf8e Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	examples/network/network.pro
	mkspecs/features/mac/default_post.prf
	src/corelib/io/qfilesystemengine_win.cpp
	src/corelib/io/qprocess.cpp
	src/corelib/io/qprocess.h
	src/corelib/io/qprocess_p.h
	src/corelib/io/qprocess_unix.cpp
	src/corelib/io/qprocess_win.cpp
	src/corelib/thread/qmutex.cpp
	src/platformsupport/fontdatabases/windows/windows.pri
	src/plugins/platforms/eglfs/eglfsdeviceintegration.pro
	tests/auto/corelib/io/io.pro

Change-Id: I8a27e0e141454818bba9c433200a4e84a88d147e
2017-03-13 15:55:44 +01:00
Ulf Hermann
d6330a19b2 Use QT_CONFIG(library) instead of QT_NO_LIBRARY
For the windows file system engine, we add an extra macro to use
library loading if configured to do so, but avoid it on WinRT, as
none of the symbols would be found.

We also QT_REQUIRE_CONFIG(library) in the library headers and
exclude the sources from the build if library loading is disabled.
This, in turn, makes it necessary to clean up some header inclusions.

Change-Id: I2b152cb5b47a2658996b6f4702b038536a5704ec
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
2017-03-06 11:27:20 +00:00
Marc Mutz
593a707ba3 Remove unused QDBusConnectionPrivate::checkReplyForDelivery()
It's referenced nowhere, and wasn't even implemented.

Change-Id: I3c43c4733f82f98f2af451460270b519474be6ed
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-03-01 21:07:14 +00:00
Liang Qi
dd756011da Merge remote-tracking branch 'origin/5.8' into 5.9
Conflicts:
	configure.json
	mkspecs/win32-icc/qmake.conf

Change-Id: Ibf40546b024d644c7d9ed490bee15b82597f4d3f
2017-02-08 15:49:18 +01:00
Marc Mutz
dbc3d8e15e Unbreak ubsan developer-build
Clang 3.8's undefined-behavior sanitizer checks that the
declared type of the object is a base class of the
dynamic type of the object on each access to a member
of a class type.

It therefore requires the typeinfo for these types,
which for polymorphic types is emitted in the TU where
the vtable is emitted, too.

QDBusConnectionPrivate is a polymorphic non-exported class,
so this failed at link-time. Ditto for the other case.

Fix by autotest-exporting the classes.

Also, where applicable, de-inline the dtors, so the
vtable (and typeinfo) are pinned to one TU, and the
ctor, just because it's the correct thing to do.

Change-Id: I991f81f88d2a48e85d94d9f3ac61473c0b7056d3
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-02-07 08:32:53 +00:00
Alexander Volkov
0e168f2c4e Use nullptr in qDBusRegisterMetaType
... to make user code buildable with gcc [-Werror=zero-as-null-pointer-constant].

Change-Id: Ifef52e406c1f7d5a260612ec27922d1805aea6e2
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
2017-02-03 20:24:45 +00:00
Liang Qi
318b58562a Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	.qmake.conf
	mkspecs/common/msvc-desktop.conf
	mkspecs/common/msvc-version.conf
	mkspecs/common/winrt_winphone/qmake.conf
	mkspecs/features/mac/default_post.prf
	mkspecs/features/mac/sdk.prf
	mkspecs/features/qt.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/winrt/default_pre.prf
	mkspecs/winphone-arm-msvc2013/qmake.conf
	mkspecs/winphone-x86-msvc2013/qmake.conf
	mkspecs/winrt-arm-msvc2013/qmake.conf
	mkspecs/winrt-x64-msvc2013/qmake.conf
	mkspecs/winrt-x86-msvc2013/qmake.conf
	qmake/generators/win32/msvc_vcproj.cpp
	src/gui/kernel/qwindowsysteminterface.cpp
	src/network/kernel/qhostaddress.cpp
	src/plugins/platforms/mirclient/qmirclientplugin.cpp
	src/plugins/platforms/mirclient/qmirclientplugin.h
	src/widgets/util/qsystemtrayicon.cpp
	tests/auto/widgets/itemviews/qlistview/tst_qlistview.cpp
	tools/configure/Makefile.mingw
	tools/configure/Makefile.win32

Done-with: Jake Petroules <jake.petroules@qt.io>
Done-with: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
Change-Id: I4be3262d3994e11929d3b1ded2c3379783797dbe
2017-01-25 20:06:06 +01:00
Liang Qi
00935bf8c2 Merge remote-tracking branch 'origin/5.8.0' into 5.8
Conflicts:
	src/gui/painting/qcoregraphics.mm

Change-Id: I4d49535cd75f2cdf0151c1dbff312cce5e159760
2017-01-14 22:02:55 +01:00
Alexander Volkov
dcec1420ea Use QString::asprintf(), QStringBuilder, and the multi-arg overload of QString::arg()
... instead of sequential .arg(const QString &) callings.
It saves memory allocations and prevents unexpected results
if replacing strings contain place markers.
Found with clazy's qstring-arg check.

Change-Id: I3912275a6e11c6fb7559ff5623f2e8cde9b7f07a
Reviewed-by: Anton Kudryavtsev <antkudr@mail.ru>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2017-01-12 17:54:28 +00:00
Thiago Macieira
9449325f2b Partially revert "Windows: stop using _beginthreadex on regular builds"
This pertially reverts commit 3ec57107ce
and brings back the hack to prevent the DLL from being unloaded. It
should have been enough, but we've got reports that it's still causing
trouble. Since it causes not much harm to keep the DLL loaded (worst
case scenario is that QtDBus and QtCore remain loaded after a plugin
gets unloaded), we'll keep it.

Note: Microsoft is aware that their way of killing threads on process
exit is a flaw. See https://blogs.msdn.microsoft.com/oldnewthing/20070502-00/?p=27023/

Task-number: QTBUG-53031
Change-Id: I2962773739e34633b033fffd1493dce695b008c0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Maurice Kalinowski <maurice.kalinowski@qt.io>
2017-01-03 13:28:24 +00:00
Albert Astals Cid
59ae55e12e Q_ENUMS -> Q_ENUM and Q_FLAGS -> Q_FLAG
Change-Id: I3cdc7338354da40ab20bdaeb9d5745264ea27228
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>
2017-01-02 10:31:25 +00:00
Robert Griebl
f55db6738b Silence bogus whitespace "errors" from the DBus XML parser
Any amount of whitespace between elements is now reported as an error
starting with 5.8. This is (a) wrong and (b) very confusing for users.

Change-Id: I2530b2138f95912e5be07e94b7d7fdab49dedbb1
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Lars Knoll <lars.knoll@qt.io>
2017-01-02 07:56:29 +00:00
Liang Qi
6755ec891a Merge remote-tracking branch 'origin/5.8' into dev
Conflicts:
	configure
	qmake/Makefile.unix.macos
	qmake/Makefile.unix.win32
	qmake/generators/win32/msvc_vcproj.cpp
	src/3rdparty/pcre/qt_attribution.json
	src/corelib/io/qsettings.cpp
	src/corelib/kernel/qdeadlinetimer.cpp
	src/platformsupport/kmsconvenience/qkmsdevice.cpp
	src/platformsupport/kmsconvenience/qkmsdevice_p.h
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms/qeglfskmsgbmscreen.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldeviceintegration.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_egldevice/qeglfskmsegldevicescreen.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsdevice.cpp
	src/plugins/platforms/eglfs/deviceintegration/eglfs_kms_support/qeglfskmsscreen.h
	tests/manual/qstorageinfo/printvolumes.cpp
	tools/configure/configureapp.cpp

Change-Id: Ibaabcc8e965c44926f9fb018466e8b132b8df49e
2016-12-13 09:39:20 +01:00
Jesus Fernandez
3c4febf557 Fix using 0 as null pointer
Fixes: error: zero as null pointer constant.

Change-Id: I850d51075263dac6dd135d3cadc136cbd08b40ab
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2016-12-06 15:32:26 +00:00
Liang Qi
d7e4980132 Merge remote-tracking branch 'origin/5.8' into dev
Blacklist tst_QMenuBar::taskQTBUG46812_doNotLeaveMenubarHighlighted() on macOS.

Conflicts:
	mkspecs/features/mac/default_post.prf
	mkspecs/features/mac/sdk.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/sdk.prf
	src/angle/src/libEGL/libEGL.pro
	src/platformsupport/fontdatabases/fontdatabases.pro
	src/platformsupport/platformsupport.pro
	src/plugins/platforms/cocoa/qnswindowdelegate.mm
	src/plugins/platforms/direct2d/qwindowsdirect2dintegration.cpp
	src/plugins/platforms/ios/ios.pro
	src/plugins/platforms/ios/kernel.pro
	tests/auto/widgets/widgets/qmenubar/BLACKLIST
	tests/auto/widgets/widgets/qmenubar/tst_qmenubar.cpp

Task-number: QTBUG-56853
Change-Id: If58785210feee3550892fc7768cce90e75a2416c
2016-11-02 09:24:11 +01:00
Liang Qi
a732576a66 Merge remote-tracking branch 'origin/5.7' into 5.8
Conflicts:
	config.tests/win/msvc_version.cpp
	configure.pri
	mkspecs/macx-ios-clang/features/default_post.prf
	mkspecs/macx-ios-clang/features/resolve_config.prf
	mkspecs/features/uikit/default_post.prf
	mkspecs/features/uikit/resolve_config.prf
	src/corelib/io/qsettings_mac.cpp
	src/corelib/json/qjsondocument.cpp
	src/plugins/platforms/cocoa/qcocoawindow.h
	src/plugins/platforms/cocoa/qcocoawindow.mm
	src/plugins/platforms/cocoa/qnswindowdelegate.h
	src/plugins/platforms/cocoa/qnswindowdelegate.mm
	src/plugins/platforms/ios/ios.pro
	src/plugins/platforms/ios/kernel.pro
	src/plugins/platforms/ios/qiosintegration.h
	src/plugins/platforms/minimalegl/qminimaleglintegration.cpp
	tests/auto/gui/painting/qpainter/tst_qpainter.cpp
	tools/configure/environment.cpp

Change-Id: I654845e54e40f5951fb78aab349ca667e9f27843
2016-11-01 06:02:55 +01:00