Qt Creator due to the usage of CMake File-API was already requiring
CMake 3.14.
Qt 6.7 now requires CMake version 3.16, thus the version requirement
bump.
Note that Qt SDK is shipping CMake version 3.27.
Fixes: QTCREATORBUG-31079
Change-Id: Ife26d178b80949941cb808a1fbd91389d6d723bc
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Replace the current license disclaimer in files by
a SPDX-License-Identifier.
Task-number: QTBUG-67283
Change-Id: I708fd1f9f2b73d60f57cc3568646929117825813
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Builds now, but does not link (which is fine). And unrelated,
unintentional warnings were removed.
Change-Id: I6ece33933bc20e6e36fb3859de7c2b774b0e67d5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Explicitly cast to bool since that seems to be the intention.
Fixes: QTBUG-90607
Change-Id: Ic7debcc6af4415af6288aa1739bd602dbca0e251
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Prevent mingw from trying to #include_next a private header from a path
we cannot add to our list of includes.
Fixes: QTCREATORBUG-24251
Task-number: QTCREATORBUG-24027
Change-Id: I18a9db130b9c2265cd208c3506d08d2e1c4cee45
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
We override the Q_PROPERTY macro in our own header. This appears to have
two effects:
1) The macro arguments are properly highlighted.
2) There is no completion from libclang for Q_PROPERTY, meaning our
own helpful snippet is the only completion candidate.
I don't understand the reason for either of these; they seem to be more
or less random effects of parsing peculiarities.
As it turns out, our macro redefinition breaks if the type of the
property is based on a template class, leading to false errors in the
code model. Removing our macro redefinition fixes the code model, but
also removes the aforementioned effects. Turning the macro into a
variadic macro fixes the code model and keeps effect 1), but not effect
2). Therefore, we also update the snippet to provide an extra string
that makes it clear this it's a helpful snippt, rather than just a
normal completion.
Fixes: QTCREATORBUG-24243
Change-Id: I4044d5e633af3ebdba36032d5efd3333b5a36214
Reviewed-by: David Schulz <david.schulz@qt.io>
...as it's easier to generate a compile_commands.json with it as with
qmake.
Change-Id: I415b4d1d3d6d1d55c4d086c6dbbbca532c2c8669
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
With this change ClangCodeModel only needs to sort completions by prefix.
Also some other optimization have become possible and are implemented here:
1. Getting completions after '{' for constructor overloads by replacing
it with '(' inside usaved file.
2. Checking for all overloads requires only previous item check because
all Class completions are already sorted to go before all CXXConstructor
completions. Since they are not mixed no extra search is required.
Change-Id: Ie0187ad96a20857a63c1d71ddec74606b803f572
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
Color types and enable Ctrl+click for the functions
and types inside SIGNAL/SLOT macros.
Change-Id: Ic1c0b7372fe9a73c5607b1973d75a6656c75ef0e
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
* Remove unneeded #include that might lead to false diagnostics
* Fix typo
Change-Id: I38a3bbe07dbcb33f004c7b7a2a4ca4a90fb77350
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
...otherwise not all intended diagnostics can be demonstrated.
Change-Id: I2f69862cc6c8a2e58059d9075ad6fd7c7e72b4a5
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
The infrastructure around Q_PROPERTY extraction
allows to make it static assert and still find
it's parent.
This way makes it easier for Clang to parse
and does not provide unexisting functions for class.
Change-Id: I1c40550c72d214c2448169094a46c6f793132f23
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
For some reason did not work properly with include guards
before #include_next.
Change-Id: I4a314c0e4ff29487904e2daa64362c3e2a3e1859
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Transform Q_PROPERTY into unique AST node.
Mark different parts with types and search for parent
in FullTokenInfos.
Change-Id: Iaa1ec0c73d34773edf5605d3682bd6a290d195de
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
For the CONFIG+=no_keywords case, Q_SLOTS expanded to the undefined
"slots".
Task-number: QTCREATORBUG-17371
Change-Id: I7891e4b0595647aa02c97c9f80d61f3f5459a61a
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
More precisely, free us from specific Q_MOC_RUN/QT_NO_META_MACROS code
paths in QtCore/qobjectdefs.h.
In order to track signals and slots we provided custom definitions of
e.g. "Q_SIGNAL" by including qt5-qobjectdefs-injected.h with "-include".
We also had to ensure that those macros were not overwritten by Qt's
qobjectdefs.h, which we did by defining QT_NO_META_MACROS. However, this
came with a cost: we needed to replicate all the other macro definitions
in the Q_MOC_RUN/QT_NO_META_MACROS code path, e.g. Q_INTERFACES. This
bound us to specific versions of qobjectdefs.h and occasionally we had
to adapt (see change 4eafa2e02b).
The new approach wraps Qt's qobjectdefs.h with the help of
"include_next". In the wrapper header, we only redefine what is
necessary.
The "include_next" directive is originally a GNU extension. Clang seems
to support it unconditionally, as [1] implicitly states.
[1] http://clang.llvm.org/docs/LanguageExtensions.html#include-file-checking-macros
Change-Id: Ic1a263f94b178349cb32bfdbb074ad5e6e0761ee
Reviewed-by: Christian Kandeler <christian.kandeler@theqtcompany.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@theqtcompany.com>
Q_ENUM() and Q_FLAG() were added in Qt 5.5.0.
This fixes among others red/wiggly underlines of these macro's uses.
Change-Id: I059ebcc32cc271f4960b11e722e23c314c5ceac7
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>