Commit Graph

6032 Commits

Author SHA1 Message Date
Eike Ziller
3f0e7bcbe1 Merge remote-tracking branch 'origin/4.14'
Change-Id: I9d1931b7862f4541ac7a064ff987128afd835cbe
2020-12-07 12:29:44 +01:00
hjk
fba5effd41 Debugger: Adapt QMultiMap dumper test to Qt6
Task-number: QTCREATORBUG-24098
Change-Id: Iec811d90accd6fada7883e8bcb548ec0ab4c38f6
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-07 08:56:44 +00:00
hjk
aa9e1ec106 Debugger: Adapt QSet dumper and tests to Qt6
Task-number: QTCREATORBUG-24098
Change-Id: Ib9b2c53ee763871873f0cc3ad4f8ba0152999328
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-07 08:56:39 +00:00
Alessandro Portale
996ad4c8cb PluginManager test: Fix linkage for Qbs build system
Dependency on Utils is not exported by ExtensionSystem, therefore not
transitive.

Amends 41b73594ad

Change-Id: Iaa95ae16854cf760fdd32bc542297746b6351527
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-07 07:14:33 +00:00
hjk
d861778ff1 Debugger: Adapt Qt6 QVariant(QHostAddress) dumper test
Just brush over the differences between the versions, the actual
contents is ok.

Change-Id: I4fe8e1a0e87ab6c4157a048f215b8abb13887cd4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-04 11:40:35 +00:00
Eike Ziller
41b73594ad Add API for saving settings with default value
We should never actually write default values into the settings, because

- if the default value changes in a later Qt Creator version, the new
  default should automatically take effect if the user didn't change the
  value
- it senselessly grows the settings file

Add a QtcSettings class that extends QSettings by a
"setValueWithDefault" method, which does not write default values to the
settings, and actually removes the settingskey if the user switches back
to the default.

Use it at the places where we already do this manually.

Task-number: QTCREATORBUG-24762
Change-Id: Ia76414cb21e8521f3aeed1e37b43ae4fb3393ea3
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-12-04 08:25:17 +00:00
hjk
e62d364d97 Debugger: Adapt QVariantMap dumper and test to Qt 6
Task-number: QTCREATORBUG-24098
Change-Id: I4e157a18ce5ff06a732fccbec1ec3d2ff507b961
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-03 15:22:24 +00:00
Christian Stenger
5ed3357bed Tests: Fix expected type
Amends e6873b5b24. As on it fix handling for key, value
handling for Qt6.

Change-Id: Ie13b02f92fd56d9372150763a2d56df511185baf
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-12-03 14:03:20 +00:00
Eike Ziller
1e78fdb71f Merge remote-tracking branch 'origin/4.14'
Change-Id: Id4c4c06b086dfe38960f4d68694ae23f3e00109f
2020-12-03 11:57:42 +01:00
Christian Kandeler
ff2322ac0b CPlusPlus: Fix mis-classification of pure virtuals
Syntactically, they do have an initializer, but they are not
initializations.

Change-Id: I0556b279ce2d173868585cbce085b803c1cff285
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-03 09:09:52 +00:00
hjk
08a1117c26 Debugger: Extend and fix QPolygon dumper and test for Qt6
Task-number: QTCREATORBUG-24098
Change-Id: Ia2e43d15263e18698d9db6b4d23fa553c7b7ae5b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-02 15:22:35 +00:00
hjk
b1f5bfdd4e Debugger: Fix compilation of manual dumper test with Qt 6
Task-number: QTCREATORBUG-24098
Change-Id: Id835f4d9ac85e701cc57290e686f17a57ee221e2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-02 15:19:40 +00:00
hjk
25a89250f6 Debugger: Adapt QVariant dumper and tests to Qt 6
Task-number: QTCREATORBUG-24098
Change-Id: I9543bad098bb11d21079c1e2711b639bde3873b7
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-02 10:16:33 +00:00
hjk
e1790ed9d0 Debugger: Fix some dumpers with namespaced Qt
This makes the use of '@' prefixes in split('{@QString}'...) etc
mandatory, thereby removing the guessing on whether namespaces apply
or not on the dumper 'core' side, and removes the guessing on
whether dropping the '@' 'works' on the individual dumper implementation
side.

Amends 1074c2ffce.

Change-Id: I44611eb09557638dec12d2e2f78cdaeac0bbd449
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-01 14:59:06 +00:00
Robert Loehning
9a33333849 Test: Debugger: Gui: Compile fix for Qt6
Change-Id: I9c3c4b49e458c16115fead38255cfe197308916b
Reviewed-by: hjk <hjk@qt.io>
2020-12-01 12:26:07 +00:00
Christian Kandeler
990aa5e45b CppTools: Adapt autotest
Amends 370804c2ab.

Change-Id: I054a44948cd4a473ae22284d7669c4a7adb2fc86
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-12-01 10:15:04 +00:00
Eike Ziller
d02afbe6b4 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	src/plugins/projectexplorer/gcctoolchain.cpp

Change-Id: I2136ba89d3aa3c4c2a0e7a4f9d8ba9cec32924ce
2020-11-30 16:14:32 +01:00
Christian Kandeler
aabdbb7d9e clangbackend: More libclang cursor adjustments
Fixes: QTCREATORBUG-21856
Change-Id: I034b463238b4b8da4c36f95cacab79adf94c11eb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-30 11:35:24 +00:00
Alessandro Portale
a3857a996a Don't access static functions/fields via instance
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>
2020-11-27 13:26:07 +00:00
Alessandro Portale
81f3452e1c Aggregation/Utils/ExtensionSystem: Make member functions const/static
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>
2020-11-27 09:16:08 +00:00
David Schulz
f3830c68b1 Debugger: Fix dumper test using QVector
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>
2020-11-26 12:23:10 +00:00
David Schulz
e6873b5b24 Debugger: adjust QStringList dumper test for qt6
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>
2020-11-26 11:21:41 +00:00
Eike Ziller
6172fc8a9d Merge remote-tracking branch 'origin/4.14'
Change-Id: I8543d87779c0da6a876caa046f6852737c9ae680
2020-11-26 10:53:34 +01:00
hjk
0ce92b3ac7 Debugger: Adapt QXmlAttributes dumper to Qt6
Task-number: QTCREATORBUG-24098
Change-Id: I67ee0fae1308d20b474fe0dd565b46d2a83dd5e3
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-26 08:41:23 +00:00
hjk
35c2d51ec9 Debugger: Adapt QDate{,Time} dumper and test to Qt6
Essentially removing the parts that are gone in Qt6

Task-number: QTCREATORBUG-24098
Change-Id: I49f7ed8ea8e568803850bd4a0118b690248013af
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-25 13:06:28 +00:00
Eike Ziller
8245523653 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	src/plugins/designer/cpp/formclasswizard.h
	src/plugins/designer/cpp/formclasswizarddialog.h

Change-Id: I9f9d166e1a9249022305503f9cbe571136c2a2b1
2020-11-25 11:25:34 +01:00
Eike Ziller
eaec56e6b6 cmake build: Fix issue with tests and CMake < 3.14
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>
2020-11-24 09:55:11 +00:00
hjk
56b2158500 Debugger: Adapt QRegion dumper and test to Qt6
Task-number: QTCREATORBUG-24098
Change-Id: Ie9c75c779595a981e75f20e73bfaccb5d24cf16b
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-24 08:52:31 +00:00
hjk
0ede48270f Debygger: Adapt QLazilyAllocated dumper test to Qt 6 changes
Task-number: QTCREATORBUG-24098
Change-Id: Id5dde3089af8bffdc7b8d9ebfaf9e6748257fd9f
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-11-24 08:39:40 +00:00
Christian Kandeler
0d12c8cba8 clangbackend: More cursor adjustments
Fixes: QTCREATORBUG-21534
Change-Id: Ia8a6f277b186bd6decdfec26bfca30b36802c1c2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-23 13:03:34 +00:00
hjk
c80313f777 Debugger: Adapt QHash dumper for Qt6
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>
2020-11-23 12:26:24 +00:00
Christian Stenger
6b62a99a8a cmake: Fix building debug with release libclang
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>
2020-11-23 11:07:49 +00:00
Christian Kandeler
b0dd6b748f clangbackend: Try harder to get the proper cursor
... 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>
2020-11-23 09:59:27 +00:00
Eike Ziller
f534624fce Fix build with newest Qt 6
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>
2020-11-20 15:43:25 +00:00
Eike Ziller
5ca70bdcb3 Merge remote-tracking branch 'origin/4.14'
Change-Id: Iea84f23cf394de13e99a9ed777c8c113e4eff473
2020-11-19 15:38:13 +01:00
Marco Bubke
9b6944086b MultiLanguage: Add image generation for excel export
Change-Id: Ied15381d94c391c86438c66fe88f755421bb3492
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-19 13:22:44 +00:00
hjk
a812bd7303 Debugger: Make qfloat16 dumper test pass with Qt 6
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>
2020-11-19 10:23:27 +00:00
hjk
92cd7f3c06 Debugger: Adapt QMap and QMultiMap dumper to Qt6
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>
2020-11-19 07:24:26 +00:00
Christian Kandeler
7aec256087 QmlDesigner & friends: Fix various new warnings
Change-Id: Ia5e3d47e70e1881e70652f090ccc61543535df4e
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-18 17:05:51 +00:00
Alessandro Portale
a1ff9d170f CppTools: "CLANG-UPGRADE-CHECK: Update known language features macros."
Clang++ 11 has __cpp_constexpr_in_decltype

Change-Id: I450a79f2af8cd6aca51b95b11b3c06b9682c0418
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-18 15:40:15 +00:00
Leander Schulten
2ce783f96d ClangSupport: Remove unused circular includes
Change-Id: I89e54fad34084ef683bb24fa2db7ef858a8b4759
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-11-18 12:53:13 +00:00
Eike Ziller
381c5656e7 Merge remote-tracking branch 'origin/4.14'
Conflicts:
	src/plugins/mesonprojectmanager/project/mesonprojectparser.h

Change-Id: Id38d20ce20981dcdc322fe5d1d7647f4bec89d8a
2020-11-13 16:03:26 +01:00
Christian Kandeler
dc66d30076 CPlusPlus: Support C++11 attributes also for function parameters
Fixes: QTCREATORBUG-24636
Change-Id: I9dc3d2cc6ca102b09f6b040455fa901c362dae7d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-11-12 13:16:34 +00:00
Christian Kandeler
59f8bd4702 CPlusPlus: Expose "static" specifier also for function declarations
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>
2020-11-11 15:41:27 +00:00
Eike Ziller
6d7e5eb8d1 Fix CppProjectUpdater cancelAndWaitForFinished
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>
2020-11-11 12:49:33 +00:00
Marco Bubke
d1d95e78d6 UnitTests: Fix double deletion
Change-Id: Id28f739a3f6b0c200386edf67914886ae06e2999
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-10 14:41:54 +00:00
Marco Bubke
2a2dfbec73 QmlDesigner: Add states to ImageCache
Task-number: QDS-2998
Change-Id: I8e65881181ae1010ef1f8bab92fa71d92c961bcd
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-10 14:35:12 +00:00
Marco Bubke
2ee63af4cd UnitTests: Setup an environment for every test run
So there are no old file an temporary file.

Change-Id: Ida22703b5842b094f9a0f26562cd0908542e044f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-10 14:34:18 +00:00
Marco Bubke
f90bc7fa37 QmlDesigner: Improving SessionChangeSets
Task-number: QDS-2998
Change-Id: I9b559bf593dd968172649d1f6c45fb9fb454f1a5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-10 14:32:39 +00:00
Marco Bubke
c3aad50184 QmlDesigner: Add waitForFinished to ImageCache
Task-number: QDS-2998
Change-Id: I5ffb63b7345a17ccb499db876bb4dbb0a946ed85
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-11-10 14:32:30 +00:00