From 06901c965ad530ed1f3b80dc1a10c4e189b3d2ff Mon Sep 17 00:00:00 2001 From: Matthieu Gallien Date: Mon, 2 Sep 2024 22:50:26 +0200 Subject: [PATCH] tell user what folders will be removed Signed-off-by: Matthieu Gallien --- src/gui/folder.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/gui/folder.cpp b/src/gui/folder.cpp index 52baa342f13b6..a59d5fdb9ac05 100644 --- a/src/gui/folder.cpp +++ b/src/gui/folder.cpp @@ -1670,9 +1670,14 @@ void Folder::slotNeedToRemoveRemnantsReadOnlyFolders(const QList callback) { - const auto msg = tr("Do you want to clean up remnant read-only folders left over from previous failed synchronization attempts."); + auto listOfFolders = QStringList{}; + for (const auto &oneFolder : folders) { + listOfFolders.push_back(oneFolder->_file); + } + + const auto msg = tr("Do you want to clean up remnant read-only folders left over from previous failed synchronization attempts.\n%1"); auto msgBox = new QMessageBox(QMessageBox::Question, tr("Remove remnant invalid folders?"), - msg, QMessageBox::NoButton); + msg.arg(listOfFolders.join("\n")), QMessageBox::NoButton); msgBox->setAttribute(Qt::WA_DeleteOnClose); msgBox->setWindowFlags(msgBox->windowFlags() | Qt::WindowStaysOnTopHint); msgBox->addButton(tr("Proceed to remove remnant folders"), QMessageBox::AcceptRole);