From 25c4ff19576ae3efff67a848ee04423f50c5ac65 Mon Sep 17 00:00:00 2001 From: memurats Date: Fri, 24 Oct 2025 16:15:49 +0200 Subject: [PATCH 1/5] windows related changes --- src/gui/accountsettings.cpp | 4 ---- src/gui/navigationpanehelper.cpp | 2 +- src/gui/socketapi/socketapi.cpp | 18 ++++++++++++++---- 3 files changed, 15 insertions(+), 9 deletions(-) diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp index a4ae1f0775dc7..a9c517c158ced 100644 --- a/src/gui/accountsettings.cpp +++ b/src/gui/accountsettings.cpp @@ -743,10 +743,6 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos) ac = availabilityMenu->addAction(Utility::vfsFreeSpaceActionText()); connect(ac, &QAction::triggered, this, [this]() { slotSetCurrentFolderAvailability(PinState::OnlineOnly); }); - - ac = menu->addAction(tr("Disable virtual file support …")); - connect(ac, &QAction::triggered, this, &AccountSettings::slotDisableVfsCurrentFolder); - ac->setDisabled(Theme::instance()->enforceVirtualFilesSyncFolder()); } if (const auto mode = bestAvailableVfsMode(); diff --git a/src/gui/navigationpanehelper.cpp b/src/gui/navigationpanehelper.cpp index 2aab0ec22a19e..444d1273f6aac 100644 --- a/src/gui/navigationpanehelper.cpp +++ b/src/gui/navigationpanehelper.cpp @@ -93,7 +93,7 @@ void NavigationPaneHelper::updateCloudStorageRegistry() const QString clsidPathWow64 = QString() % R"(Software\Classes\Wow6432Node\CLSID\)" % clsidStr; const QString namespacePath = QString() % R"(Software\Microsoft\Windows\CurrentVersion\Explorer\Desktop\NameSpace\)" % clsidStr; const auto title = folder->sidebarDisplayName(); - qCDebug(lcNavPane) << "Folder" << folder->cleanPath() << "will use shortcutname" << title; + // qCDebug(lcNavPane) << "Folder" << folder->cleanPath() << "will use shortcutname" << title; const auto iconPath = QDir::toNativeSeparators(qApp->applicationFilePath()); const auto targetFolderPath = QDir::toNativeSeparators(folder->cleanPath()); diff --git a/src/gui/socketapi/socketapi.cpp b/src/gui/socketapi/socketapi.cpp index 39949ea206f8f..a999bf239aa18 100644 --- a/src/gui/socketapi/socketapi.cpp +++ b/src/gui/socketapi/socketapi.cpp @@ -34,6 +34,7 @@ #endif #include +#include #include #include #include @@ -562,10 +563,19 @@ void SocketApi::processEncryptRequest(const QString &localFile) ); Q_UNUSED(ret) } else { - const int ret = QMessageBox::information(nullptr, - tr("Folder encrypted successfully").arg(fileData.folderRelativePath), - tr("The following folder was encrypted successfully: \"%1\"").arg(fileData.folderRelativePath)); - Q_UNUSED(ret) + // NMC customization + auto messageBox = std::make_unique(); + messageBox->setAttribute(Qt::WA_DeleteOnClose); + messageBox->setWindowTitle(tr("Folder encrypted successfully")); + messageBox->setText(tr("The following folder was encrypted successfully: \"%1\"").arg(fileData.folderRelativePath)); + + const QIcon avatarIcon = QIcon::fromTheme("iconPath", QIcon(":/client/theme/lock.svg")); + QPixmap pixmap = avatarIcon.pixmap(QSize(24, 24)); + messageBox->setIconPixmap(pixmap); + + // Set default button (prevents empty UI) + messageBox->addButton(QMessageBox::Ok); + messageBox->show(); } }); job->setProperty(encryptJobPropertyFolder, QVariant::fromValue(folder)); From 417b399f6e07c33c37135126423ae1d2751b7dc9 Mon Sep 17 00:00:00 2001 From: memurats Date: Mon, 27 Oct 2025 16:32:29 +0100 Subject: [PATCH 2/5] solved merge conflict --- src/gui/socketapi/socketapi.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/gui/socketapi/socketapi.cpp b/src/gui/socketapi/socketapi.cpp index a999bf239aa18..8a5914795f0d3 100644 --- a/src/gui/socketapi/socketapi.cpp +++ b/src/gui/socketapi/socketapi.cpp @@ -563,6 +563,11 @@ void SocketApi::processEncryptRequest(const QString &localFile) ); Q_UNUSED(ret) } else { + // const int ret = QMessageBox::information(nullptr, + // tr("Folder encrypted successfully").arg(fileData.folderRelativePath), + // tr("The following folder was encrypted successfully: \"%1\"").arg(fileData.folderRelativePath)); + // Q_UNUSED(ret) + // NMC customization auto messageBox = std::make_unique(); messageBox->setAttribute(Qt::WA_DeleteOnClose); From 9ebeec62fb8a97c18c97ae537a5c3cac95c8bde0 Mon Sep 17 00:00:00 2001 From: memurats Date: Mon, 27 Oct 2025 16:37:51 +0100 Subject: [PATCH 3/5] solve merge conflict --- src/gui/socketapi/socketapi.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/gui/socketapi/socketapi.cpp b/src/gui/socketapi/socketapi.cpp index 8a5914795f0d3..8385cbe4848d2 100644 --- a/src/gui/socketapi/socketapi.cpp +++ b/src/gui/socketapi/socketapi.cpp @@ -563,10 +563,11 @@ void SocketApi::processEncryptRequest(const QString &localFile) ); Q_UNUSED(ret) } else { - // const int ret = QMessageBox::information(nullptr, - // tr("Folder encrypted successfully").arg(fileData.folderRelativePath), - // tr("The following folder was encrypted successfully: \"%1\"").arg(fileData.folderRelativePath)); - // Q_UNUSED(ret) + // const int ret = QMessageBox::information(nullptr, + // tr("Folder encrypted successfully"), + // tr("The following folder was encrypted successfully: \"%1\"") + // .arg(fileData.folderRelativePath)); + // Q_UNUSED(ret) // NMC customization auto messageBox = std::make_unique(); From 10d9ebfa97984440e27ecf2a960b6988e2f92964 Mon Sep 17 00:00:00 2001 From: memurats Date: Mon, 27 Oct 2025 16:50:17 +0100 Subject: [PATCH 4/5] solved merge conflict --- src/gui/socketapi/socketapi.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/gui/socketapi/socketapi.cpp b/src/gui/socketapi/socketapi.cpp index 8385cbe4848d2..dcebec9f213f4 100644 --- a/src/gui/socketapi/socketapi.cpp +++ b/src/gui/socketapi/socketapi.cpp @@ -563,12 +563,6 @@ void SocketApi::processEncryptRequest(const QString &localFile) ); Q_UNUSED(ret) } else { - // const int ret = QMessageBox::information(nullptr, - // tr("Folder encrypted successfully"), - // tr("The following folder was encrypted successfully: \"%1\"") - // .arg(fileData.folderRelativePath)); - // Q_UNUSED(ret) - // NMC customization auto messageBox = std::make_unique(); messageBox->setAttribute(Qt::WA_DeleteOnClose); @@ -582,6 +576,12 @@ void SocketApi::processEncryptRequest(const QString &localFile) // Set default button (prevents empty UI) messageBox->addButton(QMessageBox::Ok); messageBox->show(); +/* + const int ret = QMessageBox::information(nullptr, + tr("Folder encrypted successfully").arg(fileData.folderRelativePath), + tr("The following folder was encrypted successfully: \"%1\"").arg(fileData.folderRelativePath)); + Q_UNUSED(ret) +*/ } }); job->setProperty(encryptJobPropertyFolder, QVariant::fromValue(folder)); From e453078a56bb3e5c06aa19e096dc58b0fb8f860f Mon Sep 17 00:00:00 2001 From: Mauro Mura Date: Wed, 24 Jun 2026 10:08:24 +0200 Subject: [PATCH 5/5] Refactor QMessageBox usage in socketapi.cpp Refactor QMessageBox instantiation and update text handling. --- src/gui/socketapi/socketapi.cpp | 20 +++++++++----------- 1 file changed, 9 insertions(+), 11 deletions(-) diff --git a/src/gui/socketapi/socketapi.cpp b/src/gui/socketapi/socketapi.cpp index dcebec9f213f4..7697f71a6c6c8 100644 --- a/src/gui/socketapi/socketapi.cpp +++ b/src/gui/socketapi/socketapi.cpp @@ -564,18 +564,16 @@ void SocketApi::processEncryptRequest(const QString &localFile) Q_UNUSED(ret) } else { // NMC customization - auto messageBox = std::make_unique(); + auto *messageBox = new QMessageBox(); messageBox->setAttribute(Qt::WA_DeleteOnClose); - messageBox->setWindowTitle(tr("Folder encrypted successfully")); - messageBox->setText(tr("The following folder was encrypted successfully: \"%1\"").arg(fileData.folderRelativePath)); - - const QIcon avatarIcon = QIcon::fromTheme("iconPath", QIcon(":/client/theme/lock.svg")); - QPixmap pixmap = avatarIcon.pixmap(QSize(24, 24)); - messageBox->setIconPixmap(pixmap); - - // Set default button (prevents empty UI) - messageBox->addButton(QMessageBox::Ok); - messageBox->show(); + messageBox->setWindowTitle(SocketApi::tr("Folder encrypted successfully")); + messageBox->setText(SocketApi::tr("The following folder was encrypted successfully: \"%1\"") + .arg(fileData.folderRelativePath)); + + messageBox->setIconPixmap(QIcon(QStringLiteral(":/client/theme/lock.svg")).pixmap(QSize(24, 24))); + messageBox->setStandardButtons(QMessageBox::Ok); + + messageBox->open(); /* const int ret = QMessageBox::information(nullptr, tr("Folder encrypted successfully").arg(fileData.folderRelativePath),