diff --git a/src/gui/macOS/fileprovidersettingscontroller.h b/src/gui/macOS/fileprovidersettingscontroller.h index 699c95b23097..72d983144ce9 100644 --- a/src/gui/macOS/fileprovidersettingscontroller.h +++ b/src/gui/macOS/fileprovidersettingscontroller.h @@ -49,6 +49,7 @@ public slots: void setVfsEnabledForAccount(const QString &userIdAtHost, const bool setEnabled); void createEvictionWindowForAccount(const QString &userIdAtHost); + void createDebugArchive(const QString &userIdAtHost); signals: void vfsEnabledAccountsChanged(); diff --git a/src/gui/macOS/fileprovidersettingscontroller_mac.mm b/src/gui/macOS/fileprovidersettingscontroller_mac.mm index 330af35cd366..a1beaca8630f 100644 --- a/src/gui/macOS/fileprovidersettingscontroller_mac.mm +++ b/src/gui/macOS/fileprovidersettingscontroller_mac.mm @@ -14,10 +14,12 @@ #include "fileprovidersettingscontroller.h" +#include #include #include "gui/systray.h" #include "gui/userinfo.h" +#include "gui/macOS/fileprovider.h" #include "gui/macOS/fileprovideritemmetadata.h" #include "gui/macOS/fileprovidermaterialiseditemsmodel.h" @@ -403,6 +405,20 @@ void initialCheck() dialog->show(); } +void FileProviderSettingsController::createDebugArchive(const QString &userIdAtHost) +{ + const auto filename = QFileDialog::getSaveFileName(nullptr, + tr("Create Debug Archive"), + {}, + tr("Zip Archives") + " (*.zip)"); + if (filename.isEmpty()) { + return; + } + + const auto message = QString(QStringLiteral("CREATE_DEBUG_ARCHIVE") + "~" + filename); + FileProvider::instance()->sendMessageToDomain(userIdAtHost, message); +} + } // namespace Mac } // namespace OCC