From e06debced13a2ee6f0e345394f5998accecc7399 Mon Sep 17 00:00:00 2001 From: xust Date: Sat, 26 Jul 2025 15:57:04 +0800 Subject: [PATCH] feat: add ownership option to device formatting - Updated the device formatting options to include a new parameter "take-ownership" set to true. - This enhancement allows for better management of device ownership during formatting. Log: Added ownership option to device formatting. Bug: https://pms.uniontech.com/bug-view-325935.html --- view/mainwindow.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/view/mainwindow.cpp b/view/mainwindow.cpp index 594c5ae..998c856 100755 --- a/view/mainwindow.cpp +++ b/view/mainwindow.cpp @@ -219,7 +219,7 @@ void MainWindow::formatDevice() qDebug() << "MainWindow: Device is not mounted, proceeding with format"; } - QVariantMap opt = { { "label", m_mainPage->getLabel() } }; + QVariantMap opt = { { "label", m_mainPage->getLabel() }, { "take-ownership", true } }; if (m_mainPage->shouldErase()) opt["erase"] = "zero"; blk->format(m_mainPage->getSelectedFs(), opt); QDBusError lastError = blk->lastError();