Commit Graph

29 Commits

Author SHA1 Message Date
Cristian Adam
36e84b1c54 Doc/Wizards: Update minimum CMake version to 3.16
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>
2024-06-19 08:12:41 +00:00
hjk
e678da9934 Require C++20
Change-Id: Id6581a4c32ec6411195edb51339f017e4ddb51ff
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2024-02-22 11:22:09 +00:00
Kai Köhne
4e9c1d126c Replace GPL-3.0 with GPL-3.0-only
GPL-3.0 is deprecated by SPDX.

Change done by

 find . -type f -exec perl -pi -e 's/LicenseRef-Qt-Commercial OR GPL-3.0(?!-)/LicenseRef-Qt-Commercial OR GPL-3.0-only/g' {} \;

Change-Id: If316a498e3f27d2030b86d4e7743b3237ce09939
Reviewed-by: Lucie Gerard <lucie.gerard@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-01-10 08:05:04 +00:00
Lucie Gérard
a7956df3ca Use SPDX license identifiers
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>
2022-08-26 12:27:18 +00:00
Alessandro Portale
08535a7e63 Make share/qtcreator/cplusplus/examples compilable
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>
2022-02-04 16:21:21 +00:00
Mitch Curtis
1ef0eba378 Fix Q_PROPERTY warning
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>
2021-06-14 13:41:09 +00:00
Christian Kandeler
64bec2205b C++: Add source file to test icon support
Task-number: QTCREATORBUG-21867
Change-Id: Ie167608257bb8b7d268a05f1935d77659a075dc1
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-08 08:42:32 +00:00
Christian Kandeler
782ca5d8d8 Clang: Fix error when including float.h with mingw
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>
2020-07-09 17:24:16 +00:00
Christian Kandeler
53b4d6975d C++: Fix highlighting Q_PROPERTY with template types
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>
2020-07-08 14:41:11 +00:00
Nikolai Kosjar
3afb348439 Clang: Add cmake project for tidy/clazy demo code
...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>
2019-07-26 09:54:25 +00:00
Nikolai Kosjar
6a74a24f8c Clang: Fix tidy demo file
Revert unintended addition.

Change-Id: I8ee78ee6e59f7fdc29d62df3e720c5c2dd706ada
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-11-26 14:29:21 +00:00
Ivan Donchevskii
efc39304a1 Clang: Move the majority of completion items sorting to ClangBackend
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>
2018-10-02 12:29:23 +00:00
Ivan Donchevskii
ce032552c0 Clang: Support old-style SIGNAL/SLOT macro
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>
2018-05-03 13:34:21 +00:00
Nikolai Kosjar
e5610c6ae2 Clang: Clean up qobjectdefs.h
* Remove unneeded #include that might lead to false diagnostics
* Fix typo

Change-Id: I38a3bbe07dbcb33f004c7b7a2a4ca4a90fb77350
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-11 07:18:21 +00:00
Nikolai Kosjar
bfdcbf861f Clang: Fix parse errors in clazy/tidy demo project
...otherwise not all intended diagnostics can be demonstrated.

Change-Id: I2f69862cc6c8a2e58059d9075ad6fd7c7e72b4a5
Reviewed-by: Ivan Donchevskii <ivan.donchevskii@qt.io>
2018-04-04 08:08:39 +00:00
Ivan Donchevskii
34fec1cad2 Clang: Make Q_PROPERTY replacement simpler
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>
2018-02-23 08:40:33 +00:00
Ivan Donchevskii
c39f28d5e0 Clang: Fix parsing for files which include qobjectdefs.h
For some reason did not work properly with include guards
before #include_next.

Change-Id: I4a314c0e4ff29487904e2daa64362c3e2a3e1859
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-02-20 13:44:00 +00:00
Ivan Donchevskii
1ed7d3c270 Clang: Provide example with clazy warnings
Change-Id: I23cb81d0ffe0d23428ce85ba22d85e1d6c8c1216
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-02-20 06:50:19 +00:00
Ivan Donchevskii
cec807f5c1 Clang: Provide example with a lot of tidy warnings
Change-Id: I6d6d2559bb8e2b6c972e88c3af9ce06968e7c959
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2018-02-20 06:50:12 +00:00
Ivan Donchevskii
66c7629814 Clang: Properly handle Q_PROPERTY in TokenInfo
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>
2018-02-20 06:49:47 +00:00
Nikolai Kosjar
a8f1f758a5 Clang: Fix tagging of slots with CONFIG+=no_keywords
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>
2017-01-03 16:47:12 +00:00
Tobias Hunger
38cce7eb83 Update License according to agreement with Free Qt Foundation
* Update all files in share folder

Change-Id: I8a82c3eb2eb614d4339dd4c4e690f54b5f29d813
Reviewed-by: Alessandro Portale <alessandro.portale@theqtcompany.com>
2016-01-19 16:05:29 +00:00
Nikolai Kosjar
4f7649633c Clang: Free us from specific Qt versions
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>
2015-07-27 13:12:41 +00:00
Nikolai Kosjar
4eafa2e02b Clang: Handle Q_ENUM() and Q_FLAG() in qt5-qobjectdefs-injected.h
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>
2015-06-24 10:09:26 +00:00
Nikolai Kosjar
b7c025a5dd Clang: Respect QT_NO_*KEYWORDS in qt5-qobjectdefs-injected.h
Change-Id: I299db813c13f273a40e447c5fdde8ff8757480ba
Reviewed-by: Marco Bubke <marco.bubke@theqtcompany.com>
2015-06-24 10:09:21 +00:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Robert Loehning
5292748bf2 Incremented year in copyright info
Change-Id: I6e25ba25aa2898b5382dae7f3751deebb6072efa
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-01-09 09:41:23 +01:00
Erik Verbruggen
5beb74fd9d Add experimental clang code-model plug-in.
Previously known as the wip/clang branch.

Contributors (in alphabetical order):
- Christian Kamm <christian.d.kamm@nokia.com>
- Erik Verbruggen <erik.verbruggen@digia.com>
- Leandro Melo <leandro.melo@nokia.com>
- Peter Kuemmel <syntheticpp@gmx.net>
- Sergey Shambir <sergey.shambir.auto@gmail.com>

Change-Id: I4c3ff600a19b6732641c1d5ef28236bf2cc17737
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-12-20 17:05:09 +01:00