Commit Graph

80111 Commits

Author SHA1 Message Date
Jarek Kobus
20a4954cbd Revert "CommandLocator: Use Acceptor for LocatorFilterEntry"
This reverts commit 962888cb02.

Reason for revert: Applied too early and produced a conflict

Change-Id: I98a2895a81196b61cf7020a187d3740be231f671
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-04-17 09:21:09 +00:00
Jarek Kobus
837967a77a tst_RunExtensions: Move onResultReady test into tst_AsyncTask
Change-Id: I73e2cc62be207adbfb2a4e4ce1367140986cc8b3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-17 09:18:47 +00:00
Eike Ziller
bdfa412b14 Examples: Automatically enable showing categories for Qt >= 6.5.1
Supposedly that is the version that will have a sensible amount of
examples sorted into categories to not look weird.

It is still possible to force showing the categories with
QTC_USE_EXAMPLE_CATEGORIES.

Fixes: QTCREATORBUG-28546
Change-Id: Ia1e6afa97d9b1b86763c29209fcf6f674d0844f5
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-17 09:13:56 +00:00
Christian Kandeler
81b294d1b1 Update qbs submodule to HEAD of 2.0 branch
Change-Id: Idc7a0d5d0f2c50b2e6606eb92ae49756db49ddf0
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-17 09:13:07 +00:00
Jarek Kobus
962888cb02 CommandLocator: Use Acceptor for LocatorFilterEntry
Change-Id: I965cf7117d882afe4ac60df7d16dc67d4dac3891
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2023-04-17 09:10:46 +00:00
Jarek Kobus
7ab0fd56ae RunExtensions: Move onResultReady and onFinished into asynctask.h
Change-Id: I96dbf5b0253251224ae678172cd5fca12b34326a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-17 09:10:33 +00:00
Robert Löhning
26bcec1641 SquishTests: Don't require Qt Quick Controls
It's not available for any version we use anymore.

Change-Id: I11556c42b4ed7924d3ede04749b0b26251d8f0da
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-17 09:09:44 +00:00
Christian Stenger
2abe6bbe2c CMakePM: Fix passing library search paths
Amends 305ccfe259.

Change-Id: Icd08697720224e84cb4ad282d21191f80728865e
Reviewed-by: hjk <hjk@qt.io>
2023-04-17 07:50:40 +00:00
Artem Sokolovskii
cbaeee89d6 Debugger: DAPEngine improve breakpoints handling
- Added proper "Insert" breakpoint
- Added proper "Remove" breakpoint
- Fixed errors with engine states after pause and continue

Change-Id: Icbe1b4cf549cee633809d0a1c9ab19dbf877dbf0
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2023-04-14 15:05:36 +00:00
hjk
6932c6ca23 Qnx: Fix Abi detection for remote toolchains
We were suddenly ending up looking into the local file system.

Change-Id: I4911206e6d29f10a9dfaa9bc97307b28e383c14c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-14 14:45:52 +00:00
Semih Yavuz
15a06b77c0 Fix tst_qml_reformatter auto test
Add source location to pragma library writer so that the comments before
.pragma line are also written.

Fix tst_qml_reformatter by skipping the blankline comparisons. Line by
line comparison with the non-formatted code is not a good idea to test
 reformatting. Ideally test should have compared the formatted file with
the original one character wise, yet it is not worth changing into that
at this point.

Amends 0ce57fcf5e90f8bf8cfbe681f2954a0c1ef0e945

Change-Id: I39bcee2c881e1a0928c17ebb45aa1c85e6cf3b99
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-14 14:23:14 +00:00
Zoltan Gera
2d01003c4e Android: Automotive debugging capability
Android Automotive images use special system users to run Android apps
and activities. To maintain compatibility with all Android flavors not
only the process ID but also the user ID of the process should be
detected in order to be able to start the debugger with the correct
user credentials. Failing to do so caused the debugging server to
terminate upon not being able to connect to the app to be debugged.
This also disabled the native debugging in Qt Creator.

Task-number: QTCREATORBUG-28851
Change-Id: Ib4cd0ba7f252096cb7b8b14f959c8f0c743d8bf2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2023-04-14 10:51:44 +00:00
Jarek Kobus
e2bccfde24 DocumentSymbolCache: Don't schedule duplicate requests
Avoid scheduling a new request for the uri when
a request for the same uri is currently running.

Change-Id: Iac056b275c62e8640bf43a0ec9b6b6561b44eaed
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-14 10:50:15 +00:00
Christian Stenger
9beec99452 SquishTests: Expect another build fail on Win
Change-Id: Id4051f4f82c1219209fd59e72f1add76ec338a87
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-04-14 05:06:37 +00:00
Christian Stenger
cf8f23e8e0 SquishTests: Fix wrong usage
Amends 476f67cce5.

Change-Id: I584a059b52515bf625a973fff43485f5b52e6061
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-04-14 05:06:28 +00:00
Eike Ziller
2bc37de42b Merge remote-tracking branch 'origin/10.0'
Conflicts:
	src/plugins/python/pipsupport.cpp
	src/plugins/qtsupport/exampleslistmodel.cpp
	src/plugins/qtsupport/examplesparser.cpp
	tests/auto/examples/tst_examples.cpp

Change-Id: I00273622423fa99d41621969f6ecbbdaa0e18664
2023-04-13 15:59:08 +02:00
David Schulz
b1415a0ea5 TextEditor: reuse resetReloadMarks in documentReloaded
Change-Id: I41721e8c08fa70bf713154d7096753e0f49afb8c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-13 13:13:20 +00:00
Eike Ziller
9650a2bded Examples: Limit categories to single row and allow showing all
Limit the items shown for categories to a single row (two rows for first,
"featured" category), and add a "Show All" link/button in the heading,
that shows all items in that category only (with a "Back" button).

The "Search in Examples" input ignores categories.

Change-Id: I7c8561a306ad86c3b537587621d3fd030cd08af8
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-13 13:05:32 +00:00
Christian Kandeler
4028777743 ClangTools: Prefer .clang-tidy file by default
... and move this setting outside the diagnostic config.

Fixes: QTCREATORBUG-28852
Change-Id: Ie3b19ba7bec2bc96451f3216fa06a6941cad4c94
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-13 11:52:04 +00:00
Christian Kandeler
de0e0fab18 CppEditor: Fix tests
Amends 8fb258b85e.

Change-Id: I0b9339a60da459557c0335b0680f258ce689b45f
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-13 11:51:48 +00:00
Christian Kandeler
b795b42980 CppEditor: More special rendering for string literals
Display prefixes and suffixes different from the actual string, like we
already did for raw string literals.
This uncovered some minor bugs in both lexer and highlighter:
  - Wrong length for a setFormat() call in highlightRawStringLiteral()
  - Missing check for user-defined literal in raw string literals
  - Missing check for user-defined literal in multi-line strings

Fixes: QTCREATORBUG-28869
Change-Id: I018717c50ddc1d09c609556161c85dfb0cc29fab
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-13 11:36:12 +00:00
Christian Kandeler
02f2a93503 ClangCodeModel: Let clangd handle cuda sources
Fixes: QTCREATORBUG-28984
Change-Id: I7fbf5a671ff6f1d1ecd928d9be1f619dc32563a9
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-13 11:35:22 +00:00
Marcus Tillmanns
ee4fc5b801 macOS: Allow debugging Qt Creator
Fixes: QTCREATORBUG-29010
Change-Id: I349d2dcd383613661c1faad3104f211d6c6ce028
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-13 10:57:54 +00:00
Robert Löhning
2ffe169a8d SquishTests: Try stabilizing tst_generic_highlighter
Change-Id: I12e29f2886d22ce03a1a2eb62d5c776cd894d359
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-13 10:48:21 +00:00
Christian Kandeler
8fb258b85e ClangCodeModel: Make use of QT_ANNOTATE_FUNCTION()
See qtbase/6c54e10144e7af02f4c35e20e5f375a0cf280b8b.

Fixes: QTCREATORBUG-28970
Change-Id: I7500c1e25a63d2a1cda66259c5ebd84976c27335
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-13 10:30:03 +00:00
Eike Ziller
c842b96f77 COIN/GitHub: Use Qt 6.4.3 and LLVM 16.0.0
Change-Id: I95ddc7a95b5761d29b111f3eff3fdfc014efaa51
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-13 09:37:49 +00:00
Christian Kandeler
f67f02066c ClangCodeModel: Classify Q_PROPERTY functions as Qt-invokable
Fixes: QTCREATORBUG-28971
Change-Id: Ia60a82aa83ad89fbf6b5d1332d413de029510b34
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-13 09:19:12 +00:00
David Schulz
8a0b3815df TextEditor: fix leaking TextSuggestion
Change-Id: I6f8b27e339219880cf9ade42a1e70e6dafb625b1
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-13 08:14:51 +00:00
Eike Ziller
e6414d9941 Examples: Optionally parse categories from meta data
Optionally parses example categories from the examples manifests, when
setting the environment variable QTC_USE_EXAMPLE_CATEGORIES (can be done
in Qt Creator's Environment > System > Environment settings).
It doesn't make sense to unconditionally enable that yet, because only
few examples actually have categories so far, so we will need to wait
until some Qt version is suited for enabling this.

If an example set does not provide categories, the "highlighted"
property is used to provide a "Featured" category, as before.

If an example set does provide categories, these are shown instead,
sorted alphabetically, and examples with the "highlighted" property
are put at the front of the category, overriding the otherwise
alphabetical listing inside the categories. Examples without a
category are put into a separate "Other" category at the end.

Task-number: QTCREATORBUG-28546
Change-Id: I7ca312686eae13e16961def1b4b36ffd7050a447
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
(cherry picked from commit a2de016f64)
2023-04-13 07:14:31 +00:00
Eike Ziller
b542d47907 Examples: Read meta data, which includes categories
Task-number: QTCREATORBUG-28546
Change-Id: I11505d4f8b8eaef3f525185cd45757b6f41012ec
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
(cherry picked from commit e060f82fa5)
2023-04-13 07:14:18 +00:00
Eike Ziller
9144ab75f4 Add test for examples parsing
Change-Id: Id2ec8afcdbdff97e12b32b836c955552589081c4
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
(cherry picked from commit 87b5176fd2)
2023-04-13 07:14:05 +00:00
Eike Ziller
ac17e0e2ad Convert Examples model to FilePath
Change-Id: I56219d2f9516662b32d45fd9b2108a0ad34113cc
Reviewed-by: David Schulz <david.schulz@qt.io>
(cherry picked from commit 255afd45bf)
Reviewed-by: hjk <hjk@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-13 07:13:50 +00:00
David Schulz
e6e9405cc9 TextEditor: remove redundant semicolon
Change-Id: Iac82849a858bd567ff1230ec8c0ea48b5ef47e17
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-13 06:52:04 +00:00
David Schulz
f773c09f33 TextEditor: fix crash on reload
Since TextDocument::openImpl potentially processes events it could
delete TextMarks. So tracking them in TextDocument::reload can be
considered unsafe. Track them in TextDocumentLayout instead and remove
the tracked mark if it gets deleted while reloading the document.

Task-number: QTCREATORBUG-29004
Change-Id: I9d0478e9c763b49f145c1bbaeed1a0b602757014
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2023-04-13 06:09:10 +00:00
Haowei Hsu
5089e8400e l10n(zh_TW): Fix translations of 'Enable/Disable'
* Enable: 開啟,用,使用 -> 啟用
* Disable: 關閉,停用,禁用 -> 停用

Change-Id: I18ec9d78ba1c104f5016e7f6b3c1e21a2fdc8e33
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Yi-Jyun Pan <pan93412@gmail.com>
Reviewed-by: Franklin Weng <franklin@kde.org>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2023-04-12 14:28:29 +00:00
Semih Yavuz
78cf563142 reformatter: fix formatting of js directives
Fix the miscalculation of the start / end of the js directives lines.
Also small optimizations on usage of increment operators. Add a unit
test.

Fixes: QTCREATORBUG-29001
Change-Id: I38923f137dca5c0b89d474cd747a64ec11e62fd9
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Fabian Kosmale <fabian.kosmale@qt.io>
2023-04-12 11:50:43 +00:00
Jarek Kobus
8175d5abda onResultReady: Provide a context object for all usages
Remove overloads for onResultReady() and onFinished()
that don't take context object.

Change-Id: Iaec538bcccd29e22791ec65cc95b4b87640708c3
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-12 11:05:16 +00:00
Eike Ziller
3ba769fb46 Fix saving of hardlinked files
Our atomic write involves writing a temp file and renaming that (which is
the only way to achieve something atomic). This creates a new inode, and
disconnects any hardlinks.

Note that the existing implementation for file paths with needsDevice
already keeps hardlinks intact, because even though it first writes into
a local temporary file it then writes the content directly into the
target with dd.

Check the number of hard links via system API and fallback to unsafe
writing if there are any, for desktop paths.

Fixes: QTCREATORBUG-19651
Change-Id: I3ce1ee81f339f241f0a2c9aa6f2259cb118ebef6
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-12 08:47:53 +00:00
Jarek Kobus
59c1fae60b DirectoryFilter: Hide public methods
Make most of the public methods of DirectoryFilter
protected. Move connection to project manager signals
into AllProjectFilesFilter c'tor. Remove unused
DirectoryFilter::directories().

Change-Id: I66d16c2c90188de6a03fb072fed6c87ea3d9ce4c
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-11 14:03:19 +00:00
Eike Ziller
a6512861ea Build: Fix result of ts_ targets
Created .ts files with the wrong name.

Amends 556e7315f7

Change-Id: I3c0199c564f47dce178a9d8218d5dacf8c75f78a
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2023-04-11 13:59:36 +00:00
Alibek Omarov
abe7738811 CompilationDatabaseProjectManager: Add missing GCC include flags
GCC also accepts -iquote and -idirafter flags to set include path.

Change-Id: Id8088faa4cfcfb9d6005ad13527c0bc26dc4feb3
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2023-04-11 12:29:05 +00:00
Eike Ziller
7b17d9cfbd German translation: QmakeProjectManager
Change-Id: I24c8de5f0f6c1bc02669b48a6023f6bc0775a403
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-04-11 12:05:33 +00:00
Eike Ziller
b18254f463 German translation: QmlJS(Editor|Tools)
Change-Id: I2fb3dba6fe1fc43f41c4461fac44601300d38bdd
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-11 12:05:11 +00:00
Eike Ziller
f1fde363a0 Build: Optionally sign on Windows
Add an argument to the build script that takes a signing command (path
to sign is added at the end, run in cwd)

Task-number: QTCREATORBUG-25740
Task-number: QTCREATORBUG-28909
Change-Id: I6d3bdf7bd9fab0ea1fc129da08cf77c9a5448b31
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2023-04-11 12:01:17 +00:00
Eike Ziller
584874f15f Move examples manifest parser in separate function
and file. To make it auto-testable.

Change-Id: I19d263bf080a0089eb9a4ec0f379c52446771c0a
Reviewed-by: David Schulz <david.schulz@qt.io>
(cherry picked from commit 7e75097447)
Reviewed-by: hjk <hjk@qt.io>
2023-04-11 11:56:42 +00:00
Jarek Kobus
205fb14a43 ClientRequestTask: A few fixes
1. Rename ClientRequestTaskAdapter into
   WorkspaceSymbolRequestTaskAdapter as it's adapting
   the WorkspaceSymbolRequestTask, not the general
   ClientRequestTask.
2. Rename the registered name inside Tasking namespace
   into SymbolRequest, as WorkspaceSymbolRequest
   may collide with the class defined inside workspace.h
   header. We also aim for rather short names inside
   Tasking namespace in order to not to be too verbose.
3. Register the adapter with QTC_DECLARE_CUSTOM_TASK,
   not the task itself.
4. Fix isRunning() assert inside start().
5. Drop check for Client::locatorsEnabled() inside
   preStartCheck(), as that's being done beforehand
   when needed.

Amends 8e9b893325

Change-Id: I7cef290e18d5d86b48aa17d548a058bf35fd31ec
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2023-04-11 08:14:57 +00:00
hjk
25f7dfac25 ProjectExplorer: Remove FileTransferDirection
Only 'Upload' is in active use, and the direction determination
gets fiddly when more than one remote device is involved.

If there'd ever be a real need for a 'Download', I add / reimplement
that as a separate case in FileTransferMethod.

Change-Id: I51580a180aae6f0ed5904ff1b828c9ffd6da658c
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2023-04-06 17:09:08 +00:00
Christian Stenger
41e78b9e57 SquishTests: Fix compiler substitution on Windows
Change-Id: I970622c888d6c8b7c63e8b1674419ba900ea6d24
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
2023-04-06 13:56:47 +00:00
Christian Kandeler
6536ea7f05 Update qbs submodule to HEAD of 2.0 branch
Change-Id: Ie07019ff0a93394a3738b5e0dc5718e74668992d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2023-04-06 13:43:12 +00:00
Alessandro Portale
3eb60d80e5 Android: Skip "Make Install" and "Build APK" if not ProductType::App
If the target's product type is not "App", the "Make Install" and "Build
Android APK" build steps need to be skipped.

Fixes: QTCREATORBUG-26980
Change-Id: Ia8bb61d407d040b851a74bad3d23876a7d31af73
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io>
Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
2023-04-06 13:32:41 +00:00