Commit Graph

752 Commits

Author SHA1 Message Date
Andreas Eliasson
b57e023b3b Doc: Revise Qt dbus module landing page
Move some of the detailed information into its own overview page and
reorganize the contents structure. Also, escape the _ character.

Task-number: QTBUG-100369
Pick-to: 6.3
Change-Id: I396877912bed66537e4a97ee3d109ff92e15d843
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2022-04-25 13:42:19 +00:00
Sona Kurazyan
9662c7da8f QtDBus: replace remaining uses of QLatin1String with QLatin1StringView
Task-number: QTBUG-98434
Change-Id: I733af3126f126e5025f709cfe023b9f6bbc13e3e
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-04-12 11:48:08 +02:00
Sona Kurazyan
e9e43bff29 QtDBus: use _L1 for for creating Latin-1 string literals
Task-number: QTBUG-98434
Change-Id: I99d9a82c77d00124ea8953b98406959f1bf9413a
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
2022-04-12 11:48:08 +02:00
Sona Kurazyan
6e77d2a10c QtDBus: stop using QLatin1Char constructor for creating char literals
Required for porting away from QLatin1Char/QLatin1String in scope of
QTBUG-98434.

Change-Id: I48e2946c4cc8d0a6c3e0cc37e1f73510b878d574
Reviewed-by: Marc Mutz <marc.mutz@qt.io>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-04-12 11:48:07 +02:00
Marc Mutz
360f3de390 QtDBus: optimize handling of isDebugging
This is part of a series of patches deprecating implicit conversions
of QAtomic<T> variables to T.

Use relaxed atomic loads and stores on the 'isDebugging' variable. The
old code used the implict conversions to and from int and therefore
loadAcquire/storeRelease. Here, the int is the only value, it's not
guarding the construction of any other data, so relaxed loads and
stores suffice.

A further optimization would be to make the initial value of
isDebugging 0, to send it into the BSS instead of the TEXT/DATA
segment, but seeing as this is just compiled in for the auto-tests,
this patch leaves that particular change for another round (or never).

Pick-to: 6.3
Change-Id: Ide92f6c1a12137fcbc3ec15e146f6dcbdb6b481b
Reviewed-by: David Faure <david.faure@kdab.com>
2022-04-03 16:18:43 +02:00
Marc Mutz
e4186b2b28 QtDBus: sweep Q_DECLARE_METATYPE → QT_DECL_METATYPE_EXTERN
It's one of our best tools to improve compile times.

Can't backport to Qt 6.3 or 6.2 because this change introduces new
exported symbols.

Task-number: QTBUG-102206
Change-Id: Iae9d4017a984c845a76d0b9b088ad3e467fe1d54
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2022-04-03 16:18:43 +02:00
Marc Mutz
32692667a6 Apply Q_CONSTINIT across the codebase
Still not complete. Just grepping for static and thread_local.

Task-number: QTBUG-100486
Change-Id: I90ca14e8db3a95590ecde5f89924cf6fcc9755a3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-03-29 06:18:49 +01:00
Marc Mutz
80b6bcc385 Short live Q_CONSTINIT!
It expands to the first available of

- constinit (C++20)
- [[clang::require_constant_initialization]] (Clang)
- __constinit (GCC >= 10)

Use it around the code (on and near static QBasicAtomic; this patch
makes no attempt to find all statics in qtbase).

[ChangeLog][QtCore][QtGlobal] Added macro Q_CONSTINIT.

Fixes: QTBUG-100484
Change-Id: I11e0363a7acb3464476859d12ec7f94319d82be7
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-26 17:15:02 +01:00
Fabian Kosmale
468e9c13a9 Misc: Do not depend on transitive includes
As a drive-by, remove superfluous includes from qnetworkmanagerservice.h
and obey the coding conventions for includes in a few more places.

Change-Id: I65b68c0cef7598d06a125e97637040392d4be9ff
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-03-17 17:14:37 +01:00
Marc Mutz
870bb22c17 QtDBus: compile-optimize inline swap functions
Instead of using the overly-generic qSwap() monster, use

- qt_ptr_swap() for swapping raw pointers
- member-swap for swapping smart pointers and owning containers
- std::swap() for swapping scalars

In QtCore, this has proven to give a nice reduction in compile time
for Qt users, cf. b1b0c2970e.

Pick-to: 6.3 6.2
Task-number: QTBUG-97601
Change-Id: I2cb0dd3cef3a2923e7d08bb9d93c692308797e5b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-03-17 07:15:01 +01:00
Mårten Nordheim
6eda249402 Fix deprecated use of QBA/Q*String::count
'Use size() or length() instead'

Change-Id: I284fce29727c4c1ec9ea38a4e8ea13a9e0af5390
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2022-03-15 20:18:56 +01:00
Topi Reinio
b0d106267c Doc: Fix erraneous auto-link on Qt D-Bus landing page
QDoc interprets a sequence of special characters as something to auto-
link to; Escape the underscore character to prevent this.

Fixes: QTBUG-100562
Pick-to: 6.3
Change-Id: I61a10d7ea6878ef93197b0d329e16b8867d8ad30
Reviewed-by: Venugopal Shivashankar <Venugopal.Shivashankar@qt.io>
2022-03-11 20:15:48 +01:00
Alexandru Croitor
1559cd8ff2 CMake: Document source file properties
Pick-to: 6.2 6.3
Task-number: QTBUG-100224
Change-Id: Id4d0e0d84762d9eee2beb10e850d1775ad4f3245
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Jörg Bornemann <joerg.bornemann@qt.io>
2022-02-15 15:44:51 +01:00
Andreas Eliasson
5cd8d217b4 Doc: Fix minor grammar issues in qtdbus-index
Task-number: QTBUG-100369
Pick-to: 6.3
Change-Id: Id224b7838b49934b46f00ea44c67aa1c201648d6
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2022-02-09 15:17:53 +01:00
Marc Mutz
c3c2a0f754 QDBusAdaptorConnector: place a static int into BSS instead of DATA
The cachedRelaySlotMethodIndex started out as -1, assuming no slot
could have that index.

But 0 is just as good a marker, because we know that method index 0
will be one of QObject's (destroyed() or deleteLater()).

So start out with a zero initial value, which means the variable can
be placed in the BSS segment now and doesn't need to be stored in
DATA.

Pick-to: 6.3 6.2
Change-Id: I40b96d54f11e60348f465cafa15af98d41038c95
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-02-05 03:23:33 +01:00
Joerg Bornemann
0ad8dd4805 Doc: State Qt versions for when CMake commands etc. were introduced
Introduce the qdoc macros \cmakecommandsince, \cmakepropertysince, and
\cmakevariablesince that insert a paragraph akin to the \since context
command.

Example:
    \cmakecommandsince 6.3
produces the paragraph
    This command was introduced in Qt 6.3

The macro text is wrapped in \n\n to ensure that we always generate a
new paragraph.

Pick-to: 6.2 6.3
Task-number: QTBUG-100212
Change-Id: Id5c8e8812e6b0b915674d108a0e775091e9eacd8
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2022-02-01 16:51:01 +01:00
Marc Mutz
f29566c5a4 Prevent repeated instantiations of some qRegisterNormalizedMetaType<>s [1/N] (QtGui)
Create macros that wrap the magic developed in
7d63efc16f and apply it to all
Q_DECLARE_METATYPE invocations that show up in Clang -ftime-trace for
a PCH'ed QtGui build.

Effects on compile times:

Clang 10 -ftme-trace:

  $ ClangBuildAnalyzer --analyze qtgui-before.trace  | head -n6
  Analyzing build trace from 'qtgui-before.trace'...
  **** Time summary:
  Compilation (523 times):
    Parsing (frontend):          628.3 s
    Codegen & opts (backend):    304.5 s

  $ ClangBuildAnalyzer --analyze qtgui-after.trace  | head -n6
  Analyzing build trace from 'qtgui-after.trace'...
  **** Time summary:
  Compilation (523 times):
    Parsing (frontend):          546.0 s
    Codegen & opts (backend):    304.4 s

GCC 11 time (bash builtin):

before:

  $ time for ((i=0; i < 3; ++i)) do touch src/gui/painting/qpolygon.h ; ninja libQt6Gui.so; done

  real    4m13,539s
  user    49m24,416s
  sys     3m18,177s

after:

  $ time for ((i=0; i < 3; ++i)) do touch src/gui/painting/qpolygon.h ; ninja libQt6Gui.so; done

  real    3m55,697s
  user    45m19,941s
  sys     3m7,370s

Task-number: QTBUG-97601
Pick-to: 6.3
Change-Id: Ia8e37a58937568a7ed21cfeb4b27274deca4d53b
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2022-01-21 11:22:35 +00:00
Marc Mutz
a5229a57ef QDBusMessage: de-inline createReply(QVariant)
The building of the QList has percolated to the top of the lists of
most expensive template instantiations in Clang -ftime-trace PCH
builds of libQt6Gui.so:

  **** Templates that took longest to instantiate:
    7137 ms: QList<QVariant>::operator<< (260 times, avg 27 ms)
    7115 ms: QList<QVariant>::append (263 times, avg 27 ms)
    7071 ms: QList<QVariant>::emplaceBack<const QVariant &> (256 times, avg 27 ms)
    6651 ms: QtPrivate::QMovableArrayOps<QVariant>::emplace<const QVariant &> (256 times, avg 25 ms)
    [...]
    5649 ms: QArrayDataPointer<QVariant>::detachAndGrow (256 times, avg 22 ms)
    [...]
    4668 ms: QArrayDataPointer<QVariant>::reallocateAndGrow (256 times, avg 18 ms)

Task-number: QTBUG-97601
Pick-to: 6.3
Change-Id: Ib766e70e4f741e057f9032bf232160cf6e83f4b9
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2022-01-19 07:18:40 +01:00
Kai Köhne
b34be3868b Doc: Use find_package(Qt6 REQUIRED COMPONENTS ...) idiom
Using REQUIRED as a prefix instead of suffix works better with
OPTIONAL_COMPONENTS, and is also the order in the CMake manual.

Task-number: QTBUG-98867
Pick-to: 6.2
Change-Id: I1ab68408b95d8edf06272a3b9fceccd8d8e597fc
Reviewed-by: Alexey Edelev <alexey.edelev@qt.io>
2021-12-09 22:20:04 +01:00
Venugopal Shivashankar
f9e6ee655f Doc: Fix qdoc warnings
In addition, added the missing warninglimit
entry to a few doc configs.

Change-Id: I51b9d2ad66123a2a9673a3b42870662641375e6b
Reviewed-by: Timur Pocheptsov <timur.pocheptsov@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-11-11 11:34:49 +01:00
Jonas Kvinge
071ebc9eee dbus: Fix typos
Pick-to: 5.15 6.2
Change-Id: I9efce6a3163ca6564d511c994776ff96999909b4
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-10-14 20:22:21 +02:00
Topi Reinio
b836098179 Doc: Fix usage of \summary macro
The macro takes only one parameter, sentences must be wrapped in {}.

Pick-to: 6.2
Fixes: QTBUG-97441
Change-Id: I7177548a32a67d720c2b551d16c09d898b0fda51
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-10-12 14:08:08 +02:00
Kai Köhne
214afbdddf Doc: Make it explicit when CMake API is defined
Task-number: QTBUG-96239
Pick-to: 6.2
Change-Id: Iaa99024f98f5422aa39f148a89594186b40344bf
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-10-05 15:48:22 +02:00
Kai Köhne
e0ecb0ded2 Doc: Add overview pages to CMake API
So far the pages were only 'rooted' in the separate qtcmake
documentation. Let them have a page per module too, so that
it's easy to navigate.

At the same time rename the cmake-macros-qtcore group to
cmake-commands-qtcore. This will require a fixup in qtdoc
repository.

Pick-to: 6.2
Change-Id: Ifc09b27a6c220b5feab64686ca47c60d3342e71a
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-10-04 15:55:10 +02:00
Kai Köhne
23125b3f01 Doc: Add summary to CMake commands
For normal \page elements, \brief is just showing in the
\generatelist or \annotatedlist commands. Make sure the description
is also visible in the actual CMake command/variable/property
page by defining a \summary macro.

Pick-to: 6.2
Change-Id: I12bc854d547059a2f6309a5922bb0b2a36d4e41c
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2021-10-04 15:55:10 +02:00
Giuseppe D'Angelo
b32698b3a9 DBus: do not mix QList iterators and raw pointers
In Qt 5, QVector::iterator was actually a raw pointer. In Qt 6,
QVector = QList, and QList::iterator isn't a pointer, but converts
to one (for backwards compatibility).

Some code in QtDBus exploits this by mixing iterators and raw
pointers. In preparation for deprecating conversions between them,
adjust this code by "converting" explicitly when needed.

Change-Id: I1efab72b33d27742b339cf848cefd5cc258cd215
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-09-20 19:21:53 +02:00
Craig Scott
fa9f13f130 Handle empty string args for versionless wrappers of dbus CMake commands
CMake silently drops empty list items when passing ${someVar} to a
function unquoted. The versionless wrapper functions typically use
${ARGV} or ${ARGN} to pass through arguments from the caller to the
versioned implementation, but this doesn't preserve empty arguments.
For qt_add_dbus_adaptor() in particular, this was problematic because
that meant arguments after the empty arg effectively "moved left" and
were interpreted as the wrong arguments.

Use named arguments and pass through each one explicitly for the
qt_add_dbus_adaptor(). This takes advantage of the implementation of
the versioned function, which also checks each optional positional
argument explicitly. We can only do this because we know the upper
bound on the number of arguments, so it is possible to represent each
argument with its own variable. A more general solution that didn't
need to know the number of arguments would require the
cmake_language(EVAL) command, but that requires CMake 3.18 or later.

Fixes: QTBUG-96594
Pick-to: 6.2
Change-Id: Ibb1de19217191768ca5ead969b20a1d28c466868
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-09-20 14:23:14 +10:00
Kai Köhne
6faa6cb1d7 Doc: Add version and description to Qt-DBus documentation
This makes sure that the Qt version is part of the HTML title.

Pick-to: 6.2
Change-Id: I2ad8535a9289616d21c18bd9e92d4a91f6faced0
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2021-09-17 17:54:09 +02:00
Craig Scott
a37789e493 Revert "Ensure versionless wrappers do not introduce a new variable scope"
This reverts commit 08180e76e6.

Macros add another level of escaping that functions do not. The
conversion of the versionless wrappers to macros may alter the
behavior, so revert that change.

Task-number: QTBUG-96219
Pick-to: 6.2
Change-Id: Ic5dcff3081123d957888584ba1d76ae0580d9083
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-09-06 23:56:28 +10:00
Craig Scott
08180e76e6 Ensure versionless wrappers do not introduce a new variable scope
Using function instead of macro prevented the wrappers from being able
to pass back any variables set in the wrapped function. In some cases,
these variables were being explicitly passed back to the caller, but
that isn't needed if you just make each wrapper a macro. This also
makes things more future-proof because any newly introduced output
variables will work without having to update the wrappers.

Task-number: QTBUG-96121
Pick-to: 6.2
Change-Id: Ic4486de668694c06b47e466587b2cdcb969ea047
Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
2021-08-31 17:05:15 +10:00
David Faure
531b913f61 qdbuscpp2xml: add support for custom types with a new -t option
qdbuscpp2xml can't know about custom types registered with
qDBusRegisterMetaType<> in the server application whose header file
it's parsing. So add support for custom types using a command line
argument. For example:
    qdbuscpp2xml -t 'std::vector<Person>=a{ssss}' peopleserver.h
which generates
    <arg name="people" type="a{ssss}" direction="in"/>
    <annotation name="org.qtproject.QtDBus.QtTypeName.In0" value="std::vector&lt;Person&gt;"/>

[ChangeLog][QtDBus][qdbuscpp2xml] Added a -t option to specify how to
handle custom types.

Change-Id: Ic0cad4f4eec8d5dfa48055c3a46cc772b1a60174
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-08-25 01:03:54 +02:00
David Faure
cf34fca4d0 QDBus: fix ExportScriptableInvokables to allow calling scriptable invokables
The "wantedMask" check in the xml generator didn't distinguish slots
from invokables, so exporting an object with just ExportScriptableInvokables
didn't allow calling Q_SCRIPTABLE methods.

Change-Id: I7b408755da5b28e67a9384d9df95e22dc5de2369
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-08-23 23:07:30 +02:00
Joerg Bornemann
c3308b13ca Doc: Add global \versionlessCMakeCommandsNote qdoc macro
When documenting a CMake command, document the unversioned command
'qt_foo' and use '\versionlessCMakeCommandNote qt6_foo' to refer to the
versioned command.  This avoids duplicating the command signature.

Use the new macro where applicable.

Pick-to: 6.2
Task-number: QTBUG-95796
Change-Id: I2e4180fbda0b89acf3d8c036459f591eb2f46475
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-08-23 13:06:27 +02:00
Marc Mutz
ebee8a1336 QDBusMarshaller: fix -Wformat-overflow
Says GCC:

qdbusmarshaller.cpp: In member function ‘QDBusMarshaller* QDBusMarshaller::beginMap(QMetaType, QMetaType)’:
qdbusmarshaller.cpp:286:17: warning: ‘%s’ directive argument is null [-Wformat-overflow=]
  286 |         qWarning("QDBusMarshaller: type `%s' (%d) is not registered with D-BUS. "
      |                 ^

Fix by manual checking. It's a False Positive, because
QString::asprintf() can handle nullptr strings just find, but let's
make GCC happy.

Since the code snippet appears multiple times, even though GCC only
warns about one of them, take this opportunity to factor the code out
into a cold helper function.

Change-Id: I1d642f2465f34b670b179646185cba05cb16e573
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-07-08 01:49:26 +02:00
Alexey Edelev
b10e4e846e Migrate to autogenerated cpp exports
Replace the hardcoded cpp exports with a generated one where it's
applicable.

Task-number: QTBUG-90492
Change-Id: Idc160b594987b2c765e75bd669aae851b4366282
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2021-06-25 19:33:12 +02:00
David Faure
831aea1ce1 qdbus: add support for "aay" (QByteArrayList)
(I wish these common mappings were centralized though, so that
annotations in the XML file wouldn't be needed)

Pick-to: 6.0 6.1 5.15
Change-Id: Ie3e8731e44b6e0338c8a044408c34160cf0a3a1e
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2021-05-02 22:00:43 +02:00
Andreas Buhr
dd24b61d35 Port QDBusServiceWatcher::watchedServices to bindable properties
Fixes: QTBUG-92993
Change-Id: I379c67c75bc536e387889de5303b01aef9399fcd
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
2021-04-28 16:59:53 +02:00
Andreas Buhr
97a8727f0e Port of QDBusServiceWatcher::watchMode to new property system
Port watchMode in QDBusServiceWatcher to the new property
system. This is the easiest part.

Task-number: QTBUG-85520
Change-Id: I588212af205e77765862b8fecdbdcbf871717142
Reviewed-by: Ivan Solovev <ivan.solovev@qt.io>
Reviewed-by: Sona Kurazyan <sona.kurazyan@qt.io>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2021-04-19 15:18:46 +02:00
Fabian Kosmale
cb43aaca11 Introduce QMetaObject::metaType
This function returns the metatype corresponding to the metaobject, or
an invalid metatype for namespaces.

This works as follows: First we increment the metaobject revision for
new metaobjects. Metaobjects with older revisions are handled by doing a
lookup by name. That fallback is also used for dynamic metaobjects (from
QtDBUS and those created by QMetaObjectBuilder).
For new metaobjects, we store the metatype in its metatype array, behind
the property metatypes. This avoids any changes to the property and
method metatype extraction logic: For properties, the metatype access
does not change, as the new metatype is after their metatypes. For
method metatypes, we already have an indirection layer (using offsets),
so by adjusting those offsets by one, the same logic keeps working.

To distinguish between namespaces and dynamic metaobjects, namespaces
store the metatypeinterface pointer for void in the metatype array,
whereas dynamic metaobjects store a nullptr.

One nice additional benefit is that this simplifies the generator logic
in moc, as the metatype array is now never empty.

Task-number: QTBUG-92077
Change-Id: Id3f920f28553f12032a71a1a87dad29e5374dbe7
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Andrei Golubev <andrei.golubev@qt.io>
2021-03-25 17:33:07 +01:00
Paul Wicking
5fa8f5df7b Doc: Change section titles that cause bad links
Section titles are valid targets for QDoc's autolinker. When
they are identical to other valid link targets, such as for
example a class, these sections may cause invalid links.

Pick-to: 6.0 6.1
Fixes: QTBUG-91141
Change-Id: Ie9a6258d2bf83932335976d8c0b5fc59f2028ae5
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
2021-03-11 15:01:35 +01:00
Nico Vertriest
3fa50b7b41 Doc: Fix warnings about wrong snippet path or missing .pro file
Task-number: QTBUG-91147
Change-Id: I6a55b2b713dd70cf1cbb0b93a8d4152e175e2c4d
Reviewed-by: Topi Reiniö <topi.reinio@qt.io>
2021-02-19 14:04:21 +01:00
Alex Blasche
9828559a3d Several fixes to porting guides
Change-Id: I46b1754103d33d21e6cdeb338e3c6e3b0d0a4e29
Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>
2021-02-10 10:39:06 +01:00
Joerg Bornemann
04f11f9935 Remove .prev_CMakeLists.txt files
Those serve no purpose anymore, now that the .pro files are gone.

Task-number: QTBUG-88742
Change-Id: I39943327b8c9871785b58e9973e4e7602371793e
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-01-12 20:59:13 +01:00
David Skoland
9e09677c1d Remove QtDBus includes
Per the discussion of QTBUG-88831, we determined that module-wide
imports are unfortunate, especially for compile times. Following this,
all QtDBus includes have been replaced with the headers for the classes
actually used in each file. Additionally, some cleanup of header file
order and format has been performed in the changed files.

Pick-to: 6.0
Change-Id: I62c1b75682a48422f0ba1168dd5d7bd0952808ac
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io>
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
2021-01-12 09:19:27 +01:00
Joerg Bornemann
ad2da2d27a Remove the qmake project files
Remove the qmake project files for most of Qt.

Leave the qmake project files for examples, because we still test those
in the CI to ensure qmake does not regress.

Also leave the qmake project files for utils and other minor parts that
lack CMake project files.

Task-number: QTBUG-88742
Change-Id: I6cdf059e6204816f617f9624f3ea9822703f73cc
Reviewed-by: Edward Welbourne <edward.welbourne@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Kai Koehne <kai.koehne@qt.io>
2021-01-07 15:32:28 +01:00
Marc Mutz
105a66e654 Use (new) erase()/erase_if() algorithms
Change-Id: I45c18fd45c20b226e44d16315e3ebb6c305d4ab0
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-12-05 00:47:44 +01:00
Kai Koehne
130b209014 Doc: Use explicit linkage with target_link_libraries
The Professional CMake book suggests always using explicit linkage with
target_link_libraries, so let's use that.

Whether to use PUBLIC or PRIVATE depends on the context. But let's
be conservative and advise on using PRIVATE by default.

Task-number: QTBUG-88935
Pick-to: 6.0
Change-Id: I12b80ee85be9f6916f1e4dea6b1c9cb29e03c20f
Reviewed-by: Craig Scott <craig.scott@qt.io>
Reviewed-by: Alexandru Croitor <alexandru.croitor@qt.io>
2020-11-30 05:39:21 +01:00
Giuseppe D'Angelo
612a01be65 Deprecate QScopedPointer::take()
We've decided that QScopedPointer shouldn't be movable,
because it would break the semantics of being "scoped"
(the pointer/pointee won't survive the scope).

Then, QScopedPointer shouldn't allow for take() either.
If you need those semantics, reach for unique_ptr.

[ChangeLog][QtCore][QScopedPointer] The take() function
has been deprecated. This was an API mistake, as it
allowed the pointer/pointee to escape from the scope,
defeating the point of the QScopedPointer class. If you
need such semantics, use std::unique_ptr (and call
release()).

Change-Id: I3236f085f763b04eb98e3242abc06f7c54fb3d8b
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-20 14:28:31 +01:00
Robert Griebl
2fab1971fe Fix memory corruption in QDBusInterface signal emissions
If more than one signal parameter required conversions (e.g. 2
QVariantMaps), then the auxParameter list would be reallocated on the
second append. This resulted in the reference to the first conversion
(stored in params) to be broken.

Found with valgrind after the QtApplicationManager started crashing
weirdly when built against Qt 6. The same code is in Qt 5, but it
just works fine there: I guess the reallocation strategy in QList is
different there, so we never have to reallocate the list.

Change-Id: I2e0c8906ebc9474c4ec9f53cafc1689003d5c4c5
Reviewed-by: Thiago Macieira <thiago.macieira@intel.com>
2020-11-19 12:28:44 +01:00
Jerome Pasion
d4b3989818 Update landing pages and module pages in qtbase
-Qt SQL, Qt D-BUS, Qt GUI, Qt OpenGL, Qt Widgets,
 Qt Test, Qt Concurrent, Qt XML, Qt Network, Qt Core
-language edits for consistency, add links

Task-number: QTBUG-87155
Change-Id: Ic61350c9fa15090c802a42d8e9116219591eba73
Reviewed-by: Paul Wicking <paul.wicking@qt.io>
2020-11-17 20:16:12 +01:00