Commit Graph

62421 Commits

Author SHA1 Message Date
Cristian Adam
93f4659533 CMakePM: Add "Close" button for Kit Configuration dialog
This looks more in sync with other dialogs that we display.

Change-Id: I445da900982b7bdcc12d810e69170b0a7695b30c
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-08 15:47:29 +00:00
Thomas Hartmann
93a9345fdd QmlDesigner: Improve finding node for cursor position
Using nodeLength(node) is very slow, while searching for the next closing
bracket is nearly always sufficient.

Task-number: QDS-6110
Change-Id: I22f710f4cf90302192285a8cadd6ea6fc698b2a6
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
2022-02-08 15:32:12 +00:00
Christian Stenger
ade68514ff PE: Tweak clang detection
Helps to detect clang on docker devices.

Change-Id: I9340900e205e767d8b058f6e69c61abf41c25726
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-08 13:40:56 +00:00
Thomas Hartmann
5c9e64a2a4 QmlDesigner: Increase delay for text editor
This increases the delay from 400ms to 800ms until
the model and GUI is synced with the QML code.
This means the user has to stop typing for 800ms
until the form editor and property editor are updated.

Change-Id: Ia250dec39cd8051d25619310024b718ad1cf9815
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-08 12:08:50 +00:00
hjk
a89e43d502 ScreenshotCropper: Compile with namespaces
Change-Id: I5c3516071327a2f70bbbac84cc94e9acdecd2673
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-08 12:03:40 +00:00
Alessandro Portale
8c7eee4ff7 Core: Fix "reactiveness" of FindToolBar
The recently added "Select All" button needs to be included in the
width calculation.
If the find buttons switch to icon mode, "Select All" gets hidden.

Also, if the replace buttons are visible, they define whether all
buttons are shwon in full text or get hidden. No icon mode at all in
that case.

Change-Id: Ie85a68c7f7c3f1a6ca51ed3f91d64124eeb7aa1a
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-08 11:29:33 +00:00
Knud Dollereder
381bfd623c Remove ToolBarWidgetFactoryInterface from WidgetInfo
Since it is sometimes created with new but never used,
it leaked memory.

Change-Id: I5adfb71f9c773be37c1cefc619236bad9f34aad1
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-08 10:05:49 +00:00
hjk
57afbae543 CMakeProjectManager: Move some markup out of translated strings
Eases the pain of translators.

Change-Id: I7327958ee0628698ab326b3c8d6518d3330b83dd
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-08 08:57:59 +00:00
hjk
f308bb3cae Debugger: Fix value assignment in locals and expressions
For booleans and numbers.

Change-Id: I5ff1660faee1bf0ed21211d5fe98462f660fb417
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-08 08:44:57 +00:00
Aaron Barany
03a0ed0786 Debugger: Use queued connection for menu actions
Pass the parent calling object to the addAction() functions and use a
queued connection. This prevents the following sequence of events:

1. The menu is dismissed when selecting a menu item.
2. The deletion gets queued via deleteLater().
2. The onTriggered action gets invoked and opens a dialog box.
3. The dialog box triggers the events to be processed.
4. The menu is deleted when processing the events, while still in the
   event function to handle the dismissal.

This only affected the watch menu since the others were leaked. Added
cleanup handlers for the other debugger menus to avoid leaking them.

Task-number: QTCREATORBUG-26989
Change-Id: Ifa2c52d7bea884c55d43fa545e3e2870301e4052
Reviewed-by: hjk <hjk@qt.io>
2022-02-07 20:20:58 +00:00
Alessandro Portale
f132b09c4b QmlDesigner: Use QmlProject::isQtDesignStudio()
Use QmlProject::isQtDesignStudio() instead of checking various settings
sources in order to determine which product is currently running.

Change-Id: I3f08eb147e7dbbde3e2984d63c39d48c12530aaa
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-07 19:14:26 +00:00
Henning Gruendl
4f4d34bc5e QmlDesigner: Add missing color enum
Change-Id: Ie72912393ff2ffedea8c9ddb3a4a97023fad001a
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-07 17:35:32 +00:00
hjk
347265a969 CMakePM: Use more direct access to SourceDirectoryAspect
Change-Id: Ifc91b13fcdc9c42ad4a9521656a2bf63e08aaf78
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-07 17:16:58 +00:00
hjk
c6643dad65 CMakeProjectManager: Some code cosmetics
Move non-exported classed to Internal namespace, move some functions
out-of-line.

Change-Id: I3a2135104d09c0c3f799c5b8d795c93059b1ae95
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-07 17:16:33 +00:00
hjk
363849a372 CMakePM: Also show type of options in configuration tooltips
Change-Id: Ie6b6b270c83d7c5df117c16d637f362e8c01eaad
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-07 15:40:24 +00:00
Eike Ziller
68fd73713b Merge remote-tracking branch 'origin/7.0'
Change-Id: I967615c66a11bb4823a6b403ca59e63dd1971032
2022-02-07 16:34:41 +01:00
Thomas Hartmann
454682ea3f Do not enter edit mode when opening a .qmlproject as QDS
If the user opens a .qmlproject in QDS mode we do not want to
enter the edit mode by default.
We check the startup project after opening and calling
openEditMode() will determine if we keep the default of opening
the edit mode or not.

Change-Id: Ic8a7fbefa007d487ec680099544c07fe007c0b29
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-07 15:17:54 +00:00
Christian Kandeler
9185875677 ClangCodeModel: Adapt tests to recent clangd regression
Change-Id: Ic48e1b9b85804f605edb5a2edab18f93dd7dec7d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-07 13:28:26 +00:00
Orgad Shaneh
be1f89c93c DiffEditor: Fix git diff parsing for rename + mode change
Sample output:
diff --git a/projects/cosign/build.sh b/projects/argo/build.sh
old mode 100755
new mode 100644
similarity index 88%
rename from projects/cosign/build.sh
rename to projects/argo/build.sh
index 87d865d2..14b8885c
--- a/projects/cosign/build.sh
+++ b/projects/argo/build.sh
@@ -13,7 +13,8 @@
 # See the License for the specific language governing permissions and
 # limitations under the License.
 #
 ################################################################################

+$SRC/cncf-fuzzing/projects/argo/build.sh
+

-compile_go_fuzzer github.com/sigstore/cosign/test FuzzGetPassword fuzz_getPassword gofuzz

Change-Id: Ifa66dfdb80b309d72f524f15c681823ab7e133ba
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-07 12:56:40 +00:00
David Schulz
9f7c822197 CodeAssist: reset flag before starting new processor
If a new processor is started while waiting for a result of a still
running procesor reset the flag whether content was received while
waiting.

Change-Id: I21a254681050d1db077deec88706f0010670e0ac
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-07 11:50:04 +00:00
Henning Gruendl
557a3c9af7 QmlDesigner: Add new node hint
Add a new node hint called "bindParentToProperty" which enables the
metainfo file to specify an automatic binding of a nodes parent id to an
arbitrary property.

Change-Id: Ib16955df608cdca5732882afc1f5ba0891283ca5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-07 11:43:43 +00:00
Henning Gruendl
ff7a0e92e8 QmlDesigner: Add missing tr()
Change-Id: I06388a3b93eed154620252d13ff68481b766983a
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-07 11:41:28 +00:00
Christian Stenger
e310ce43dc StudioWelcome: Fix linking on Win
Change-Id: I573ca5b3bd730f4519bae27e29e33f627e51aa81
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-07 11:06:56 +00:00
Orgad Shaneh
6612fd16a7 Git: Fix parsing in mergetool
Amends commit 50586c7bb8.

Fixes: QTCREATORBUG-26994
Change-Id: I799d05590b3433ec165d9d7f9143bea7d66b9711
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-02-07 09:26:25 +00:00
Henning Gruendl
73ae5bb1f6 QmlDesigner: Show error/warning for root reference
Show an error when an alias property references the root item directly.
Show a warning when an alias property references the root item in a
hierarchy.

Task-number: QDS-4380
Change-Id: I312fc0296e3bb2321a4d9e1113bd0cd4c1c0b8ed
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-07 09:25:05 +00:00
Orgad Shaneh
dd70101d7b Git: Block branch refresh for actions that open a new editor
Refresh is called twice - first time when the editor is just opened, on
this call the repository can be either empty, or the active project (even
if the current file is from another repository). After the editor is
initialized, setSource is called, and the state is recovered.

But between these 2 calls, m_repository is empty, and synchronous actions
are still executed (and fail).

Fixes: QTCREATORBUG-26952
Change-Id: I1767b35f0e9f24da2c447d0b565b410742c560d9
Reviewed-by: André Hartmann <aha_1980@gmx.de>
Reviewed-by: Robert Löhning <robert.loehning@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-02-06 06:20:28 +00:00
Aaron Barany
ba08864954 PerformanceAnalyzer: Fix tracepoints script
Fixed issues seen running the tracepoint script in Arch Linux:
* Use /lib/ rather than /lib for the call to find to work with cases
  where /lib is a symlink.
* When finding <name>_ret entries in match_tracepoints, search for
  <name>_ret__return if the initial check failed. Newer versions of perf
  seem to decorate the name with __return when the function name is
  followed by %return.
* Handle arrays output from the call to awk in match_tracepoints. This
  can happen when multiple functions are added with the tracepoint, and
  breaks when checking for "bad" probes when a loop isn't used to add
  individual checks for each entry.

Fixes: QTCREATORBUG-25651
Change-Id: Ie528b4d80f9ece8f23d27a84356c74577219ed45
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
2022-02-04 22:14:16 +00:00
Cristian Adam
612529f2a7 CMakePM: Update generator label in Kit's CMake settings
Now only the parts of the generator that have a value are displayed.
Previously the label had "<none>" for the missing values.

Change-Id: I666bd04c94c47410ee71912dc0cebbcc6c6c79d2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 19:37:45 +00:00
Cristian Adam
924862093e CMakePM: Apply Kit CMake configuration to Initial Configuration
When the user changes or adds new CMake Kit parameters, the changes
are reflected in the Initial Configuration.

Change-Id: Icca1c76749c772e946ff250f94b7965cf7cf9ee8
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 19:37:20 +00:00
Cristian Adam
201f91b867 CMakePM: Mark as changed only the changed values in "Batch Edit..."
Previously all values coming from "Batch Edit..." would be considered
as user changed values and be displayed with bold font.

This means that if I had -DMY_VAR:BOOL=ON and do a Copy and paste
in "Batch Edit..." I would have it displayed as user changed and
it would be passed to CMake as changed value.

Also it should be possible to start with -DMY_VAR:BOOL=ON, click
the check box to make it OFF and then do a "Batch Edit..." with
-DMY_VAR:BOOL=ON to set the value back to original value.

Change-Id: I5f6cb915b32a3288c1339135dabfd182ca16feda
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 19:36:10 +00:00
Cristian Adam
577ad6fa3e CMakePM: Fix crash when switching CMake tools and clicking help links
The crash scenario:
1. Switch CMake tool in Kit CMake Configuration in Settings
2. Click on the "options" help link

Change-Id: Ifdb2809789748926a5ee0e127db0c87a22efa9dc
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 18:11:43 +00:00
Cristian Adam
869b7810db CMakePM: Add "Help" context menu entry for CMake variables
This way one could easily jump to the documentation of a CMake
variable e.g. CMAKE_BUILD_TYPE.

Change-Id: I1b348f0a1b6c18f0f7cee29ff6409b43c6263f44
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 18:11:17 +00:00
Thomas Hartmann
85e3061b7a QmlDesigner: Move wizard registration to StudioWelcome
Change-Id: Iacaac80420da96f6757236db6c15ac23a6f723cf
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 17:31:27 +00:00
Thomas Hartmann
b8c8a6a2bb QmlProject: Add single isQtDesignStudio method
Change-Id: Idf9d07e6318af8d6934adcbc0afa3695e262836f
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2022-02-04 17:31:14 +00:00
Alessandro Portale
a8a1f036cd Core: Explicitly detach QPalette in WelcomePageHelpers
Workaround for QPalette behavior change Qt 6.2.2 -> 6.2.3

Task-number: QTBUG-100439
Fixes: QTCREATORBUG-26981
Change-Id: If28195023929baf7dfeb2b0196c8339b84658488
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-04 17:25:30 +00:00
Cristian Adam
270d448eb1 CMakePM: Add "generator" link to the kit's CMake settings
This way the user can access all the details from the CMake's generator
documentation.

Change-Id: I90990bf7ec0062122bc3f32d611e19da8f5f9afc
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2022-02-04 17:24:24 +00:00
Thomas Hartmann
96ec295fc6 QmlProject: Search in content for .ui.qml files first
Change-Id: I1cf8a0bc83c24a0207e68a12a9a441cc7432a013
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2022-02-04 15:39:26 +00:00
Cristian Adam
d408e4c22c CMakePM: Add "variable" link to CMake offline/online documentation
This way an user can find quickly a CMake variable if needed.

Change-Id: Ie885a34321cf2ce31ee662659e669de88b28801c
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-04 15:34:07 +00:00
Thomas Hartmann
4fa399fbcb QmlProject: Do not allow "." in importPaths
Adding the root folder to importPaths can create all kind of issues
and is not supported.

Change-Id: I03fe8924f08b11704fc472ed9cfa0b765ab7cf06
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
2022-02-04 15:12:28 +00:00
Christian Kandeler
cfc7890416 ClangCodeModel: Create a clangd config file, if none exists yet
There are some clangd settings that can only be provided via a config file
(i.e. neither via the command line nor via LSP extensions).
In addition, clangd is very picky about that file's location; in
particular, we cannot put it at the "pseudo project root" where our
generated compilation database resides.
Therefore, we have to go with a user config file (as we don't want to
write into any project source directories). If there already is such a
file, we don't do anything, based on the assumption that the user is
familiar with clangd and has already configured it to their liking.
Otherwise, we create the file, including a special marker that tells us
it was generated by us and can safely be overwritten.
The set of options we set is currently quite small, but we expect it to
grow in the future.

Change-Id: I1605bf7b0edecc844f3e7cdd1d7dddda7af33956
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-04 14:23:46 +00:00
Christian Kandeler
0e7de92319 ClangCodeModel: Retrieve all kinds of clangd tweaks
Contrary to our expectation, the "quickfix" tweaks are not part of the
inline code actions after all.
User-observable effect: "Populate switch" becomes available.
Amends 8b63dfccc6.

Change-Id: I4f7fa25a58bb54dbdb470d7db064b4d804c34d26
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-04 14:23:24 +00:00
Christian Kandeler
0a9acad18c ClangCodeModel: Fix tooltip for clangd text mark copy action
Change-Id: Ie551971a114f1f45004a0eac0283507627c26be2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-04 13:50:26 +00:00
Cristian Adam
68cb80f276 CMakePM: Add options link to the CMake offline/online documentation
This way a user can quickly find out which options can be used.

Change-Id: I6347759689a4a1431a82ff9414da0c79e357eb45
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2022-02-04 13:12:15 +00:00
hjk
75ef67615d ProjectExplorer: Remove IDeviceFactory::setCanCreate
That's implicit now by using setCreator()

The Android case looks odd as this is (and was) effectively static
information at startup. This will be addressed in a follow-up patch,
for now keep it functionally equivalent.

Change-Id: I4e6082f88dcd21379186340189acb581caef172a
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-04 12:10:07 +00:00
Christian Kandeler
41fee90d8e CppEditor: Fix testing
Now that clangd is enabled by default, we must explicitly turn it off to
test the built-in follow symbol functionality.

Change-Id: Ib275893a920145868b314ce02e9dd80f656bade4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-04 11:58:52 +00:00
David Schulz
3a6dff6743 ProjectExplorer: filepathify actualTabSettings
Change-Id: I4b08b96d56bfeed0348d82bb96ff70d5f8ad583b
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-02-04 11:51:52 +00:00
David Schulz
a992a3440b LanguageClient: add send configuration helper
Change-Id: If078a0354b86ca3dba5fceec94ce266424fe0c99
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-04 11:42:51 +00:00
David Schulz
97e81d35df LanguageClient: always send the full list of workspaces at startup
Change-Id: I74203b7bc71982b0e6e347b004d48531a07069dc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-04 11:42:35 +00:00
David Schulz
48076ce617 LanguageClient: pass BaseTextEditor to outline generator
Change-Id: Id0e123f5614f3884bf3beaeafefd0ccbd1192d55
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-02-04 11:42:25 +00:00
David Schulz
08e375d6f7 TextEditor: add highlighter configure based on mimetype
The default implementation configures the generic highlighter based on
the documents file name and content. Add a way to force the highlighter
to use a highlight definition for a specific mime type.

Change-Id: I1c6fca1be9bcb5c4276b5aa2dbb724680fe98ddc
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-02-04 11:41:50 +00:00