Commit Graph

5 Commits

Author SHA1 Message Date
Eike Ziller
275dcc8f8a File System view: Select root folder when clicking outside item
If the shown items are not filling the whole view, there is some empty
space at the bottom. Select the current root directory when the user
click there.

This avoids funny behavior. Without that change
- select a file or subdirectory in a directory
- collapse the parent directory
- the selected file or subdirectory stays selected, but that is not
  visible
- right-click into the empty space at the bottom
- the context menu for the not-visibly selected item is shown
- this is especially weird when e.g. choosing "New Folder"

That is not an issue if the view fills the whole space, because then a
visible item is selected when clicking.

Change-Id: I0c65e091e659c20d7b384e96ecf69c36379ed936
Reviewed-by: David Schulz <david.schulz@qt.io>
2022-02-02 08:54:39 +00:00
Eike Ziller
2fab827782 Support external editors for locator, projects and file system tree
When setting an external editor as the default editor in the MIME type
settings.

Other operations like File > Open, or when using navigation shortcuts
like Follow Symbol, and stepping with the debugger will still always
open the file within Qt Creator. The Open with... menu can still be used
to explicitly open a file in an external editor afterwards.

One of the use cases is to be able to open some files that would
otherwise unhelpfully be opened in Qt Creator's binary editor in the
systems default editor.

Fixes: QTCREATORBUG-13880
Change-Id: I852f097da8badd10de78b74e7078987447eebe98
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
2022-01-25 12:35:55 +00:00
Eike Ziller
195abefe7d EditorManager: Remove QString openEditor(At) overloads
In favor of the FilePath/Link ones.

Change-Id: I5caf9e0f8de304ff4ee12329557aa50a6f3a0c69
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-11-02 08:11:14 +00:00
Eike Ziller
b5fd63b431 Merge remote-tracking branch 'origin/6.0'
Change-Id: I9b824b8bb7b0b5d76e9e8f28f909b542adf773f0
2021-10-27 12:05:08 +02:00
Eike Ziller
dc5717bd06 Move File System view to Core plugin
So it can be accessed from a wider range of places.

Change-Id: I282883addecf7bb070a65d9f4f7b8e6e2e4b5e47
Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
Reviewed-by: David Schulz <david.schulz@qt.io>
2021-10-27 09:02:23 +00:00