Analysis: Qt dependency removal requires multi-month phased approach#4489
Closed
Analysis: Qt dependency removal requires multi-month phased approach#4489
Conversation
Copilot
AI
changed the title
[WIP] Remove Qt dependency from Multipass codebase
Analysis: Qt dependency removal requires multi-month phased approach
Nov 3, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The issue requests complete removal of Qt6 dependencies from Multipass. This analysis documents why this cannot be accomplished in a single PR.
Scope Assessment
Qt is deeply embedded across the codebase:
Required Work Breakdown
Phase 1 (4-6 weeks): Core utilities
Phase 2 (2-3 weeks): Networking
Phase 3 (6-8 weeks): Async architecture
Phase 4 (1-2 weeks): Platform-specific
Recommendation
This requires multiple PRs over 3-5 months with testing between phases. Attempting atomic replacement risks:
Next step: Clarify which phase/component to prioritize for incremental migration.
Original prompt
This section details on the original issue you should resolve
<issue_title>Remove Qt dependency from Multipass codebase</issue_title>
<issue_description>## Overview
Multipass currently has a heavy dependency on Qt6 (Core, Network, Concurrent) throughout the codebase for functionality that could be replaced with standard C++ or well-established third-party libraries. This creates a significant maintenance burden, increases build complexity, and introduces a large dependency footprint that's not necessary for a backend service and CLI tool.
Current Qt Usage
Qt is currently used extensively across the codebase in the following areas:
1. Core Utilities (Qt6::Core)
QString,QStringListQFile,QDir,QFileInfo,QSaveFile,QTemporaryFile,QLockFileQJsonDocument,QJsonObject,QJsonArray,QJsonParseErrorQProcess,QProcessEnvironmentQSysInfo,QStorageInfo,QTimeZone,QOperatingSystemVersionQRegularExpressionQHashQUuidQEventLoop,QCoreApplication2. Networking (Qt6::Network)
QNetworkAccessManager,QNetworkReply,QNetworkDiskCache,QNetworkProxyQUrlQTlsBackendCertOnlyPluginQTcpServer(VirtualBox backend)3. Async/Threading (Qt6::Concurrent)
QFuture,QFutureWatcher,QFutureSynchronizer,QtConcurrentQTimer(downloads, delayed shutdown)QFileSystemWatcher(settings monitoring)4. Platform-Specific (Qt6::DBus - Linux only)
QDBus*classes for Linux backend utilities5. Meta-Object System
QObjectinheritance: Daemon RPC uses Qt signals/slots patternQ_OBJECT,Q_MOC_RUN,signals:,slots:qRegisterMetaTypeKey Problem Areas
Signals & Slots Architecture
The daemon uses Qt's signals/slots for RPC communication:
This could be replaced with direct function calls or a lightweight callback system.
Process Management
Heavy use of
QProcessthroughout backends (QEMU, VirtualBox, Hyper-V):Network Downloads
QNetworkAccessManagerfor image fetching with event loop integration:QEventLoop event_loop; QObject::connect(reply, &QNetworkReply::finished, &event_loop, &QEventLoop::quit); event_loop.exec();Proposed Replacement Strategy
Phase 1: Core Utilities Replacement
Target: Remove Qt6::Core dependency
QString,QStringListstd::string,std::vector<std::string>QFile,QDir,QFileInfostd::filesystem(C++17)QTemporaryFilestd::filesystem::temp_directory_path()+ custom RAIIQSaveFileQLockFilestd::filesystem+ platform file lockingflock(), WindowsLockFileEx()QJsonDocument,QJsonObjectQProcessQRegularExpressionstd::regex(C++11) or PCRE2QSysInfo,QStorageInfosrc/platform/QUuidboost::uuidQHashstd::unordered_mapPhase 2: Networking Replacement
Target: Remove Qt6::Network dependency
QNetworkAccessManagerQUrl💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.