From e563c21d23d58176291a97ab4c7ecf8ed40f4d78 Mon Sep 17 00:00:00 2001 From: xust Date: Sat, 26 Jul 2025 15:52:09 +0800 Subject: [PATCH] fix: update .gitignore and modify formatDevice function Updated .gitignore to exclude additional directories: .cursor, .cache, .claude, and build. Modified the formatDevice function in mainwindow.cpp to include a new option 'take-ownership' set to true in the QVariantMap. Log: as above. Bug: https://pms.uniontech.com/bug-view-325935.html --- .gitignore | 4 ++++ debian/changelog | 8 ++++++++ view/mainwindow.cpp | 2 +- 3 files changed, 13 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 8a9d35c..8bf0a9d 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ *.user +.cursor/* +.cache/* +.claude/* +build/* diff --git a/debian/changelog b/debian/changelog index 3ebda26..be1de6f 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,11 @@ +dde-device-formatter (0.0.1.18) unstable; urgency=medium + + * take disk ownership after formatted. + * + * + + -- XuShitong Sat, 26 Jul 2025 15:52:40 +0800 + dde-device-formatter (0.0.1.17) unstable; urgency=medium * Auto mount after device been formatted. diff --git a/view/mainwindow.cpp b/view/mainwindow.cpp index 2656e4f..870efc6 100755 --- a/view/mainwindow.cpp +++ b/view/mainwindow.cpp @@ -187,7 +187,7 @@ void MainWindow::formatDevice() return; } } - 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();