Commit Graph

67787 Commits

Author SHA1 Message Date
Vikas Pachdha
f77d1df624 AssetExport: Delay the load signal from view
Aparantly the QML file is not completely loaded when model is attached

Change-Id: If8c342c057a1cd33b6f7510bbf9f56a1f3369961
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-19 12:28:29 +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
Marco Bubke
ce942bd33c Sqlite: Extend error handling
We do only handled errors for the v1 interface. Now we handle much more.
Sadly this is hard to test, so there are no tests.

Change-Id: I6f55dc1bad744776bb33a6d0d6c71e52d2f097f6
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-19 09:07:41 +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
Vikas Pachdha
1b6a0a290b AssetExporter: Let user select files to export
Refine asset exporter dialog. Add progress bar, export notification,
path chooser and other small UI changes

Task-number: QDS-1560
Change-Id: Iaba61575581171e7e1495ebfaf2e345546fb7400
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-18 19:20:26 +00:00
Vikas Pachdha
7f1b286264 AssetExporter: Add import notification task
Task-number: QDS-1560
Change-Id: I09c14c22206c299f7a50f1a843c6dc4ebac670e2
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2020-06-18 19:20:07 +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
Tim Jenssen
e1e7a1786f qmldebug: add DebugTranslation
If the used Qt does not provide this service it will
be automatically ignored.

Change-Id: I2f07751c579b13d37349384d9150da9c1c13f092
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-18 13:11:36 +00:00
Tim Jenssen
52316578f8 qml: introduce QmlMultiLanguageAspect
This aspect is only available if the special multilanguage
plugin is available.
Translation changes in that plugin changes this aspect,
which results in environment variables which activate the use
of a multilanguage created sqlite to provide the translations.

Change-Id: I38250b69165eb7ec3e4f82dc34b3cc4ba0a33f8f
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-18 13:02:37 +00:00
Tim Jenssen
aaf51d1cfb qmldesigner: no need to call it two times
Change-Id: Ib25f65bdc182fefa14f88a21154a6d3481c9716f
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-18 12:38:24 +00:00
Tim Jenssen
2ed7a7963e qmldesigner: block local changes while initialization
- emit after the initialization
 - emit only if found languages are differrent

Change-Id: I4f426b7bf055ef1d97e5db86bba075a032210303
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2020-06-18 12:37:53 +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
Eike Ziller
1b431fe271 Move Id from Core to Utils
And add a compatibility wrapper for Core::Id, so we don't have to rename
all occurrences from Core::Id to Utils::Id.

This allows us to use Id also in Utils, which makes it possible to e.g.
move Core::InfoBar to Utils without work arounds.

Change-Id: I5555d05b4e52f09d501dbfe5d91252a982a97c61
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-06-18 05:58:23 +00:00
Orgad Shaneh
5ebe34a332 VCS: Add vcsDescribe
Already exists in all implementations, but there was no common declaration.

Change-Id: Ieb3d10d1936c207722b5001712bce41e8114dcdc
Reviewed-by: André Hartmann <aha_1980@gmx.de>
2020-06-18 05:17:59 +00:00