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>
And generate a few more test projects that were missing.
Change-Id: I5df51106549aa5ae09bc3c42360e14b143719547
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Use pro2cmake with '--api-version 2' to force regenerate
projects to use the new prefixed qt_foo APIs.
Change-Id: I055c4837860319e93aaa6b09d646dda4fc2a4069
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
And name the main class QList. That's also the one we document.
This gives less porting pain for our users, and a lot less churn
in our API, as we use QList in Qt 5 in 95% of our API.
In addition, it gives more consistent naming with QStringList and
QByteArrayList and disambiguates QList vs QVector(2|3|4)D.
Fixes: QTBUG-84468
Change-Id: I3cba9d1d3179969d8bf9320b31be2230d021d1a9
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
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>
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>
We did some changes in the .cpp files of some tests when converting
the build system to CMake, but didn't adjust the .pro files which
caused tests to fail when doing a qmake build.
Make the required changes. Was discovered when doing a test
wip/cmake -> dev merge.
Change-Id: I407a982412cb44df592a38a4cb997968bdfe3304
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
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>
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>
This is part of the migration of qtbase from QRexExp to
QRegularExpression.
Task-number: QTBUG-72587
Change-Id: I47a047e27432c874b47bd25581806e1bc156e94f
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
This is needed to make sure the output directory is in the correct
place somewhere under tests, rather than in $prefix/bin.
Change-Id: I98afa9c0a7517a8a10866b4c626bd4c4d2fd214f
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Reviewed-by: Leander Beernaert <leander.beernaert@qt.io>
Reviewed-by: Qt CMake Build Bot
This show cases the new cleaner subdirs handling code in
pro2cmake.
Change-Id: I25001942ef020e4c4191b355f55309c4fb033ecc
Reviewed-by: Qt CMake Build Bot
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Fix target name for qdbushmarshall and fix missing include paths and
unresolved symbols.
Change-Id: I770e190e33d1de9b9d95ee92e63d868e2337c322
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
These tests have not failed on the removed platforms for at least 60 days
Task-number: QTBUG-76608
Change-Id: If7a9f4db907124e3cd54e3f4b0ad3e20717d1912
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Compile the binaries where they are expected not in builddir/bin
Change-Id: I5c9461424a4b3f9fb7f39f5b9d3cd9b96887cfbc
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
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>
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>
[ChangeLog][qmake] A new feature "cmdline" was added that implies
"CONFIG += console" and "CONFIG -= app_bundle".
Task-number: QTBUG-27079
Change-Id: I6e52b07c9341c904bb1424fc717057432f9360e1
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@gmx.de>
All the binaries now end up in bin/ and since the two qmyservers used
for testing dbus have slightly different implementations we need both,
so rename one to qmyserver_qdbusinterface
Change-Id: I1db1aa8f96f35c6ca41254295e2477c35f915850
Reviewed-by: Kevin Funk <kevin.funk@kdab.com>
Since the code wants pinger_interface.h as include
name and the qt_create_qdbusxml2cpp_command function was
using the filename as source for the next filename i introduced
a new option DBUS_ADAPTOR_BASENAME/DBUS_INTERFACE_BASENAME to set the
name of the resulting file
Change-Id: I582d578b68275e4530e91a88631ae43fd1ae06fd
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
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>
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>
Use QTRY_COMPARE instead of a wait followed by QCOMPARE. Unless the condition
doesn't change and the wait provides the opportunity for things to go wrong.
Task-number: QTBUG-63992
Change-Id: I13474a45f1f4df9d77a418729a5748235ae0dd1a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Reviewed-by: Gatis Paeglis <gatis.paeglis@qt.io>
Remove BLACKLIST files which are no longer valid because the mentioned
CI systems are no longer active:
- opensuse-13.1
- opensuse-42.1
- rhel-7.1
- rhel-7.2
- rhel-7.3
- ubuntu-14.04
or the testcases are no longer available:
- QTBUG_14292_filesystem in qactiongroup
Change-Id: I80a4397059fafba169096440fdc07d45c76a1ed8
Reviewed-by: Frederik Gladhorn <frederik.gladhorn@qt.io>
The peer Tests for QDBusAbstractAdaptor are so flaky that it's
very difficult to get any commits through to qtbase.
Task-number: QTBUG-66216
Change-Id: I8da80f71aa832e683f72129cb2d4785425d39c00
Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
Reviewed-by: Sami Nurmenniemi <sami.nurmenniemi@qt.io>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
Also drops a few instances where the dependency was purely runtime,
especially for examples.
Change-Id: I2a0476f79928143596bdb3b8f01193af90574ae8
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io>
This is the result of running the (experimental) clang-tidy check
qt-modernize-qsharedpointer-create
Discarded changes:
- tst_qsharedpointer.cpp: not sure we want these replacements there
(→ separate change)
- tst_collations.cpp: hit in a template specialization that is
instantiated with both QSharedPointer and QSharedDataPointer.
Change-Id: I203c2646e91d026735d923473af3d151d19e3820
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
There was only one place that needed it.
Change-Id: I067fcfe299b34ab6a771fffd14bf2945f1953d10
Reviewed-by: Simon Hausmann <simon.hausmann@qt.io>
Reviewed-by: Olivier Goffart (Woboq GmbH) <ogoffart@woboq.com>