summaryrefslogtreecommitdiff
path: root/src/plugins/projectexplorer/projectexplorer.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Separate session loading from project managerEike Ziller2023-05-171-1/+1
| | | | | | | | | Move the generic parts to session manager and let the project manager load its parts separately. Change-Id: I14ee3311ab0c0f40444674b82cee1e4bb0fb9daf Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Session: Minimize direct use of reader when loading sessionsEike Ziller2023-05-171-2/+2
| | | | | | | | | | | | | | | | | Instead of directly reading things like the project list from the reader, add a map of "session values" in the session and read these from the reader once, then use the session to access these values while loading the details of the session. This is in preparation of separating the session loading from projectexplorer. This is similar to Session::(set)Value. We cannot use the same (set)Value methods directly though, because of differences in the handling of these values during implict and explicit default session loading. Change-Id: I9a4f38a9f958734d20d6e6eb7253f9e44ba1285e Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* Move restoring startup session to SessionManagerEike Ziller2023-05-171-108/+21
| | | | | | | | | | | It needs to be done after the delayed restoring of kits, so this now implicitly depends on ICore::coreOpened coming after restoring kits has triggered on the event loop before, which is ugly, but works (and is at least guarded by a warning). Change-Id: Ie8676b1c7f4d099fb83f0f2a0f2e5677c4a0b999 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Session: Move some settings saving to session itselfEike Ziller2023-05-171-6/+0
| | | | | | Change-Id: I306bb86f1fda03f9b34efd7101d405ed64076711 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* RunConfigurationFilter: Remove the old matchesFor() implementationJarek Kobus2023-05-161-75/+19
| | | | | | | | Since the base class vanished, rename the filters so that they have the common prefix now. Change-Id: I21c8d1f3ea3c3ad22063d7db8be72e66d449e701 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* ProjectExplorer: Use PagedSettings for BuildPropertiesSettingsPagehjk2023-05-111-1/+0
| | | | | | | More compact. Change-Id: Id35c3e8eeb54039a6769730fecc6b862fefc10e1 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* ILocatorFilter: Simplify Sync's onSetup in matchersJarek Kobus2023-04-271-2/+1
| | | | | | | | | | | | | | Remove no longer necessary bool return value from onSetup functions and from refresh recipe functions, see df5e3c587a045fbd3d50233ecdde0e06dccf35a3. By default, when no return bool is specified inside a function passed to Sync element, it's assumed that the return value is true. Eliminate passing "=" captures in 2 lambdas. Change-Id: I5005821444a386f70c0f05322812f98d3fd49926 Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* RunConfigurationLocatorFilter: Reimplement matchers()Jarek Kobus2023-04-271-14/+73
| | | | | | | Change-Id: I36a0aca3eac0ecb7988e1c68056601054837b4ad Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* ProjectExplorer: Keep "Run" entry in top-level project node visibleChristian Kandeler2023-04-261-3/+3
| | | | | | | | | | Enable/disable instead of show/hide, for more stable UI. Fixes: QTCREATORBUG-29042 Change-Id: Ie2c37b3cb127f9dffaf42570f11b2cca6accd3fd 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>
* ProjectExplorer: Drop known namespacesJarek Kobus2023-04-201-37/+33
| | | | | | | Change-Id: I969a7f6c8e54c89b047611890a7ba80f4829d73b Reviewed-by: Christian Kandeler <christian.kandeler@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* RunConfigurationLocatorFilter: Use Acceptor for LocatorFilterEntryJarek Kobus2023-04-201-59/+41
| | | | | Change-Id: Ia48aa149ee2c4cd3653ba7a4313f1578034ad9d8 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Show locator filter descriptions more prominentlyEike Ziller2023-04-181-8/+7
| | | | | | | | | | | - Sort items in the menu. - Disable items for disabled filters. - Show a tool tip when hovering over the magnifying glass menu. - Add descriptions to all filters and make them more consistent. Change-Id: Ic03e303c50422f9de5dd3c512fe32bbdc958d2ba Reviewed-by: David Schulz <david.schulz@qt.io> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org>
* DirectoryFilter: Hide public methodsJarek Kobus2023-04-111-10/+9
| | | | | | | | | | | | 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>
* PE/Qnx: Disentangle BuildStep factories from downstream furtherhjk2023-04-041-0/+2
| | | | | | | | | The idea is to only expose factories with properties and not the actual step implementations. Change-Id: I72dc3944993f898f12b6a9bec11317f87e45c648 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Terminal: Add enable settingMarcus Tillmanns2023-03-231-7/+5
| | | | | Change-Id: I13cca8b2d4c55df7db29807c1252718e2819ea0b Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* ProjectExplorer: Add a generic copy stephjk2023-03-141-0/+3
| | | | | Change-Id: I6b4a70e3f71776f7009c0419c8d2f41dfd1c704d Reviewed-by: Jarek Kobus <jaroslaw.kobus@qt.io>
* ProjectExplorer: Remove IDevice::terminalCommandMarcus Tillmanns2023-03-021-7/+24
| | | | | | | | Since Terminals can now be started for device file paths, there is no need anymore for IDevice::terminalCommand. Change-Id: I01c831ea7ee29d53efa6880631e8c6d54a4316aa Reviewed-by: Cristian Adam <cristian.adam@qt.io>
* ProjectExplorer: Move some not-fully-session related bitshjk2023-03-011-85/+86
| | | | | | | | | | | | | | | ... out of SessionManager. The idea is to later move SessionManager into the Core plugin, which both is sensible conceptually and also prerequisite to merge the Bookmark plugin into TextEditor plugin. Currently, only the interface is split, as the load/save implemetations are non-mechanical to disentangle. Change-Id: I31631db3094ea192825a2ccaa6add6188662940b Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Terminal: Coverity warning fixesMarcus Tillmanns2023-02-271-1/+3
| | | | | Change-Id: If96291ff6df97f7e85840eb0951cc3f4abfab0f6 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Merge remote-tracking branch 'origin/10.0'Eike Ziller2023-02-271-1/+2
|\ | | | | | | | | | | | | Conflicts: src/plugins/debugger/watchhandler.cpp Change-Id: If759b6260dfa008738d3a0ce543eb0eead8a8bba
| * Avoid triggering device login from recent project listEike Ziller2023-02-231-1/+2
| | | | | | | | | | | | | | | | | | We filter the list of recent projects for existing files, but for remote projects that triggers a login request directly at startup. Just don't check projects on devices. Change-Id: I786745a7bee9c8984b926886bcae9fe825f7649a Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io>
* | Terminal: Add Terminal pluginMarcus Tillmanns2023-02-241-2/+27
|/ | | | | | | | | | | Adds a new Terminal plugin that provides a Terminal pane inside Qt Creator. Fixes: QTCREATORBUG-8511 Change-Id: I7eacb3efa2463d7df9f383ae3fc33254fb9019a9 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Use new plugin test object setuphjk2023-02-171-5/+3
| | | | | | | | Here a bit less mechanical due to the indirection. Change-Id: Ia328a267ad0adc0ce1ea1ad56ffc67dc67666418 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* LocatorFilterEntry: Add linkForEditorJarek Kobus2023-02-161-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make it of std::optional<Utils::Link> type. Use it for: 1. Removing duplicates 2. Showing link inside editor Before, QVariant internalData was used in above cases. Rationale: 1. Removing duplicates between results from different ILocatorFilter makes only sense if accept() overload for these filter types are the same (i.e. the implementation is repeated). Otherwise, we are loosing some functionality when some result is removed. Taking into account that original intention was to eliminate duplicates for filters where we do BaseFileFilter::openEditorAt() inside accept(), we store linkForEditor in 3 cases (instead of storing internalData): - BaseFileFilter - FileSystemFilter (only existing file case) - OpenDocumentsFilter We don't save a linkForEditor where we stored QString inside internalData in the following cases: - JavaScriptFilter - FileSystemFilter (non existing file case) Before, in above cases, we could have filtered out some results unintentionally. This patch should fix it. Now, we remove duplicates only for enties that have value for linkForEditor. 2. Use directly linkForEditor, if exists, for opening editor. This patch aims to decrease the number of different responsibilities of internalData by 1. Make 3rd arg of LocatorFilterEntry c'tor default. Change-Id: I144c58661d7456bb5991f8077dc103272dfab194 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: David Schulz <david.schulz@qt.io>
* Translations: Replace QCoreApplication::translate() with Tr::tr()Alessandro Portale2023-02-101-2/+2
| | | | | | | | | Calling <Module>::Tr::tr() is preferred over QCoreApplication::translate("::<Module>", "..."). This changes occurrences in .cpp files. Change-Id: I3311ef0dbf3e7d105a3f181b6b988f3b444468f1 Reviewed-by: hjk <hjk@qt.io>
* ExtensionSystem: Remove the IPlugin back pointer to pluginspechjk2023-02-101-1/+2
| | | | | | | | | | | | | The price of having to loop in two places seems small compared to cleaner relations between the classes. There's a new hack in the helpmanager to make sure we aren't looping to often. The hack wouldn't be needed if the (odd(?)) check there weren't there. Change-Id: Ifed50213b2de8feedfb45c185808d163c00c19ca Reviewed-by: Eike Ziller <eike.ziller@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* ProjectExplorer: Show recent projects with native pathsAlessandro Portale2023-02-031-2/+5
| | | | | | | | | | | The paths in the "Recent Projects" menu, in the recent projects list on the welcome screen and those in the sessions list on the welcome screen were shown with non-natice directory separators on Windows. This fixes it for project FilePaths with osType() == OsTypeWindows Change-Id: I26afd56a82e32992f04bb3f2f1e2c1e767208ce5 Reviewed-by: David Schulz <david.schulz@qt.io>
* ProjectExplorer: Tr::trhjk2023-01-161-195/+187
| | | | | Change-Id: I8f1b463c5cc7a53627f7a9ad261998b92f13e56a Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* ProjectExplorer: Move settings structures out of Internal namespaceJarek Kobus2023-01-131-1/+1
| | | | | | | | | | | There is a public exported API that returns these structures, and different plugins use it, so there is not point in keeping them inside Internal namespace. Remove some unused includes. Change-Id: Ia9d3fc83738c38ae37f04ae0f518ec5d972c9d85 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Prefix Tr::tr contexts with ::hjk2023-01-131-1/+1
| | | | | | | To make outliers better visible in Linguist Change-Id: Ic35ea2a858b7e3576d9a416fb494fddb616eaaa1 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectExplorer: Introduce and use convenience factory classhjk2023-01-101-8/+5
| | | | | | | ... to create SimpleTargetRunner runners for a single run config. Change-Id: I8af3d7cdcaf54f0584af948aa6e0fa015d1a3077 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Rename most FilePath::{from,to}Variant uses to {from,to}Settingshjk2023-01-101-1/+1
| | | | | | | | Specifies the main purpose more clearly. The remaining ones a "true" (internal) variants in models and as action data. Change-Id: I8dd3c846e419f29d88283c2f48268ef6685b19fe Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* MacroExpander: Generalize registration of project variablesEike Ziller2023-01-091-114/+12
| | | | | | | | | | We provide global macros for ActiveProject and CurrentDocument:Project, but these were completely separate, and the CurrentDocument:Project one comparatively incomplete. Unifiy them. Change-Id: I2622012f2c760e9f5b328766eca9d64c0bf9c5b1 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* MacroExpanders: Remove legacy "Current(Project|Build|Kit)" variablesEike Ziller2023-01-091-25/+1
| | | | | | | | | Should use "CurrentDocument:....." now. Change-Id: Ie47f0e0f77b506bef6fc7a173aec8cfdcf863e5e Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* Remove GPL-3.0+ from license identifiersKai Köhne2023-01-061-1/+1
| | | | | | | | | | | | | | | Since we also license under GPL-3.0 WITH Qt-GPL-exception-1.0, this applies only to a hypothetical newer version of GPL, that doesn't exist yet. If such a version emerges, we can still decide to relicense... While at it, replace (deprecated) GPL-3.0 with more explicit GPL-3.0-only Change was done by running find . -type f -exec perl -pi -e "s/LicenseRef-Qt-Commercial OR GPL-3.0\+ OR GPL-3.0 WITH Qt-GPL-exception-1.0/LicenseRef-Qt-Commercial OR GPL-3.0-only WITH Qt-GPL-exception-1.0/g" {} \; Change-Id: I5097e6ce8d10233993ee30d7e25120e2659eb10b Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Utils: Make Utils::withTildeHomePath a FilePath memberhjk2023-01-051-1/+1
| | | | | | | | Gets .osType() right in remote cases. Change-Id: I6397996062d976d7db690c5729dd4faa1f459563 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Remove unused variablesJarek Kobus2022-12-091-1/+0
| | | | | | Change-Id: I653f6fa71bb04e049d4e1848a7e38a606692e678 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Fix unrelated tooltip appearingChristian Kandeler2022-12-091-1/+3
| | | | | | | | | | ... on clicking into the locator widget. This removes a workaround for a different problem which is much less visible. Real solution to be implemented later. Amends 4c1b3c863cdf90f8df62a11de31acfec03ed39e0. Change-Id: I7e7902c90367c8ed59af4e5aabaf5514207b00de Reviewed-by: hjk <hjk@qt.io>
* ProjectExplorer: Add "Generate" sub-menu to build menuChristian Kandeler2022-12-081-0/+19
| | | | | | | | Preparation for adding more generators. Task-number: QTCREATORBUG-28149 Change-Id: I4afa183a6fbd8ee88fc978b382f28cf9e52f09e9 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* Utils: Remove FilePath::operator+()hjk2022-11-301-1/+1
| | | | | | | | | This was a alias for .stringAppended(), but can be used too easily when .pathAppended() is meant. Change-Id: Ia3b64d39828d4074b43d87c923ce3a6a87038948 Reviewed-by: Christian Stenger <christian.stenger@qt.io> Reviewed-by: <github-actions-qt-creator@cristianadam.eu>
* Merge remote-tracking branch 'origin/9.0'Orgad Shaneh2022-11-281-4/+3
|\ | | | | | | Change-Id: I231d35f492713f317773b79478b5f7fb97a4fe50
| * Make it possible to select default session from menuEike Ziller2022-11-251-4/+3
| | | | | | | | | | | | | | | | | | | | when we are in the limbo state where no session has been loaded, and the default session has not been explicitly created or loaded yet. Fixes: QTCREATORBUG-28393 Change-Id: I66d69561e18b5073a477d90c1926074e3cd97cee Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* | Core: Rename DocumentModel::fileName() to filePath()hjk2022-11-251-2/+2
| | | | | | | | | | | | | | That's what it returns nowadays. Change-Id: Ia5b8b643ad37e773db9788d8391edbb021844aec Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* | ProjectExplorer: Improve UI for project-related closing actionsChristian Kandeler2022-11-181-9/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | - Do not hide, but just disable currently non-applicable actions. - Properly group the closing-related actions in the project context menu. This makes for more stable menu entries and reduces the chance for accidentally choosing the wrong one. Task-number: QTCREATORBUG-28211 Change-Id: I26ddc71839d124ec92212971f2facea82cf8d199 Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* | ProjectExplorer: Use LRU for sorting sessions in menuChristian Kandeler2022-10-211-1/+6
|/ | | | | | | | | | | | | | | | | Right now, upon start-up of Qt Creator, entries in the Sessions menu are sorted in reverse order of the time the corresponding files were last modified on disk, which often (but not always) corresponds to a "least recently used" order. This order is unchanged during the lifetime of the current instance of Qt Creator, and potentially changes again after the next start. As this can be confusing to users, we now ensure LRU sorting at all times. Task-number: QTCREATORBUG-28202 Change-Id: I758371ac1cb968dd3f2e4278fc5066d1e74397c6 Reviewed-by: Qt CI Bot <qt_ci_bot@qt-project.org> Reviewed-by: <github-actions-qt-creator@cristianadam.eu> Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* Fix lupdate issuesEike Ziller2022-10-141-1/+1
| | | | | | | | | | - missing Q_DECLARE_TR_FUNCTIONS - some full qualifications needed for confused lupdate - avoid breaking some translations from former TaskListPlugin, VcsCommand and highlighter settings refactoring Change-Id: Ia3b34095512a7bad6903f0aff6095313ee39e3e4 Reviewed-by: hjk <hjk@qt.io>
* Port from qAsConst() to std::as_const()Marc Mutz2022-10-071-4/+4
| | | | | | | | | | | | | | We've been requiring C++17 since Qt 6.0, and our qAsConst use finally starts to bother us (QTBUG-99313), so time to port away from it now. Since qAsConst has exactly the same semantics as std::as_const (down to rvalue treatment, constexpr'ness and noexcept'ness), there's really nothing more to it than a global search-and-replace. Task-number: QTBUG-99313 Change-Id: I88edd91395849574436299b8badda21bb93bea39 Reviewed-by: hjk <hjk@qt.io>
* PE: Delay initialization of wizardsChristian Stenger2022-10-061-4/+3
| | | | | | | | | Other plugins may provide additional wizard search paths, so wait until they had a chance to register them. Amends 1cf6b031cfdf7344eb2ce6a403aa1029b7b8f75e. Change-Id: I268a42ab22d9c4f48d03589986220781e3623f46 Reviewed-by: Eike Ziller <eike.ziller@qt.io>
* ProjectExplorer: Limit the usage of qMakePairJarek Kobus2022-10-041-4/+4
| | | | | | | Make the code less verbose. Change-Id: If9fe08a6a7538d34c80ca97a2aec21a2bd6e5d22 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* ProjectExplorer: Create wizards one by onehjk2022-09-291-7/+3
| | | | | | | | Makes it easier to shuffle them around. Change-Id: Id80064a05ff6d2b76ec9033b4e0065f0bd0d81ae Reviewed-by: Marcus Tillmanns <marcus.tillmanns@qt.io> Reviewed-by: hjk <hjk@qt.io>