Commit Graph

62421 Commits

Author SHA1 Message Date
hjk
56520c770c Vcs: Replace findRepositoryForDirectory
By some function findRepositoryForFile operating on any file and
using FilePath.

Change-Id: I91b8aa38b1c6b33993b9b790fbc2ff4d378ad8a8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-07-30 06:24:41 +00:00
Christian Stenger
fe65998351 Utils: Fix readDataFromProcess()
The internal handling of output gets in the way when trying
to read output from a process synchronously.
Make usage of the internal one instead of relying on the
original output handling.

Fixes: QTCREATORBUG-25958
Change-Id: Ie96b5e8d17799a613ff15a52a23a8bdc31cb2939
Reviewed-by: hjk <hjk@qt.io>
2021-07-30 04:49:15 +00:00
Thomas Hartmann
20641caa3a StudioWelcome: Add debug output
Add debug output if download fails.

Change-Id: Icb28aa2ed9f7d7e7fdb9a83fe875cc933af8fa49
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-29 16:12:40 +00:00
hjk
edcedabed9 Vcs: Use FilePath in IVersionControl API
Adapt first level of users.

Change-Id: Ifcd7bff45631ff3b9e26a9e3176daa6cf0cf2e56
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-07-29 13:20:23 +00:00
Orgad Shaneh
69c6c9f7d5 Merge remote-tracking branch 'origin/5.0'
Change-Id: I4ea793c0b2d1980e5ed79bcc985c0f26a4de7aa4
2021-07-29 16:03:09 +03:00
Marco Bubke
b758bb7e50 Sqlite: Make carray bind const
Carray is not changing the pointer so it is fine to use a const pointer.

Change-Id: Iad89666b6f543496e39cfeff17e069feb2002ff5
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-29 12:16:19 +00:00
Marco Bubke
3ed4c8dd05 QmlDesigner: Remove document imports for deleted documents
Task-number: QDS-4724
Change-Id: Ie5ec1788387c224b48380fa0f256b012f2b7dbcf
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-29 12:16:11 +00:00
hjk
3b33a13661 ClangCodeModel: Drop unnecessary use of Q_OBJECT in two tests
Change-Id: I9eae55fa31ff496a54238c962768635dee5c850a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-29 11:48:50 +00:00
Christian Kandeler
c999b6066f ClangCodeModel: Start a fallback clangd for files without a project
These were still being served by the old code model even when clangd
support was enabled.

Change-Id: I5f01b6a7071b90c374750f93435299755cabe3e9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 11:33:45 +00:00
hjk
16e8cc7748 Core: Use FilePath on findDocumentFactory
Change-Id: I0308379c89f49051e8f6e753a91d756a758c5765
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 11:23:24 +00:00
hjk
906cfb060b Core: Use FilePath in some functions related to opening files
Change-Id: I9610855a914d315d7934996c755fb69ad399320f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 11:14:46 +00:00
Christian Kandeler
2e7891bedd CppEditor: Fix possible crash when following typdefs
It's probably also a bug that we don't resolve the identically-named
struct correctly, but at least we don't crash anymore.

Fixes: QTCREATORBUG-26047
Change-Id: I272e76460c87906c9df23aaf7f37953b451bf1a8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 11:12:29 +00:00
Christian Kandeler
e36d54bdd7 QtSupport: Fix moc output parser for Qt 6
Fixes: QTCREATORBUG-25959
Change-Id: Iba03fd31b1759ae99bd6567003b020e8ad35872f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 11:08:09 +00:00
Orgad Shaneh
7fc6af4ad6 ProjectExplorer: Do not generate new directory when original is in-place
If the original configuration is not a shadow build, there is no reason to
generate a new directory name when cloning the configuration.

Change-Id: Ie84ee01ac70c69161e65a0b58cdfbfbe1a1630ab
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-29 10:56:24 +00:00
Orgad Shaneh
b56c872b27 ProjectExplorer: Translate empty shadow directory to source directory
... on recovery, just like it is done when checking the shadow build
checkbox.

When a pro.shared file has empty build directories (because having a path
doesn't make much sense for shared files), the directory remained empty in
the UI, and the shadow build checkbox was checked.

Change-Id: I3930ecd3c3747a8793ae4eea20c3c0d92b0b5848
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-29 10:47:13 +00:00
Christian Kandeler
2798c11d1d CppEditor: Fix switch statement completion
... for the case where the value is retrieved via a call to a template
function whose scope does not include the template type.

Fixes: QTCREATORBUG-25998
Change-Id: Ie33817f445fb53595b783f716093637926297549
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 10:28:14 +00:00
Christian Kandeler
ec9f972355 QtSupport: Use named capture groups in output parsers
The regular expressions are easier to understand this way.

Change-Id: Iae225b0214b12833ae6d6094e70250700a1c0e52
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 10:10:33 +00:00
Christian Kandeler
7657470cc6 QtSupport: De-noise regexes in output parsers a bit
Use raw string literals to reduce the number of backslashes, and remove
unneeded QLatin1String wrappers.

Change-Id: I3b359e238311987d60e0307bad66c9c37f44b777
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 10:10:02 +00:00
Miina Puuronen
2935f79efc QmlDesigner: Change category order in Component Library
Added prefix for Qt Quick categories so "Basic" is sorted on top.
Rest of the categories are sorted alphabetically.

Task-number: QDS-4721
Change-Id: Ibdb1a77b121e2af729b9ec6b2acf5349a361b05b
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-29 09:38:23 +00:00
Christian Kandeler
1b1e18a869 ClangTools: Make sure clazy doc URL corresponds to tool version
Note that this will only work with clazy >= 1.10. For earlier versions,
we fall back to the master branch documentation, as before.

Fixes: QTCREATORBUG-25869
Change-Id: I7a8188eda15c4e0548bfaa63aa90f721aa44d6c2
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 09:28:05 +00:00
Christian Kandeler
c5d080570b CppEditor: Fix moving function definition out of specialized class
Fixes: QTCREATORBUG-25808
Change-Id: I5950c7f66b736c6ee30411e8fdc0356d78faa518
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 09:27:21 +00:00
hjk
b3af1ccd4c Docker: Move container start into function of its own
Change-Id: Id83345895fd2e1e6668def91d8bb3fe39eca4f8c
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-29 08:29:48 +00:00
Orgad Shaneh
cf1377b6fe ProjectExplorer: Remove pointless conversions in cloneConfiguration
Change-Id: I80d48ba726111d18f2ee623efa0f44a1fd6e2654
Reviewed-by: hjk <hjk@qt.io>
2021-07-29 07:27:30 +00:00
Thomas Hartmann
db5cc9f2ca QmlDesigner: If kit has a qml2puppet in bin then use it
If the Qt has a qml2puppet in the bin folder we use it instead of
the fallback puppet.

Task-number: QDS-4548
Change-Id: Ic9a3626f0cb18538ed94b72ff9fce0fa43806597
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2021-07-29 07:17:28 +00:00
Ivan Komissarov
95e3d382cb Update Qbs submodule to the top of 1.20 branch
Change-Id: I229666d4dcf29525e8c2519c17b62054dc0db1d9
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-07-29 07:07:46 +00:00
Thomas Hartmann
58602ec21c QmlDesigner: Add setting for Qt 6 projects
Adding
'qt6Project: true'
to the qmlproject file marks the project as Qt 6 'only'.

Task-number: QDS-4734
Change-Id: Ib9d969fd11d409e280734f9bedf759b40470fc61
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2021-07-27 15:32:29 +00:00
Ivan Komissarov
3df3046e17 Update Qbs submodule to the top of 1.20 branch
Change-Id: I5e5c2bbf711eaa83e447ec40698d333a0000a4b6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-27 15:00:32 +00:00
hjk
4fe21ff7c5 ProjectExplorer: Some code cosmetics
Remove some unnecessary namespace qualifications.

Change-Id: Iff8d2bf4190db5912ee8b7d6e4d3af0404f2c611
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-27 12:09:53 +00:00
hjk
9b250ea2c0 ProjectExplorer: Use FilePath in ProjectExplorer::openProject{,s}()
Change-Id: Ibfb7ab5ef7226b85452bd37b840408708935453b
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-27 11:35:47 +00:00
Henning Gruendl
45fa409e25 QmlDesigner: Fix warnings parameter injection
Fix a couple of warnings regarding parameter injection

Change-Id: Ie4a7c57a735eacb9b864b967f26d48787652de20
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-27 09:30:08 +00:00
Orgad Shaneh
61008441da Merge remote-tracking branch 'origin/5.0'
Change-Id: I9aa7b7a6490e8fb592a0e785a57128d438fdbab5
2021-07-27 11:39:29 +03:00
hjk
764bf7396c Utils: Introduce FilePath::fileSize()
And implement it locally and for docker.

Change-Id: I362f4cae95560836d9300473a286429eb4569329
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-07-27 08:19:43 +00:00
Andre Hartmann
dbc708fe61 Meson: Fix Qt container detach warning
mesonoutputparser.cpp:152:5: c++11 range-loop
might detach Qt container (QStringList) [clazy-range-loop]

Change-Id: I356969ce680d44e248233358d2a3b2bb90544118
Reviewed-by: hjk <hjk@qt.io>
2021-07-27 08:02:14 +00:00
Andre Hartmann
0e8756508c VCS: Clear commit message hint when editor becomes disabled
The commit editor becomes disabled, when no more
changed files were available. In this case, the
commit message verification makes no sense and
should be removed.

Change-Id: Ic16cc4ade1ecd1b64faee52b21a10b9c882908d0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2021-07-27 07:57:53 +00:00
Alessandro Portale
932d78c3e0 Tracing: Fix some more warnings regarding parameter injection
Parameter "XYZ" is not declared. Injection of parameters into signal
handlers is deprecated. Use JavaScript functions with formal parameters
instead.

Change-Id: I2d2b4f72b6c6bf532c090956a5286e3d38f867a3
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
2021-07-27 04:57:34 +00:00
Fabio Falsini
efb273750b Fix bug of default background color in Android spashscreen
If the manifest file was opened even if the parameters of the Android
splashscreen were not changed, the plugin always set the default
background color inside splashscreen.xml (0xffffff)

Change-Id: Id6e16dfffb2c62f3ea16faf5e85d13a1b56d80c7
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2021-07-26 18:05:51 +00:00
Christian Kandeler
3edc5822da Unit test: Remove unused ProjectExplorer sources
Change-Id: If30f601955d287ab4db719f0499c9e92e6eefe02
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-26 10:11:19 +00:00
Marco Bubke
a98d2a6770 QmlDesigner: Imports updates are source id aware
Imports are now only updated for their source id. The source id is now
used as import id too.

Task-number: QDS-4724
Change-Id: I12988e9c19746291bbc26d5c80fc7dfdd33528e9
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-26 09:46:55 +00:00
Marco Bubke
f04da274f1 QmlDesigner: Use one path for deleting types
There was an extra path to delete types for imports. As we simply
collect the to deleted type ids and delete them later the code
is quite simplified.

Task-number: QDS-4677
Task-number: QDS-4677
Change-Id: Ibce8a116e79454d3c8c7531ce9367b7948b1a497
Reviewed-by: Marco Bubke <marco.bubke@qt.io>
2021-07-26 09:46:46 +00:00
Marco Bubke
1ba8899749 QmlDesigner: Atomic synchronize
Merging the synchronization function into one function. This is needed
to exclude inconsistent states of the database.

Task-number: QDS-4715
Change-Id: I9915726d78d81a471c0494c584f141f011714c39
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-26 09:46:37 +00:00
Marco Bubke
3591735293 QmlDesigner: Detect alias cycle
An exception is thrown if an alias cycle is detected. This prevents that
the designer would get in an endless loop.

Task-number: QDS-4682
Change-Id: Iffbfb42d7334aa2a5490fe2830b5cfab8c8e627a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-26 09:46:04 +00:00
Marco Bubke
15f44db84c QmlDesigner: Support recursive aliases
So far we push changes up to aliases. But because we have recursive
aliases we have to separate different phases off the declaration and
linking. First we simply declare. Later we set the alias ids and then we
can find out the alias property types. To minimize the changes we stick
to the push model.

AliasPropertyDeclaration was merged into PropertyDeclaration so that
Sqlite::insertUpdateDelete can be called on one sequence. This prevents
inconsistent states as aliases would be changed into properties and vice
versa.

Task-number: QDS-4654
Task-number: QDS-4711
Change-Id: I8459ab07fd6b30efa19cfd4bc335286a039a511f
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2021-07-26 09:45:50 +00:00
hjk
3edc5673b5 Utils: Provide FilePath based wrappers for common dialogs
Change-Id: I464a7b5775495f32648905335f2d798384867900
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-07-26 09:44:20 +00:00
Christian Kandeler
b6dd53d4ed ProjectExplorer: Prevent build directory on non-existing drive
A drive that is not actually there is apparently different enough from a
"normal" non-writable location to seriously throw off some build tools,
so spend some effort in preventing this.

Fixes: QTCREATORBUG-25633
Change-Id: I5a15b0b2a3a882a08f50866c23e4d45c93fd78c9
Reviewed-by: hjk <hjk@qt.io>
2021-07-26 08:42:00 +00:00
Christian Stenger
67b082b51b QtSupport: Fix host specific handling
When handling qmake on a device we need to take the
device's host os into account instead of ours.

Change-Id: Ice5d11dc5c623be702d1e54d6b3d0c635ff57c7a
Reviewed-by: hjk <hjk@qt.io>
2021-07-23 11:55:46 +00:00
Christian Stenger
5d5969b46c ProParser: Avoid the most common hard crash
Whenever we try to access a non-local file we no more
hard crash Qt Creator, instead we silently handle it as
not found.

Change-Id: I3cbc617093c2a6fcb30626e276996430bb3795e5
Reviewed-by: hjk <hjk@qt.io>
2021-07-23 11:55:34 +00:00
Christian Stenger
b8bcdd9568 Docker: Correct environment for docker exec calls
Provide way to clean QtcProcess environment which is needed as
e.g. toolchains, build tools, and debugger otherwise run
inside a wrong environment when using docker exec for the
respective process calls.

Change-Id: Ia6de1c90f2134fce260d293a2f6937ab3cfca2ce
Reviewed-by: hjk <hjk@qt.io>
2021-07-23 11:55:27 +00:00
Christian Stenger
98ae0d44e6 Utils: Reduce need for resolving of symlinks
Be more strict when checking whether two files might be the
same executable.

As side-effect this reduces the calls to symLinkTarget() a lot
and speeds up auto detection of kits.

Change-Id: I23dc697a34bf93f8bd09cbe7e9d17f829cf0d010
Reviewed-by: hjk <hjk@qt.io>
2021-07-23 11:55:20 +00:00
Thomas Hartmann
493f8b8adc QmlDesigner: Show error message when using imports without version with Qt 5
If the document contains a 6.0 import or an import without version, but the
kit is a Qt 5 kit we show an error message.
Also show an error message if there is no Qt kit at all.

Task-number: QTCREATORBUG-25983
Change-Id: Id87ef47f0d8fbc31d1a8dbe8a471986d7288a4d3
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-07-22 15:51:20 +00:00
hjk
09286d062f Merge remote-tracking branch 'origin/5.0'
Change-Id: I074571dac56b26a8a1449c29aef53b9052d8e304
2021-07-22 15:00:19 +02:00