Commit Graph

68568 Commits

Author SHA1 Message Date
Leena Miettinen
048a826943 Doc: Rename Form Editor view topic using the view name
...and move it to the topic that describes Design views.

Change-Id: Ifb0c70936cb1059b8c7e4b86a23a4035b8047411
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-22 16:18:16 +00:00
Mahmoud Badri
abc0559316 Fix property editor expand not working regression
Regression caused by 43eaa09b11

Change-Id: Ia749672464790b235f292efe09b6cc48e1df6b6e
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Henning Gründl <henning.gruendl@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-22 16:13:45 +00:00
Cristian Adam
bc3b5bf1f3 Core: Better description of codec for locale label
"Text codec for locale" has been replaced with
"Text codec for tools".

Ammends 1d27f894bb

Change-Id: I022d67aabccd9485b6c629af352b66289a29be55
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-22 13:57:53 +00:00
hjk
c4b7da9ab2 ProjectExplorer/Debugger: Add a 'Run as root' option for Unix hosts
For local run and GDB debug, with or without terminal.

Task-number: QTCREATORBUG-2831
Task-number: QTCREATORBUG-25330
Change-Id: I9b5d2156bcffea4f358474ecdbcad580a4419917
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-22 13:38:25 +00:00
Henning Gruendl
9bc9a4d376 QmlDesigner: Fix regression in template generation
Fix property editor template generation for alias properties.

Task-number: QDS-3740
Change-Id: I082e213a5f05a5ba35bb94d41924dcac81404c61
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-22 13:37:36 +00:00
David Schulz
4a8443ff81 LanguageClient: remove unused function declarations
The formatting functionality moved into the LanguageClientFormatter.

Change-Id: I2fb941485b1407d8bf148b2868a9c7593b6dd61e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-22 13:04:30 +00:00
hjk
c8829ff5b3 Utils: Use value/setValue instead of settings also for TriStateAspects
Change-Id: I3d0a58917cd6682e14894e4320d166a1c8de6a9a
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-22 12:06:11 +00:00
hjk
f8a946ce96 ProjectExplorer: Silence recently introduced warning
The checked path is actually used in the context of the debugger.

Change-Id: I58af35db65b8fb4ad0af9694714765bdc336a0ef
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-22 12:06:02 +00:00
Leena Miettinen
564d27f664 Doc: Update Kits Options screenshot
Task-number: QTCREATORBUG-25162
Change-Id: I6b230ec4905ffaa6055e67112e80a8c372bfdeaf
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-02-22 11:42:06 +00:00
The Qt Project
ec5f7d8a6b Merge "Merge remote-tracking branch 'origin/4.14'" 2021-02-22 11:20:52 +00:00
Eike Ziller
c55e59cb77 Merge remote-tracking branch 'origin/4.14'
Change-Id: Ib9512b4fc5e17b04ca4be79fc315e79a52d06497
2021-02-22 12:19:58 +01:00
Christian Kandeler
b066b3029e CPlusPlus: Improve type name minimization
... for function parameters. These are located in the scope of the
surrounding class or namespace.
This uncovered a bug in the "Insert Virtual Functions of Base Classes"
quickfix, which we also fix here.

Fixes: QTCREATORBUG-8030
Change-Id: I7f11659dc8e252e3819df8178734e8958fa1b496
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-22 11:16:49 +00:00
Eike Ziller
f47c7b2e90 Valgrind: Do not save defaults to settings
Task-number: QTCREATORBUG-24762
Change-Id: I10fee50cde9facaa35a67114ac15e8b1daa72ab2
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2021-02-22 10:24:03 +00:00
Michael Weghorn
f4dc3fd5c5 Debugger: Prepend '*'s for autodereferenced pointers
If automatic dereferencing of pointers is enabled, the
"Value" and "Type" columns for pointers hold the values for
the dereferenced pointers.

In order to have a consistent behavior for the "Name" column
as well, prepend '*'s to indicate that the variable/expression
has actually been dereferenced.
Add parantheses around the original expression if it doesn't
match a simple regex for variable names, to avoid that the
leading '*' changes the meaning of the expression
(so e.g. a dereferenced 'somepointer + 1' is displayed
as  '*(somepointer + 1)' rather than '*somepointer + 1').

This introduces a new 'autoderefcount' field to propagate the
information how many levels of dereferencing have taken
place from the Python to the C++ side, which is then
used to add the leading '*'s for the display name.

Fixes: QTCREATORBUG-20907
Change-Id: Ia9a41cb42e25ba72a6d980a765dbe2b454deb8c8
Reviewed-by: hjk <hjk@qt.io>
2021-02-22 09:36:45 +00:00
Leena Miettinen
c6493e170f Doc: Describe the Zoom field in Help Options
Task-number: QTCREATORBUG-25162
Change-Id: I11842989df9bab1c5ba1f3e553b486b6cbe88239
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-22 09:15:52 +00:00
Leena Miettinen
adce958d5c Doc: Describe the global setting for system environment
Used when determining the build and run environment and
the environment for running external tools.

Task-number: QTCREATORBUG-25162
Change-Id: I6ddf4952bed5ae9190b65bbac8f0c17404be0538
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-22 07:32:18 +00:00
Eike Ziller
7cb81fb5ba CMake build: Add .pri files to development package
This adds at least partial, transitional support for building
3rdparty plugins with qmake against Qt Creator built with CMake.

This might still miss some other .pri files that follow
their own naming conventions.

Fixes: QTCREATORBUG-24055
Fixes: QTCREATORBUG-25334
Change-Id: I83cc547da938976c2ec12a21a17f286b937147f7
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
2021-02-22 07:30:33 +00:00
hjk
fa617b4018 Utils: Fix BaseAspect::fromMap()
The world is not boolean.

Amends a2d6c2b34a.

Change-Id: I4bf901ea6967080964ab1681d2e577fed42a0943
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-22 06:51:12 +00:00
Christian Stenger
2f67d75ca4 Debugger: Avoid looking up function signatures
Looking up function signatures ends up in massive
stderr output which blocks the debugger for ages, so omit
them as long we are not sure where they originate.

Task-number: QTCREATORBUG-25185
Task-number: QTCREATORBUG-25217
Change-Id: I9b022d2194a6cb61651ee0648be526fc94a02da9
Reviewed-by: hjk <hjk@qt.io>
2021-02-22 06:21:39 +00:00
Tom Praschan
f600386732 Fix dot command for pasting with 'P' being 'p'
Change-Id: Ic491f3a198a03fd08a680e044c4e8f2f5ebe2866
Reviewed-by: hjk <hjk@qt.io>
2021-02-22 06:06:49 +00:00
Cristian Adam
cc0fa86ffd CMakeProjectManager: Add package manager auto-setup
Adds CMAKE_PROJECT_INCLUDE_BEFORE as initial CMake parameters
with a path to a auto-setup.cmake script that will run
conan install if a conanfile.txt is found in the prject.

A project can have a local QtCreatorPackageManager.cmake file
that will be loaded if exists.

The auto setup can be controlled via the following CMake variables:

* QT_CREATOR_SKIP_PACKAGE_MANAGER_SETUP
* QT_CREATOR_SKIP_CONAN_SETUP
* QT_CREATOR_SKIP_VCPKG_SETUP

conan.cmake is taken from https://github.com/conan-io/cmake-conan
which takes care of the conan specific compiler cruft. License
is MIT.

Fixes: QTCREATORBUG-25362
Change-Id: I70a6e1abc5600851d048f1590ca24204ce52a503
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
2021-02-19 17:54:45 +00:00
Eike Ziller
813d020fa5 Update 4.15 changes file
Change-Id: If4a986a9479b04facf87e784c31121b0380cb5e3
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-02-19 16:48:44 +00:00
Christian Kandeler
485bcc4b61 ClangCodeModel: Change default set of warnings
... to "warnings from build system".
It seems appropriate to respect the project settings by default.

Change-Id: I397c252409a012f4663f3752c5c097fa0e658da4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-19 16:09:37 +00:00
Eike Ziller
015080878c Update changes file for 4.14.1
Change-Id: I1855a07186e0cbbc51ca475bd525818bcb9e1bc0
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
2021-02-19 14:26:01 +00:00
hjk
6bba37ab16 Analyzers: Re-enable switch between global and project settings
This was apparently always using project settings for a while,
even when "Use Global Settings" were selected in the Run settings.

Change-Id: I1293a617edcbfd6bc47c57102fa53096c717ec4e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-19 13:40:28 +00:00
Tapani Mattila
130e05845c QmlDesigner: Easen assert on non-fatal double qml node insert
Change-Id: I3ca0d0c5427f548e249bdc3af2fd1d8281544ba7
Reviewed-by: Michael Winkelmann <michael.winkelmann@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-19 13:25:52 +00:00
Jarek Kobus
31d3e3252f Use QMutexLocker for lock/unlock
Change-Id: Ib8c6cdc71a3d82785619260c4ace7362c6847f99
Reviewed-by: hjk <hjk@qt.io>
2021-02-19 12:38:30 +00:00
David Schulz
2fe3ce93ae LanguageClient: Do not handle messages while shutting down
Fixes crash of todays demo...

Change-Id: I0af3edd098b5c05d7d74ff336739f1180a1ec348
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-19 11:43:27 +00:00
David Schulz
30e1387130 LanguageClient: clear extra selection when diagnostig gets hidden
Change-Id: I3b10301193e988eacc23eb9e55576eef5f69fb3f
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-19 11:43:06 +00:00
David Schulz
94ee80b222 JLS: add special java client that can execute jls commands
the java language server uses special "java.apply.workspaceEdit"
commands that already contain the workspace edit that should be applied
when triggering the command.

Change-Id: If7c53b9b097aaeca289e3958a39be37a9725d395
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-19 11:42:59 +00:00
Christian Stenger
49ae9b5b30 Utils: Fix initial values for some aspects
Change-Id: I6ca0360587c2af91d267b59efa9d7bc208b806cd
Reviewed-by: hjk <hjk@qt.io>
2021-02-19 11:41:16 +00:00
Jarek Kobus
cb7b3dd817 ClassView: Move delaying of update into the main thread
Minimize the communication with parser's thread.
Don't call getParseDocumentTree() multiple times
when subsequent request for the same document comes
before the timeout.
Don't queue again already queued documentUpdated()
signal (it's emitted form non-gui thread).
Prepare for moving the calls to SessionManager out of the
parser's thread.

Task-number: QTCREATORBUG-25317
Change-Id: I5d4898b5addbb589d415e00c66de5cba7b96d512
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-19 10:29:45 +00:00
Jarek Kobus
aeac17ecf5 ClassView: Reparse the tree when files are removed
In order to refresh GUI, call reparse after files are removed.

Task-number: QTCREATORBUG-25317
Change-Id: I8f29c042c9002587dd791800597af0e42e19856e
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-19 10:21:25 +00:00
hjk
fabd449236 Utils: Consolidate some label related bits of aspects
Change-Id: I55706c87a17f1d011d53ada6055290d4aab2d425
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-19 10:10:33 +00:00
Leena Miettinen
c57d9c2a9c Doc: Describe disabling Clang checks from Output pane
Task-number: QTCREATORBUG-25162
Change-Id: Id80094fda3a5b4655f38ce22e345b96457991f73
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-19 09:56:21 +00:00
Leena Miettinen
77e76d22f8 Doc: Accommodate changes made to Library view
Fixes: QDS-3718
Change-Id: I04b3809d23341fb26484b5f3ec63b710042fbf66
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-19 09:28:20 +00:00
Jarek Kobus
d05d9fc65c QmlJS: Inline getter
Change-Id: Ife8a2b0d6eb67ee28a4de808c1c848dbf633c49b
Reviewed-by: hjk <hjk@qt.io>
2021-02-19 08:46:57 +00:00
Jarek Kobus
38bc3dd308 Remove unneeded Q_UNUSED
Change-Id: Ia773eb99e1d50bf6ecdc128e5c75dc5e1c5a1459
Reviewed-by: hjk <hjk@qt.io>
2021-02-19 08:46:47 +00:00
Jarek Kobus
aef1bb943d Use QMutexLocker in conjunction with QWaitCondition
Change-Id: Ia5d55b9161a58387b0806e792f0fb1b21f118330
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-19 08:20:09 +00:00
Michael Weghorn
2d8dff4a8a Debugger: Avoid exception with GDB 10 to fix running dumper tests
Since GDB commit 1ba1ac88011703abcd0271e4f5d00927dc69a09a [1]
("gdb: Enable stdin on exception in execute_gdb_command",
committed 2020-01-24), stdin for GDB is re-enabled whenever
an exception is caught during 'gdb.execute()'.

When running the dumper tests for GDB, such an exception
was thrown when loading the qtcore library, resulting
in the GDB commands after the 'run' command (s.
'tst_Dumpers::dumper') to be be handled by GDB prematurely
when loading the library instead of when reaching the
end of the test program.

This resulted in the dumper tests failing with output like

    29: (gdb)
    29: &"up 0\n"
    29: &"No stack.\n"
    29: ^error,msg="No stack."
    29: (gdb)
    29: &"python theDumper.fetchVariables({'token':2,'fancy':1,'forcens':1,'autoderef':1,'dyntype':1,'passexceptions':1,'testing':1,'qobjectnames':1,'expanded':['local']})\n"
    29: &"Traceback (most recent call last):\n"
    29: &"  File \"<string>\", line 1, in <module>\n"
    29: &"  File \".../qt-creator/share/qtcreator/debugger/gdbbridge.py\", line 711, in fetchVariables\n"
    29: &"    variables = self.listLocals(partialName)\n"
    29: &"  File \".../qt-creator/share/qtcreator/debugger/gdbbridge.py\", line 597, in listLocals\n"
    29: &"    frame = gdb.selected_frame()\n"
    29: &"gdb.error: No frame is currently selected.\n"
    29: &"Error while executing Python code.\n"
    29: ^error,msg="Error while executing Python code."

Avoid the exception by first trying to 'gdb.execute' the
command that works for GDB 8+ and fall back to the command
for earlier GDB versions, i.e. reverse the order. That
should be fine for all GDB versions, given the commit
mentioned above is only contained from GDB 10 on.

While at it, move the assignment to 'cmd' into the
corresponding 'try' blocks to make the context a bit
clearer.

[1] https://sourceware.org/git/?p=binutils-gdb.git;a=commitdiff;h=1ba1ac88011703abcd0271e4f5d00927dc69a09a

Change-Id: I2d1bb52a777801e6bd77a5eda581a2fd5dd3a18f
Reviewed-by: hjk <hjk@qt.io>
2021-02-19 08:14:31 +00:00
Jarek Kobus
ee77958998 Use atomic_bool and drop QMutex locking
Change-Id: I70d472b0de717467c53bbb29cc407367b7e80e7f
Reviewed-by: hjk <hjk@qt.io>
2021-02-19 08:02:16 +00:00
David Schulz
e4fba42a8a LSP: fix WorkspaceEdit documentChanges key
Change-Id: Iff6799cc171dc6857fde6d947f0eb081687364f4
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-19 05:33:17 +00:00
Mahmoud Badri
43eaa09b11 Add components library expand/collapse all context menu options
also change import name from "library" to "module" and relevant tweaks.

Task-number: QDS-3589
Change-Id: Ib467dda61b6720cebe843e34cb807aee6221f5cb
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
2021-02-18 18:43:57 +00:00
Eike Ziller
c26b31b7f7 Update to latest qlitehtml
Fixes installation of library in the Qt Creator directory.

Change-Id: I7833431242c114dc247dd7e1121493a8aa3ec4f7
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2021-02-18 16:50:01 +00:00
Christian Kandeler
d3deefc3a4 Core: Streamline SearchResultWindow interface
That is, make SearchResultItem the one data type for adding search
results.
This will allow us to add additional properties to search results
without adding more and more parameters to a bunch of functions.

Change-Id: Ic2740477ae47449cee75caa2525727fe2b460f91
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-18 16:46:08 +00:00
David Schulz
fa5fdef6e1 LanguageClient: clean up client interface declaration
Change-Id: I18b5b8a5b39a6be7c538054385c7dca188676eef
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-18 16:15:24 +00:00
hjk
a2d6c2b34a Utils: Consolidate more aspect functionality
The concepts of 'value', 'defaultValue' and changed signals are present
in a few aspects, with varying implementations. Time to get things
sorted out.

The values are stored now as QVariant in the base, with typed accessors
in the derived classes, keeping the user visible interface the same.

Change-Id: I4d37ef5c7a9795f46ce1bbbabc6a251222b1d54e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-18 15:55:25 +00:00
David Schulz
acd33a45d8 Java: add java language server settings
Change-Id: Ic8e8ce5833052fcbb3acb004ae577722e2ef8fc3
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2021-02-18 13:56:42 +00:00
Cristian Adam
fc411cd0d1 CMakeProjectManager: Make backup of CMake configuration before starting CMake
CMake's fileapi functionality will save the project structure in json
files in the .cmake/api/v1/reply directory.

When issuing a cmake command with -D variables CMake will update its
CMakeCache.txt file even if cmake will fail.

This commit will rename .cmake/api/v1/reply as .cmake/api/v1/reply.prev
and make a copy of CMakeCache.txt before starting CMake, and if
something fails, replace the existing files with the previous values.

Also make sure the changed values are not dissappearing when the
old .cmake/api/v1/reply gets parsed.

Fixes: QTCREATORBUG-24593
Change-Id: I82141786fea7068699e0f761a8978ba1f3203e47
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2021-02-18 13:21:11 +00:00
hjk
2fb9d08082 Utils: Don't use ptrace in the process stub
Previously, ptrace was used to keep a tight hold on the spawned process
across the exec(), followed by raising a SIGSTOP to allow un-racy
attaching a debugger.

This makes implementation of 'Run as root' more difficult and is
apparently not needed: instead of the ptrace use, the SIGSTOP can be
raised directly, before exec().

Change-Id: I36025ac547b2a335e2a203c728d221830e4c0a7d
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2021-02-18 13:18:21 +00:00