Commit Graph

64672 Commits

Author SHA1 Message Date
Orgad Shaneh
92a4c0d38a VCS: Pass links to the correct VCS
Current implementation requires each VCS to connect to the referenceClicked
signal. Only Git does it, but this is conceptually wrong. If other VCSs
would connect to the same signal, all of them will act upon clicking a
link, which can result in multiple editors, most of them are likely to be
invalid anyway.

By default executes vcsDescribe. Can be extended or modified by subclasses.

Change-Id: Ib953009efd77446a4b2963f0aa8a2f3f3d26509f
Reviewed-by: Artur Shepilko <artur.shepilko@nomadbyte.com>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-06-21 06:47:20 +00:00
Christian Kandeler
cb0b8556c8 ClangTools: Fix qbs build
Amends 6e798401a0.

Change-Id: I3e2225ec9e6145594479c8f7dfdd09f867d7ad02
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-19 14:51:09 +00:00
hjk
b7862ae453 LSP: Fix and simplify log size restriction logic
Do not subtract from unsigned (size) values.
Amends d15d15efa2.

Change-Id: I9a8b09d3733b49ea646ae8a14caefcf5c908fad3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-19 14:03:03 +00:00
Nikolai Kosjar
8cb74f88f9 ClangTools: Use resource dir from tool instead of hard-coded one
This makes it more likely that using other clang-tidy and clazy binaries
than the ones shipped with Qt Creator will work.

Done-with: Nikolai Kosjar
Fixes: QTCREATORBUG-23672
Change-Id: I8c44e037ca8d50505fe10032034edaf4f408d52c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-19 13:11:53 +00:00
Christian Stenger
119a3c1ce9 LanguageClient: Replace QRegexp by QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: Ic8259ded3f721957bd04aa00146b20bd90b41dcd
Reviewed-by: hjk <hjk@qt.io>
2020-06-19 12:48:54 +00:00
Christian Stenger
e817100b9c Utils: Replace some QRegExp to QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: I7d12992506bbe33306c0ab750f73c7db1626abc3
Reviewed-by: hjk <hjk@qt.io>
2020-06-19 12:30:01 +00:00
Christian Stenger
f9be969c10 Utils: Replace QRegExp by QRegularExpression
..inside the template engine.

Task-number: QTCREATORBUG-24098
Change-Id: I9a1190eda4e57d36f8be750604796849ed672537
Reviewed-by: hjk <hjk@qt.io>
2020-06-19 12:29:36 +00:00
Christian Stenger
f82b96107f Qnx: Replace QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: Ic32313d8879b6497209196b0e3e4846c00c9846a
Reviewed-by: hjk <hjk@qt.io>
2020-06-19 12:29:06 +00:00
Christian Stenger
788926d624 QmlProjectManager: Replace QRegExp by QRegularExpression
While at it modernize a bit.

Task-number: QTCREATORBUG-24098
Change-Id: I5787466333e40e6e9bd3d9c77dc6267fffb970f8
Reviewed-by: hjk <hjk@qt.io>
2020-06-19 12:28:48 +00:00
Christian Stenger
26a9f4a214 SCXMLEditor: Remove unused includes
Change-Id: Ia2d76b0f7749686636589bde9c4bcbd9b52f39d4
Reviewed-by: hjk <hjk@qt.io>
2020-06-19 12:28:34 +00:00
hjk
c9a7a3a2d3 Beautifier: Remove inner namespace level
And inline non-shared object id.

I regularly stumble over this speciality when doing mass refactorings
in the code base and I believe the extra benefit this namespace level
has does not outweigh it.

Change-Id: I3694a656f1095dcb5509b212b9e1d25ae5c8b5ec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-19 11:42:10 +00:00
Eike Ziller
e064100007 CMake build: Set LSMinimumSystemVersion on macOS
Setting it to CMAKE_OSX_DEPLOYMENT_TARGET if that is set
(either via cmake directly, or, as we do for the packages,
by setting the MACOSX_DEPLOYMENT_TARGET environment variable).

Fixes: QTCREATORBUG-22466
Change-Id: I7378bc32be6d66cf4e4b1eac1530c89159e74804
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-19 11:22:05 +00:00
Christian Kandeler
b9413bcec7 Cpp: Fix leaks in ClangCodeModel tests
Change-Id: I19d4dc445d82fd24361f1eb752d9f35ccadd3efb
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-19 11:19:42 +00:00
hjk
ae2cc246c3 Debugger: Remove some uses of QRegExp
Change-Id: Ie5bd429468ac0e68fb48f4916d143b5812f54d77
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-19 11:15:14 +00:00
Christian Stenger
a285f773e3 Core: Replace QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: I7a492d262dba80a5249076678b4e0b237f7cf154
Reviewed-by: hjk <hjk@qt.io>
2020-06-19 10:49:39 +00:00
Christian Stenger
281ec36ad8 Debugger: Replace some QRegExp with QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: I34b8ebee3d58fb724c963098d988fc1955b2d010
Reviewed-by: hjk <hjk@qt.io>
2020-06-19 10:49:23 +00:00
hjk
7dfa4acfb7 App: Restrict use of Qt::AA_DisableWindowContextHelpButton to Qt 5
Gone afterwards.

Change-Id: I8c7009658844a5979b144c108736055ed11bec05
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-19 10:25:22 +00:00
hjk
3ec4afff0e Remove uses QOverload<const QString &>::of(&QComboBox::currentIndexChanged)
Gone in Qt 6.

Task-number: QTCREATORBUG-24098
Change-Id: I7ab2dcb9b7c71a3b0d07f05162ef2752e02dc881
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-19 09:32:55 +00:00
Christian Kandeler
f9a5ad4d3c ClangBackEnd: Adapt skipped source ranges from libclang
... so that the first #if is not grayed out.

Fixes: QTCREATORBUG-23714
Change-Id: Ia014fd8cd768ea9530567ba8c712bdc0c4063091
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-19 09:14:24 +00:00
Christian Kandeler
176fbc1698 CppEditor: Fix build with Qt < 5.14
Change-Id: Ie08a7c0d19fff60b91b1855f7177813776542ef4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-19 08:40:10 +00:00
Christian Kandeler
38a156c5a4 CppEditor: Better highlighting for raw string literals
It can be rather difficult to see the actual content of a raw string
literal among all the clutter. Let us help the user by highlighting the
string differently from the delimiter.

Fixes: QTCREATORBUG-19119
Change-Id: I14447d62a686d82a2f2e123786a9b0eec16a0fa2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2020-06-19 07:28:52 +00:00
hjk
54575fe42d QmlJS: More Qt6
Mostly QRegExp, one QHash::unite.

Change-Id: Ia2816fee65b9459c0f89419161f44c38cd572c36
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-19 07:13:06 +00:00
hjk
9ba3fb11f5 Modeling: More Qt6
Forward declarations for items in QList are not sufficient for moc anymore.

Task-number: QTCREATORBUG-24098
Change-Id: I537b9fbd4fb0b95937a051fdc0c7f106a6c8cd65
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-19 07:01:24 +00:00
hjk
9f2401d0db Handle various versions for QAbstractSocket::SocketError{Occurred}
I don't think it's worthwhile to put that in some header, it's only
four occurrences.

Task-number: QTCREATORBUG-24098
Change-Id: Ic4e505f264a5d9970d8be1071c849d2bb3389746
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-19 06:14:01 +00:00
Orgad Shaneh
6cfd240285 OutputWindow: Do not activate links for empty reference
Change-Id: I1d4fc0f25f1882a34058c66c51376982cc70238e
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-18 16:52:03 +00:00
hjk
c7b0940977 Modeling: Compile with Qt 6
Implicitly included header was removed.

Change-Id: Ib96242b11a17261c755124a2355c757cc5ec41bd
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-18 16:40:35 +00:00
Christian Stenger
cb28cf8949 AutoTest: Fix crash on shutdown
Amends b402215daf.

Change-Id: I4b5812af6e1ad86e5ddaaa20483a226f0a5c6036
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-18 16:01:22 +00:00
Tobias Hunger
b321f54186 CMake: Update log output of CMake Project Importer
Change-Id: I18c6890ecad58d6e078492af30c5509d9db766f9
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-18 14:13:56 +00:00
Tobias Hunger
054f5617f8 CMake: Make import of build directories using Qt 6 work
Make import of build directories using Qt 6 work. This assumes that
Qt 6 will use the same layout as Qt 5 and that there is qmake (which
is assumed everywhere in Creator right now).

Change-Id: I37194b186127befb3df32ebacf86c032c71ef18a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2020-06-18 14:13:43 +00:00
hjk
faf9c883f2 Utils: Disable the QVector overloads in algorithm in Qt 6
Not the QList one.

Change-Id: I05ad3401b8d3abf3ee413ed518574b4362502996
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-18 14:01:39 +00:00
hjk
dd9519b1c4 Debugger: Remove QLinkedList occurrences from manual tests
And restrict the auto test to Qt<6.

Task-number: QTCREATORBUG-24098
Change-Id: Idfbe94bc1a4b2d5a8c23a07a031520775bb17cd3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-18 13:41:56 +00:00
hjk
da829f3fe7 FakeVim: Use QStringView instead of QStringRef
QStringRef will not exist in Qt 6.

Change-Id: I439240fbb4c87fbe71c9fa42596c9aaadb75a05e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-18 13:35:17 +00:00
Christian Kandeler
a0764603d0 CppTools: Also look up definitions for variables
... not just functions.
This includes global variables and static members.

Fixes: QTCREATORBUG-18828
Change-Id: Iee9f83a4f955a859c6fc4038c61997b30afdaec8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-18 12:02:00 +00:00
hjk
e34416a966 LSP: Make parseContentLength Qt6-friendly
Task-number: QTCREATORBUG-24098
Change-Id: I8123690b9739aa7ffdb5ba7e596030f85ad6da8a
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-06-18 11:55:21 +00:00
hjk
d15d15efa2 LSP: Remove a use of QLinkedList
Task-number: QTCREATORBUG-24098
Change-Id: Ia043284fa57e74ae1ca5f2aef6c3c363b0ca0715
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-06-18 11:53:25 +00:00
Alessandro Portale
d3f85ee409 ads: Remove redundant occurrences of "virtual"
As suggested by clang-tidy's "modernize-use-override" check and to match
Qt Creator's coding guidelines.

Change-Id: I2cfef113e21a0cd44d18a5b98e9bc8427563c53a
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-18 11:42:14 +00:00
Christian Stenger
0795d5f42d Core: Replace some QRegExp by QRegularExpression
Task-number: QTCREATORBUG-24098
Change-Id: I25d90bfdb0c07cea0c076ad7b9f04886d751600a
Reviewed-by: hjk <hjk@qt.io>
2020-06-18 11:26:06 +00:00
Christian Stenger
b402215daf AutoTest: Cache expanded state as well
Parsing may end up with incomplete information when parsing documents
that are currently edited and contain syntax errors due to
incomplete changes.
This resulted in not re-adding all items which in turn led to lose
also its expanded state when re-adding it in a later successful parse.
Avoid the need to expand manually again and again by caching the
expanded state for a couple of re-parses.

Change-Id: I2994b9c7ab56c0c76f416d10247e68dea271cd10
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-06-18 11:24:36 +00:00
hjk
ad5443395d Modeling: Add missing #include for Qt6
Task-number: QTCREATORBUG-24098
Change-Id: I89ec3ea02e2ec03fe370692a2ff4b5bc70e82615
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-06-18 11:20:19 +00:00
hjk
b54d4e5f65 Remove uses of QRegularExpression::OptimizeOnFirstUsageOption
Deprecated, and declared to have no effect for Qt >= 5.12.

Task-number: QTCREATORBUG-24098
Change-Id: I11067b8e2ae40ff1f1dd4de92a734a40d2eae556
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-18 11:19:54 +00:00
hjk
21b11236d0 Tracing: Replace QLinkedList
Task-number: QTCREATORBUG-24098
Change-Id: I45e2f5c310b7094e02bd1a5d31caef6c164c4c57
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2020-06-18 11:19:29 +00:00
Alessandro Portale
e1ce36362d PathListDialog: Retain original dir separators
When editing the "Path" variable on Windows, the PathListDialog
currently returns the path with all '\\' dir separators turned
into '/'. Such conversion makes sense for the "Add ..." operation
but should not be enforced for all paths.

Or in other words: Do it like EnvironmentWidget does.

This change removes conversion of the separators of all paths.

Task-number: QTCREATORBUG-24213
Change-Id: Icab1bdc190e55e8f5724a93b7cd14b08e4c68829
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2020-06-18 09:45:54 +00:00
Leena Miettinen
80b04b8248 Doc: Describe designing application flows in Design mode
Fixes: QDS-1541
Change-Id: I8b4c83f6548414063670303d2d83e7dd5f93d0d8
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-18 09:35:59 +00:00
hjk
938f81c601 More Qt 6 porting
Task-number: QTCREATORBUG-24098
Change-Id: I8d118e75021996127344e75dffe263cebd95a5b8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-18 09:12:12 +00:00
Christian Kandeler
8eac3fba80 CPlusPlus: Fix lexer crash
At some point in the preprocessing stage, some tokens get "squeezed", so
their associated string no longer refers to the document content, but
only to their own symbol. However, there is at least one context that
operated under the assumption that the token's offset still pointed into
the "global" string. As the token's offset is zero after parsing, this
lead to the same piece of code being preprocessed in an infinite loop.

Fixes: QTCREATORBUG-19525
Change-Id: I231ba51811cfa0b5c6dfe7f75fe0384472252c6f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-18 07:52:02 +00:00
Christian Stenger
1b8c68f617 AutoTest: Restore former check state on reparse
When reparsing while modifying a file it can happen that
the parse failed for some reason or did not provide full
information due to syntax errors the code model cannot cope
with.
This in turn can purge items from the test tree. Re-adding
the items in a later reparse had just added the item and
did not take care of (former) check states.
Add simple caching mechanism to keep track of check states
and use them if available.

Task-number: QTCREATORBUG-24099
Change-Id: I3ca04f5fd58810df71582972e6fe96a00cfc48f1
Reviewed-by: David Schulz <david.schulz@qt.io>
2020-06-18 07:49:59 +00:00
hjk
1c9194d2eb Debugger: Make QByteArray, QString and QList dumper work with Qt dev
Note that this is more a temporary workaround as there are more changes
to come (qsizetype instead of int for sizes, switch QList/QVector
aliasing).

Task-number: QTCREATORBUG-23806
Change-Id: Ic815fe293b1c4922276c127dec61930dc365acae
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2020-06-18 07:48:59 +00:00
Orgad Shaneh
3f3b56f3a7 Apply QLibrary::ExportExternalSymbolsHint only on macOS
It crashes on Debian with Qt 5.12.

Amends commit 7379a5ac52.

Change-Id: I4278833da797474eb2d0abba2185f40a709870b7
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2020-06-18 06:56:40 +00:00
Eike Ziller
7c5ed6f7d9 Move InfoBar to Utils
The only reason it was required to be in Core plugin, was its use of Id,
which now is available in Utils.

Change-Id: I66ce863c24924e6448d339b3422538a7fe167336
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2020-06-18 06:39:54 +00:00
Orgad Shaneh
c70c6ded30 IncrediBuild: Fix uic warning about duplicate widget name
Change-Id: I465c6f3b734fdfbb3bec606f6bed0cc937039a74
Reviewed-by: <or.kunst@incredibuild.com>
Reviewed-by: hjk <hjk@qt.io>
2020-06-18 06:09:10 +00:00