aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/docker/dockerdevice.h
Commit message (Collapse)AuthorAgeFilesLines
* Docker: Add option to control mounting the command bridgeMarcus Tillmanns29 hours1-0/+1
| | | | | | Fixes: QTCREATORBUG-33006 Change-Id: I301588937b71135b1c4c5e27453f1319f0924759 Reviewed-by: Eike Ziller <[email protected]>
* Replace most expected_str by Utils::Resulthjk2025-04-111-2/+2
| | | | | | | | Keep it in Axivion dto, which is generated. Change-Id: I83a12de6234ac7b0218b369875bdc72d25dbadfb Reviewed-by: Eike Ziller <[email protected]> Reviewed-by: Jarek Kobus <[email protected]>
* Utils: Replace Result class by type alias to std::expected<T, QString>hjk2025-04-111-1/+1
| | | | | | | | | | | | | | ... to be able to conveniently return also non-void cases without being exposed to the syntax of expected. The price for the more general approach is some uglification of the void case: The previous 'Result' is now equivalent to 'Result<>', which needs to be spelled out in function signatures, and some changes to the special cases. Change-Id: Ic5026e237ef2077a0765cdb8287122cae99d699f Reviewed-by: Marcus Tillmanns <[email protected]> Reviewed-by: Eike Ziller <[email protected]>
* Docker: Add port mapping optionsMarcus Tillmanns2025-04-081-0/+9
| | | | | Change-Id: I939d4b7bd0c2f89ddfb62469ae27fbdd60e9908a Reviewed-by: hjk <[email protected]>
* Docker: Capture Environment from entry pointMarcus Tillmanns2025-04-031-0/+3
| | | | | | | | | | | | | | | | | | | Docker containers often come with custom entry point scripts that inject Environment variables into the shell. Since our bridge and other custom processes are not spawned via the entry point they don't automatically get access to the variables, breaking the KitDetector or the Terminal if the user hopes to have them set. As a workaround, we run "printenv" when a device is created and store the output in its settings. We then use this environment as the device environment when creating processes. For old configs, we fetch the environment in fromMap in case it is not set. Fixes: QTCREATORBUG-32135 Change-Id: I16c04d391907698fd9f66fc3d33d068accb8054a Reviewed-by: hjk <[email protected]>
* Docker: Move Container setup into its own threadMarcus Tillmanns2025-02-251-1/+1
| | | | | | | | | | | | | Since starting the container may happen from any thread, we need to ensure that the container setup and teardown is done in the same thread. This change moves the container setup into its own thread. Without this, many asserts trigger as timers and other QObjects are started and stopped from arbitrary threads. Change-Id: I8db6f04358ee704ad4cd3e70dcc5bcfa7e237d27 Reviewed-by: hjk <[email protected]>
* Docker: Replace mutex+value with SynchronizedValueMarcus Tillmanns2025-02-201-3/+2
| | | | | Change-Id: Id7ca66be635abbb479602e040889c7ccfa889179 Reviewed-by: hjk <[email protected]>
* ProjectExplorer: (Mostly) implement IDevice::filePath on top of rootPathhjk2024-12-171-1/+0
| | | | | | | | | | | | | Separate implementation led to mixed results depending on the exact path of creation, leading to confusion in the debugger when paths of files reported by the debugger were matched with already opened files in the EditorManager. DesktopDevice is the odd-one out due to the fixed C:\ rootPath() on Windows and filePath() not using (and possibly wanting) this. Change-Id: I02858747524107124189498c777cc79b546ecce9 Reviewed-by: Christian Kandeler <[email protected]>
* Utils: Add FilePath::isLocal() and use it instead of !needsDevice()hjk2024-12-091-1/+1
| | | | | | | | "needsDevice()" is an odd name, but keep it for now until downstream has caught up. Change-Id: I1fdb65d55e84e31512edb8f0bea8a0a3f7b2879c Reviewed-by: Marcus Tillmanns <[email protected]>
* ProjectExplorer: Add BuildDeviceTypeKitAspectChristian Kandeler2024-11-181-1/+0
| | | | | | | For symmetry between build and run devices. Change-Id: I2cb7bdbe0264e42b3e4e7c2fad88cdc34ba43fde Reviewed-by: hjk <[email protected]>
* RemoteLinux: Fix some more freezesChristian Kandeler2024-10-241-1/+1
| | | | | | | | | | | Add a check for "disconnected" when starting a process. This should handle the remaining cases where we don't pass through runInShell() for whatever reason. Note that it only helps for devices which are already known to be disconnected. Change-Id: I908a994a1c5282260bfa2284f3dc49ebaf179eeb Reviewed-by: hjk <[email protected]>
* Project: Base IDevice on AspectContainerhjk2024-08-021-30/+18
| | | | | | | | | | | | | This is effectively the same approach as taken with ProjectConfiguration. Having the settings separate leads to quite some boilerplate and in the end to parallel IDevice and DeviceSettings hierarchies. The unusual registration of the docker aspects are due to the multiple inheritance, we need to "dynamic" downcast. Change-Id: I50864e2009f4e525d635decf1c9beaad5e6a5f1f Reviewed-by: Christian Kandeler <[email protected]>
* ProjectExplorer: Change IDevice::toMap signaturehjk2024-08-011-1/+1
| | | | | | | | | | | From Store toMap() to toMap(Store). More symmetric code on the user side and better in line with ProjectConfiguration/AspectContainer at the price of a few more lines in the base. Change-Id: I6069c96c250c1846e870879bcb52c58fdd806478 Reviewed-by: Christian Kandeler <[email protected]>
* ProjectExplorer: Add Device::canMountMarcus Tillmanns2024-04-041-0/+5
| | | | | Change-Id: Icde98f845c3fe303d9461a0cbb0946d1ce9c8b00 Reviewed-by: hjk <[email protected]>
* IDevice: Replace QSharedPointer with std::shared_ptrJarek Kobus2024-02-021-5/+3
| | | | | | | | | | | | | According to https://wiki.qt.io/Things_To_Look_Out_For_In_Reviews QSharedPointer impl is poor and it's going to be removed from Qt 7. Replace QWeakPointer with std::weak_ptr. Replace QEnableSharedFromThis with std::enable_shared_from_this. Use std::static_pointer_cast and std::dynamic_pointer_cast for casts used with QSharedPointer before. Change-Id: If255a100c790860934f36d52906b93f33c31cfe8 Reviewed-by: hjk <[email protected]>
* DeviceSupport: Add more error outputMarcus Tillmanns2023-10-061-2/+2
| | | | | | | | | | Previously most errors when opening shells were completely opaque to the user. This patch adds error output either via QMessageBox if there is another modal dialog, or as flashing disrupting messages. Change-Id: I54be7a90295b61c23c739294c2d1d37c288ad273 Reviewed-by: hjk <[email protected]>
* Docker: Move rootPath into SettingsMarcus Tillmanns2023-10-041-0/+1
| | | | | | Change-Id: I11aa1d928281b13ccb136b907c9eb8f98582fd28 Reviewed-by: <[email protected]> Reviewed-by: hjk <[email protected]>
* Docker: Show create command line to userMarcus Tillmanns2023-09-211-0/+2
| | | | | Change-Id: I740d2647e2033c841fe6926b273b06ce45ecb0e7 Reviewed-by: hjk <[email protected]>
* Docker: Add extra arguments settingMarcus Tillmanns2023-09-211-0/+1
| | | | | Change-Id: I3cd30001defb99ce6f23b31935dc3a21ce60a256 Reviewed-by: hjk <[email protected]>
* Docker: Add network option to settingsMarcus Tillmanns2023-09-201-0/+1
| | | | | Change-Id: Idb18435aa668f9219ae0eb2db6bd55d040ba5243 Reviewed-by: hjk <[email protected]>
* Docker: Fix default device nameMarcus Tillmanns2023-09-181-0/+2
| | | | | | Change-Id: I1d7e8dd62a11cf897ebb22389f21370c8a3811cf Reviewed-by: hjk <[email protected]> Reviewed-by: <[email protected]>
* Docker: Improve error reportingMarcus Tillmanns2023-09-151-0/+2
| | | | | | Change-Id: I1a1ad824b4084ce7203357acf9ec19ccfe91b5cd Reviewed-by: Leena Miettinen <[email protected]> Reviewed-by: hjk <[email protected]>
* Docker: Use FileListAspect for mountsMarcus Tillmanns2023-09-121-1/+1
| | | | | Change-Id: I6392c8bb8ebdfb0984f56ebda23567ef8b42bb6a Reviewed-by: hjk <[email protected]>
* Docker: Switch to aspect settingsMarcus Tillmanns2023-09-121-44/+17
| | | | | | Change-Id: Id04c48caf2ddd33e176ee424273690b80c77232b Reviewed-by: <[email protected]> Reviewed-by: hjk <[email protected]>
* Utils: Rename the new Storage to Storehjk2023-08-241-2/+2
| | | | | | | | | Apparently that's what the young people on the web use for such a thing. Change-Id: I75d5396ff3cb3c26efd6008b5f2261354c4f7896 Reviewed-by: Marcus Tillmanns <[email protected]> Reviewed-by: Jarek Kobus <[email protected]> Reviewed-by: <[email protected]>
* Use Utils::Storage instead of QVariantMap in a few placeshjk2023-08-231-2/+2
| | | | | Change-Id: I02833cf2bc3caaadc22ff93ae530e4aebe4c3868 Reviewed-by: Marcus Tillmanns <[email protected]>
* Docker: Simplify settings accesshjk2023-07-141-4/+4
| | | | | Change-Id: I0ecbba9d29b041b06dac26159be702a38db42185 Reviewed-by: Marcus Tillmanns <[email protected]>
* ProjectExplorer: Remove IDevice::createProcessListModelhjk2023-06-231-1/+0
| | | | | | | | | All re-implementations are the same nowadays. Change-Id: I954b3c9ca296967a99ea548ade6282fba188249f Reviewed-by: <[email protected]> Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: Christian Kandeler <[email protected]>
* ProjectExplorer: Merge DeviceProcessList into ProcessListhjk2023-06-231-1/+1
| | | | | | | The abstraction was not used anymore. Change-Id: I756ae65b9164d0032c3e6a26c3a123fc50f72a75 Reviewed-by: Christian Kandeler <[email protected]>
* Devices: Unify Port Gathering methodMarcus Tillmanns2023-04-061-2/+0
| | | | | | | | | | | | | | All devices that support it use the same mechanism to gather ports so this patch removes the individual implementations in favor of a single one in IDevice.cpp. This patch also removes: * canAutodetectPorts() as it was not used. * Port::parseFrom...Output as they are not used anymore. Change-Id: I8ecedec2d71e60985402387982c64311c5a651e6 Reviewed-by: hjk <[email protected]> Reviewed-by: <[email protected]>
* Docker: Check Image availableMarcus Tillmanns2023-03-211-1/+1
| | | | | | | | | | | | Docker will try to download images from the registry if an image is not available locally. This takes a while, even if the image is not available remotely. To circumvent the hangs resulting from this we first check if the image is available locally and if it is not we do not try to start it. Fixes: QTCREATORBUG-28880 Change-Id: I6b9de8601b87e3050ae9ac5f1bbe3fa9701d4cc1 Reviewed-by: David Schulz <[email protected]>
* ProjectExplorer: Consolidate ProcessListMarcus Tillmanns2023-03-141-1/+1
| | | | | | | | | | * Combined local and ssh process list retrieval into LocalProcessList * Combined QnxProcessList into LocalProcessList * Renamed LocalProcessList to ProcessList Change-Id: I230c575375e306c638e4ca3034fa2d7ed243a44c Reviewed-by: David Schulz <[email protected]> Reviewed-by: hjk <[email protected]>
* ProjectExplorer: Remove IDevice::terminalCommandMarcus Tillmanns2023-03-021-3/+0
| | | | | | | | 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 <[email protected]>
* Terminal: Add Terminal pluginMarcus Tillmanns2023-02-241-0/+3
| | | | | | | | | | | Adds a new Terminal plugin that provides a Terminal pane inside Qt Creator. Fixes: QTCREATORBUG-8511 Change-Id: I7eacb3efa2463d7df9f383ae3fc33254fb9019a9 Reviewed-by: <[email protected]> Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: hjk <[email protected]>
* 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 <[email protected]>
* Docker: Add Filepath::localSource()Marcus Tillmanns2022-12-161-0/+1
| | | | | | | | | | | | FilePath::localSource can return a filepath that represents a local version of a remote file. It is used to let the debugger select the local version of a file when debugging a remote target. Change-Id: Ieb934ef0d454e8ff55e71df41dca825974d85da7 Reviewed-by: <[email protected]> Reviewed-by: hjk <[email protected]>
* ProjectExplorer: Merge IDevice::{filePath,mapToGlobalPath}hjk2022-12-151-2/+1
| | | | | | | | They were doing practically the same. Keep the 'filePath' name for now until something more fitting comes up. Change-Id: I96ca4da4b30b7b463583e002f2c19d6e6c5541e6 Reviewed-by: Jarek Kobus <[email protected]>
* ProjectExplorer: Add clangdExecutable to IDeviceMarcus Tillmanns2022-12-091-0/+1
| | | | | Change-Id: I131212326696887d3a5644a35788f6a522dbee45 Reviewed-by: hjk <[email protected]>
* Docker: Add clangd executable optionMarcus Tillmanns2022-12-061-2/+3
| | | | | | | Change-Id: I93fbd9a7a6b0189ca31cc05b35df9d1636da29a3 Reviewed-by: Christian Kandeler <[email protected]> Reviewed-by: Qt CI Bot <[email protected]> Reviewed-by: <[email protected]>
* Docker: Make hostname valid for UrlsMarcus Tillmanns2022-12-061-0/+2
| | | | | Change-Id: I026aee70503699fcada30948195a7ebd4c76aeb0 Reviewed-by: hjk <[email protected]>
* IDevice: Provide default implementation for signalOperation()Jarek Kobus2022-11-291-2/+0
| | | | | | | | Don't repeat implementation returning nullptr in derived classes. Change-Id: I437f5d206464bf92706cd135d793438f46455ad6 Reviewed-by: hjk <[email protected]> Reviewed-by: <[email protected]>
* Docker: Add option to enable flags needed for lldbMarcus Tillmanns2022-11-171-1/+3
| | | | | Change-Id: Ic0ae6d2b8dcfee3df21c22124c7fc2bddbdb61a2 Reviewed-by: hjk <[email protected]>
* Docker: fix device path mappingDavid Schulz2022-10-171-1/+0
| | | | | | | Amends 1fa32552425f0c3fd98ae20bfd26b8b85bfda3e0 Change-Id: Idd2e0916769cd822b97e1fc851d8f706316cca83 Reviewed-by: hjk <[email protected]>
* Utils: Split off file access interface from IDevicehjk2022-10-131-31/+0
| | | | | | | | | | | | | | | | | | | | | The file accessing functions form now a class hierarchy by themselves, the devices return a suitable point. The previous implementation was mildly confusing by the special handling of the DesktopDevice, fallbacks and remote cases in the same function leading to unnecessary boilerplate when adding new functions and codepaths that sometimes passed the FilePath API twice. Implemented are a "DesktopDeviceFileAccess" taking care of the previous !needsDevice() branches and a "UnixDeviceFileAccess" covering the current docker and RL uses. As a side-effect this unifies to a large degree the current docker and RL code paths with were occasionally deviating from each other while they shouldn't. Change-Id: I4ff59d4be2a07d13e2ca5e9ace26a84160a87c9d Reviewed-by: Jarek Kobus <[email protected]>
* Utils: Combine some of the iterateWithFind overloadshjk2022-10-121-6/+4
| | | | | | Change-Id: I668447d0049f2e35cd0c76d2c5708779196167ec Reviewed-by: hjk <[email protected]> Reviewed-by: Marcus Tillmanns <[email protected]>
* Add FSEngine FilePath CacheMarcus Tillmanns2022-10-111-5/+5
| | | | | | | | | | | | | | To speed up file dialogs we introduce a 1 minute cache for the FilePathInfo. A new version of "IDevice::iterateDirectories" allows implementations to provide the FilePathInfo directly. DockerDevice implements fetching the filePathInfo during iterateDirectories which greatly improves the speed again. Change-Id: I24ac16adb2478cbf16a22012e72fcb8910dcdac5 Reviewed-by: hjk <[email protected]>
* Utils: Add an offset parameter to the content writing FilePath functionhjk2022-10-101-1/+3
| | | | | | | | Use QFile::seek to implement locally and a dd seek based poor man's implementation on RL and docker. Change-Id: I241d1c34c00e991845d132ad8edefa1377ba1311 Reviewed-by: Christian Kandeler <[email protected]>
* ProjectExplorer: Introduce an IDevice::usableAsBuildDevicehjk2022-09-301-0/+1
| | | | | | | | Better approach than whitelisting ids from leaf plugins. Change-Id: Ida7e23d7ea02eb76d7de4049737f2cb0fad2b9d7 Reviewed-by: <[email protected]> Reviewed-by: Christian Kandeler <[email protected]>
* Device: Add prepareForBuild()Marcus Tillmanns2022-09-271-0/+2
| | | | | | Change-Id: I505c4e660838bc94dcdc83ba91ec225910b8f60d Reviewed-by: Leena Miettinen <[email protected]> Reviewed-by: Christian Kandeler <[email protected]>
* Docker: Remove unused #includehjk2022-09-261-2/+0
| | | | | | | Change-Id: I3dda02b6669e0baf0a2018229c0bc83c8bbbd00f Reviewed-by: Marcus Tillmanns <[email protected]> Reviewed-by: hjk <[email protected]> Reviewed-by: Qt CI Bot <[email protected]>