Courtesy of readability-static-accessed-through-instance
Amends: b2a766a79a
Round #2: This time done with Qt Creator's Analyzer, which
found other occurences than run-clang-tidy.py
Change-Id: I479e280c7abcf2d24baccbb0af69ae4bda05198e
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
readability-make-member-function-const finds lots of member functions
that could be made const. This change just picks getter functions that
really should be const.
readability-convert-member-functions-to-static finds non-static member
functions which do not access this. This change turns most of them
into static ones, but leaves some non static to keep the class API
consistent.
readability-static-accessed-through-instance fixes the places where
the originally non-static, now static functions were called through
instance.
Change-Id: I8cf16c01f7988a7c9d073b5f8ede6a9706b94fb0
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
QVector is a typedef to QList in Qt6 so cdb reports vector types as
QList<T>
Change-Id: Ic1940bc9e3286906c42d29a9c29882b5b3699312
Reviewed-by: hjk <hjk@qt.io>
QStringList is a typedef in qt 6 so cdb reports the type as
QList<QString> now.
Change-Id: I9660935dfb26a2a765411acdec1a3478357040fe
Reviewed-by: hjk <hjk@qt.io>
Essentially removing the parts that are gone in Qt6
Task-number: QTCREATORBUG-24098
Change-Id: I49f7ed8ea8e568803850bd4a0118b690248013af
Reviewed-by: David Schulz <david.schulz@qt.io>
For the CPlusPlus target the target sources contain
"$<TARGET_OBJECTS:3rd_cplusplus>" with older CMake versions.
Looks like that was fixed in CMake 3.14.
Work around it by removing TARGET_OBJECT entries, which we definitely
don't want.
Change-Id: I036720f122aa2d0727e85b611f1e32c65fae57ae
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
This is a completely new structure, also effective order when
iterating is completely different.
QHashIterator doesn't work yet.
Task-number: QTCREATORBUG-24098
Change-Id: I917cacf7952d9d54a31d14a0691213ab944d0d8f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Parts of QC cannot be linked against a release build of clangTooling
libs and vice versa when building on Windows.
Check whether the provided libs match the current build mode and
disable respective parts if necessary.
Re-use this information to decide whether unittest should be build
or not.
Change-Id: Ibc2aab0d7886e78ebbf8f15a43152efad49f1eff
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
... in cases where it appears that clang_annotateTokens() did not do
what we wanted.
Fixes: QTCREATORBUG-21522
Change-Id: I272061cb6c4b51a5d779ace5b4e06912c0a386e5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
No implicit casts from QString to QFileInfo anymore, and a few more
QChar(int) fixes.
Task-number: QTCREATORBUG-24098
Change-Id: I3326fc0701a9259c7bdd2d8c3025de0a4774f8aa
Reviewed-by: hjk <hjk@qt.io>
45.3 is represented as 45.28125 in Qt 5, but as 45.3125 in Qt 6.
Actually an improvement.
Task-number: QTCREATORBUG-24098
Change-Id: I779bfd8a2b4a2ae91f5e40dbe54ba75000531f4c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Chicken out of the QStringList == QList<QString> in Qt 6 dilemma
by using QList<QString> everywhere, that's not important for the
QMap test. value/key vs first/second nevertheless needs adaptation.
Task-number: QTCREATORBUG-24098
Task-number: QTCREATORBUG-23806
Change-Id: I4bdb8222978de7e7f1596be380e0fedc8f9d1a06
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
Clang++ 11 has __cpp_constexpr_in_decltype
Change-Id: I450a79f2af8cd6aca51b95b11b3c06b9682c0418
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
To be able to do this, the parser needs to store the decl specifier list
in FunctionDeclaratorAST objects, the same way it is done for
FunctionDefinitionAST.
Task-number: QTCREATORBUG-24894
Change-Id: I475fb08b1f14c63f3050d72dff200c1b08df5789
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
The code was pushing an additional QFutureInterface through the whole
chain of functions, which was used for canceling. But since it was never
started (and never finished, and never used for reporting results),
calling waitForFinshed on it never had any effect with Qt5 and locks up
with Qt6.
Instead of using a separate QFutureInterface, use the actual QFuture
that is available and intended for it.
Fixes: QTCREATORBUG-24902
Change-Id: I5a49bcecc9cf70fbffa93aee4293004f9369df58
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
The type-id in an alias declaration can also define a new type.
Change-Id: I65dc397d2526c56334676c6ab522564f6748d594
Task-number: QTCREATORBUG-24875
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
... to the function type.
This fixes the issue for function *definitions*. For function
*declarations*, we need to amend the parser.
Task-number: QTCREATORBUG-24894
Change-Id: I02043d8b974c2c64dcd739c7e05ce44fd277b5d3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Static member functions cannot modify the object and therefore must not
be reported as writable references.
Note that this does not have an effect yet, as the function type lacks
information about the "static" specifier.
Task-number: QTCREATORBUG-24894
Change-Id: Ib04a17864a0ca5b7610579a2f5efbcfde257e08a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Avoid fail to link when using Qt5.15.1 and MSVC 2017.
Change-Id: Ief4edce7490c4828c46033c7a055acb6173c94e1
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
... from those without one, and display the former like write accesses.
Task-number: QTCREATORBUG-24894
Change-Id: I5e2d83b2a3ec4735054441c346687f97eeb039fb
Reviewed-by: André Hartmann <aha_1980@gmx.de>
These were falsely categorized as string literals. No one ever noticed,
because highlighting information for string literals was ignored until
baf25e4cdb.
Change-Id: Ib59fde04359aecb6da3995de1a9febbbf41b12c8
Reviewed-by: David Schulz <david.schulz@qt.io>
Has to fixed later or removed completely.
Change-Id: I3a62b4ecde60f6877164e994e664f7b015b9d3fc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>