Commit Graph

75521 Commits

Author SHA1 Message Date
Jarek Kobus
1192441a31 Scxml Magnifier: Don't install event filter on qApp
After 1ba6faeea0, where
activating the magnifier with Alt key was disabled,
the fix in 158fd92558
isn't needed anymore.

Amends 158fd92558
Amends 1ba6faeea0

Change-Id: Ibeb90fa246d576f8d7fe2cf2a64fa7a9cc6d30f2
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-03 11:50:19 +00:00
Jarek Kobus
7bd33bc247 VcsCommand: Remove defaultWorkingRepository() getter
It wasn't really broadly used.

Change-Id: If2e185a7d8d0f920f3ec7f507bf96dd81f4559b0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-03 11:30:36 +00:00
Jarek Kobus
a5683616b9 VcsCommand: Fix timed task's future interface
Pass the future interface of the running task into
ProgressManager::addTimedTask() instead of not
related future. In this way canceling the timed task
(after pressing the small x button) makes the
future interface canceled in the worker thread.

Change-Id: I4596823d40bd079841e59c9bdba025d30cb33711
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-03 11:30:31 +00:00
David Schulz
0a2510edcb Python: skip root on venv detection
Virtual environments on the root level are uncommon and can cause issues
on some linux distros.

Fixes: QTCREATORBUG-27976
Change-Id: I266f1b321c1c2d2b4b416acf3f34ce8c1d686219
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-03 10:55:30 +00:00
Orgad Shaneh
195fc29ef5 Gerrit: Show command and failures in testConnection
Can be useful when authentication fails.

Change-Id: Ibd3700c4ce9cc76b0d9c4cde32730a4e1906ccd6
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
2022-08-03 10:17:49 +00:00
Orgad Shaneh
b3b36f7d2a Gerrit: Refresh server details also when authenticated is changed
For example, if the server was not authenticated, and .netrc was edited
outside Qt Creator.

Change-Id: Ib28b6e924e3fab958410da49ceb45ed4269e195b
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-08-03 10:17:34 +00:00
David Schulz
5aa987b6a5 LanguageClient: fix outline focus
Setting a focus proxy to the outline widget makes sure the tree view
gets the focus whenever the oultine widget gets focus, so after opening
the outline the user can directly use navigation keys to move the
selection in the outline.

Fixes: QTCREATORBUG-27595
Change-Id: I0771c99ccf5aa334f45065d58366b53f53bf75a5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-03 09:54:27 +00:00
hjk
dac9dff459 Gerrit: inline authenticationdialog.ui
Also, replace /#/settings/http-password by /#/settings/#HTTPCredentials

There should probably be some stretch between the form and
the buttonbox, but it wasn't there in the .ui so I left it
out for now.

Change-Id: Ie07a3283261a1070a489e454f9fb86c0c6dc2ca8
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-03 09:44:08 +00:00
Samuel Ghinet
86f93b8949 Sync color between environment map and 3D Editor background
Task-number: QDS-7097
Change-Id: I5f2c83bc43bd589d0d1f32e01e7512ab20a03bcf
Reviewed-by: Miikka Heikkinen <miikka.heikkinen@qt.io>
Reviewed-by: Mahmoud Badri <mahmoud.badri@qt.io>
2022-08-03 09:35:11 +00:00
Cristian Adam
de08f08a21 clangd: use QTC_CLANGD_COMPLETION_RESULTS as default value
If the user set the QTC_CLANGD_COMPLETION_RESULTS environment variable,
use that value as the default value for the settings page widget value.

Change-Id: I525e8bb4a5631b7d8461f18d1fc5c6972bd758cb
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-03 09:15:56 +00:00
hjk
8a44294821 Merge remote-tracking branch 'origin/8.0'
Change-Id: Iea4fd2949f5d5345802e2e7d9283d72c6c55f69f
2022-08-03 10:52:13 +02:00
Christian Kandeler
c6399adf48 CppEditor: Remove some virtual functions from ModelManagerSupport
These were never called via the base pointer.

Change-Id: Ib233d9e93d80b1fbcc09a5b7b07d9fa3b8615f66
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-03 08:27:58 +00:00
hjk
c1d75d8df7 Debugger: Add simple dumper for QKeySequence
Change-Id: I097336fb77ff34e94c9096b51a511b3a0f2c86d1
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-03 08:18:53 +00:00
hjk
f14634a651 Debugger: Fix bitfield dumping with Python 3
Change-Id: I2959a2e14c6f25e29460de74ea95a16a5226d48e
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-03 08:18:39 +00:00
Marcus Tillmanns
c0b3cc1bbc FilePath: Fix setFromString root for partial path
Change-Id: I3a9352a364c71a8463736b25086a0493ae5c5d31
Reviewed-by: hjk <hjk@qt.io>
2022-08-03 07:09:55 +00:00
Jarek Kobus
8e48dd5c92 VcsCommand: Remove unused field
Change-Id: I14ce1c616bb98bef127aec666ca9241e63584e40
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-03 06:12:01 +00:00
Jarek Kobus
191fc196d5 VcsCommand: Remove one addJob overload
Remove defaultTimeoutS field, as it wasn't broadly used.

Change-Id: I0056788b066eb6d682d5ba7acdb01d5dd3568967
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-03 06:09:44 +00:00
Jarek Kobus
d2a1198a7b ClearCase: Remove unused includes
Add some forward declarations.

Change-Id: If7b55d57484f9ab7b03e3919a7ba52f243fc5de0
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-03 06:09:39 +00:00
Jarek Kobus
6129157f57 ClearCase: Simplify isConfigured()
Make executable check inside ClearCaseSync::run()
consistent with isConfigured().

Change-Id: Idc08dcdf87005937b1299a0d033c4cf2503f63a4
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-03 05:20:11 +00:00
David Schulz
a35d56ca2e Core: remove suspended entry from file path cache
... when cleaning up suspended documents on session switch.

Fixes: QTCREATORBUG-28021
Change-Id: I6ef9fda96162d56758f176381b1eabe47eb8770f
Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-03 04:51:26 +00:00
Jarek Kobus
b84c22b2fd ClearCaseSettings: Use FilePath for ccBinaryPath
Change-Id: I0de348d0b99a1f81d75418a7927c989283c4137a
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-02 17:34:40 +00:00
Jarek Kobus
278d297397 VcsCommand: Simplify public runCommand()
Get rid of unused workingDirectory (default working
directory will be used) and exitCodeInterpreter.
Simplify internals a bit.

Change-Id: I2a7547e5a594dd7a21f390daeb06778656e9e971
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-02 17:34:31 +00:00
Marcus Tillmanns
b2f0f78bdc filepath: Fix windows driver letter handling in fromString()
Change-Id: Ic66e468ed2161bc10136ab31dc29a7358e6d7397
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: hjk <hjk@qt.io>
2022-08-02 13:59:29 +00:00
Christian Kandeler
98a39401db CompilationDatabaseProjectManager: Be more careful with filtering
Do not blindly remove all flags that contain the file's base name.

Fixes: QTCREATORBUG-27990
Change-Id: Ib51b65a8694e82ec22af859176b0db0e5d86b5f0
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-02 13:50:14 +00:00
Christian Stenger
1c34105dfc Squish: Register result item type
Needed to be used in queued connections.

Change-Id: I2911a5ff73d2be0b406fcfa9f073764b3edfbe9d
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-02 12:40:28 +00:00
Christian Kandeler
2b8ac45071 ClangCodeModel: Move "find references" into its own class
Change-Id: If4dc9f7cb56b7f2e03e3d4622e616fb8486ddc92
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-02 11:48:22 +00:00
Knud Dollereder
b52177119f Fix wrong optimization in the timeline settings dialog
The timeline settings dialog used a static QString to cache the
last inserted expression binding value.
This caching fails when the user modifies the expression in the
text editor since the cached string is not updated in that case.
This patch removes the caching since this optimization is negligible.

Fixes: QDS-7162
Change-Id: I0122b29180afbfe5b867063139c924efa6e17ea3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
2022-08-02 11:32:34 +00:00
Christian Kandeler
2f169bdfcb ClangCodeModel: Make some ClangModelManagerSupport methods static
Change-Id: Ie34a89ae01783631c6482cff8d4866595e757be5
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-02 11:21:16 +00:00
hjk
df4155f617 App: Use more local methods to trigger memory trim timer
The global event filter function is executed often, for events
originating deep in the widget hierarchy even multiple times.

Triggering the timer only by mouse and key presses on the main
application and on texteditor is less intrusive and still happens
often enough (TM).

Change-Id: I848d55a347bd62d12e8523965d1750c59da33116
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-02 11:18:12 +00:00
Jarek Kobus
9177649cab QMakeStep: Use Utils::Guard
Change-Id: I1fbc830620cb2db42ac71e3c02e1d3993197a727
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
2022-08-02 10:10:55 +00:00
Jarek Kobus
5434ea417f ProjectConfigurationModel: Avoid using sender()
Change-Id: I65a2da1f2e8a5d3bb98bda752942d83e4074df9d
Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
2022-08-02 10:10:41 +00:00
Christian Kandeler
240105f55f CppEditor: Clean up ModelManagerSupport creation
No need for "providers" etc.

Change-Id: I4ae9e8ecd6b3554711e002f233c13fd7758f01e4
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-02 09:15:55 +00:00
Christian Kandeler
dd37abed6b CppEditor: Remove unused code
Change-Id: Ife0f6609a55de903f5f90af0dc6b72209e02f5af
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-02 09:15:32 +00:00
Christian Kandeler
a82406eb27 Utils: Add shortcut for buttons in environment dialog
Task-number: QTCREATORBUG-27887
Change-Id: Ifb52d24354b1042cdb1ccb4ca898a251cbac1039
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-02 09:13:46 +00:00
Christian Kandeler
5f9c30cacf ClangCodeModel: Do not make clangd open all ui headers
This amends 01ceb3a3cb, where we failed to
consider the case of projects with lots of UI headers, which cause
excessive memory use by clangd with our current simplistic approach.
Instead, we now only open ui headers that are used by currently open
documents.
Note that this approach will fail for indirect includes via header files,
but people who do that do not deserve happiness.

Change-Id: I1ef2add701e0f13dc0da79267d3c1367c1b496cc
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Cristian Adam <cristian.adam@qt.io>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-02 09:13:25 +00:00
Christian Kandeler
a6d1f7594c ClangCodeModel: Fix documents getting opened in wrong clangd
This amends 96be267a6e, which contained a
wrong assumption: Just because a ClangdClient has an associated project
does not mean that all documents currently open in this client belong to
its project. The opposite often happens at session loading. For example:
    - We load a session with two projects.
    - Qt Creator restores the documents and starts loading the projects.
    - The latter happens asynchronously and takes longer, so initially
      the fallback client claims the documents.
    - The smaller project finishes first and now grabs all the open
      documents whose files belong to it, as well as those that don't
      correspond to any project (as per
8ad7ab2d2a).
      This includes all documents belonging to the second project,
      because that one has not finished loading yet, so its files are
      not associated with a project at the moment.
    - Finally the second project finishes loading. Now we must
      "steal back" all its documents that are currently open in the
      first ClangdClient. This is what this patch does.
We also now explicitly close the document in the previous client as part
of the hand-over, which is conceptually the right thing to do and should
eliminate any potential "ghost diagnostics".

Change-Id: I3d9f5ce503cc7ee47ece757d81851b85a16b639d
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-02 09:10:37 +00:00
Jarek Kobus
0a7f76ca8d VcsCommand: Get rid of setCookie()
Remove cookie arg from finished() signal, as it's not used
currently. Thus, remove setCookie() method.

Change-Id: Iedd328aece776eebd2d161a36ec28370b8bc4bfc
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-02 09:00:01 +00:00
Jarek Kobus
2c51907b4b VcsCommand: Limit the usage of setCookie()
It looks like the cookie set inside GitClient::vcsExecAbortable()
is never read back again. The only place where we connect to
finished() signal of the command returned by vcsExecAbortable()
is GitClient::pull(), however, we ignore the cookie there.

Change-Id: Iaec08b255309ea406e45695231fe9849d5dc7285
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-02 08:59:56 +00:00
Jarek Kobus
6e160b2088 VcsCommand: Limit the usage of setCookie()
Use lambda capture instead.

Change-Id: I43ff080c4909ecf12fd330c8db9a1f0bfb497011
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-02 08:59:52 +00:00
Jarek Kobus
09fb9f3973 VcsCommand: Limit the usage of setCookie()
Don't use setCookie() for setting the push failure status.
Introduce a PushHandler helper that keeps the data collected
when stdErrText() signal is emitted and reuse it when
finished() is being called. Move m_pushFallbackCommand
field into the helper, as its value is meaningful only
in context of the invoked command.

Hide PushFailure enum inside PushHandler.

Change-Id: Id21457734f32e06bb130c3c07c24cb2b7af6e466
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-02 08:59:46 +00:00
hjk
7b8c053c25 Docker: Set logging level to QtWarningMsg
Consistent with the rest.

Change-Id: Ia6ac7476e8b22ca1bf65005dcb4c5a7a2bcc50ac
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-08-02 08:28:50 +00:00
Jarek Kobus
c55fcac6c5 CdbEngine: Remove unused field
This field in only set, but never read.

Change-Id: Ie42ccad32ca90e1b4a0dd9f4c2e213ea4c3ca180
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-02 08:05:27 +00:00
hjk
87e156fc41 Utils: FilePath::setFromString microoptimizations
Mostly relevant for debug builds.

Change-Id: I3d3789d5ef535afbb87339a75bed076cd548dda3
Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Reviewed-by: hjk <hjk@qt.io>
2022-08-02 06:20:30 +00:00
Jarek Kobus
1d0f553ac5 VcsCommand: Limit the usage of setCookie()
Don't use setCookie() for setting the line number
to be shown on annotation. Add setDefaultLineNumber()
setter to VcsBaseEditorWidget instead.

Change-Id: I6c52874d48532132a27b2a7a9d161705170f7ade
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-02 06:11:25 +00:00
David Schulz
9664010b44 Autotest: move global static into function
Change-Id: I31dcbbba430ce7856e3dd8d7b907d01cd09112e8
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-08-02 06:08:35 +00:00
Christian Stenger
3c41f7fe3c AutoTest: Do not use reference for file content
Change-Id: Iadad6c84e148604fa04d491f59be2d3a0987517b
Reviewed-by: hjk <hjk@qt.io>
2022-08-02 06:05:42 +00:00
Christian Stenger
28a99221ee AutoTest: Prevent possible crash
Change-Id: Ic27a9623ea910b21ccb99c7cd603cfa3d1369d12
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-02 06:04:57 +00:00
Christian Stenger
1838f63958 VcsBase: Fix compile
Change-Id: I2fc2e1e97f6ec929a65eaa0ef407126ece850003
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-08-02 05:45:57 +00:00
Jarek Kobus
3fcde6c5eb VcsCommandPage: Get rid of unneeded arg in finished() handler
Change-Id: I7087b8568f674a135ded11d923b3a36c7a16d987
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-01 17:26:32 +00:00
Jarek Kobus
0de4e9092f VcsCommand: Remove cookie() method
Change-Id: I2f83e141b05100c84c140d15a131e06ee62c6f68
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2022-08-01 17:25:59 +00:00