Make mac implementation of file provider settings controller a QObject

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2024-01-10 02:16:28 +08:00
parent 21a317cff3
commit 9774ac6dde
No known key found for this signature in database
GPG key ID: C839200C384636B0
2 changed files with 3 additions and 7 deletions

View file

@ -60,10 +60,9 @@ signals:
private:
explicit FileProviderSettingsController(QObject *parent = nullptr);
~FileProviderSettingsController() override;
class MacImplementation;
std::unique_ptr<MacImplementation> d;
MacImplementation *d;
QHash<QString, UserInfo*> _userInfos;
};

View file

@ -54,7 +54,7 @@ namespace Mac {
Q_LOGGING_CATEGORY(lcFileProviderSettingsController, "nextcloud.gui.mac.fileprovider.settingscontroller")
class FileProviderSettingsController::MacImplementation
class FileProviderSettingsController::MacImplementation : public QObject
{
public:
enum class VfsAccountsAction {
@ -292,13 +292,10 @@ FileProviderSettingsController *FileProviderSettingsController::instance()
return &controller;
}
FileProviderSettingsController::~FileProviderSettingsController() = default;
FileProviderSettingsController::FileProviderSettingsController(QObject *parent)
: QObject{parent}
, d(new FileProviderSettingsController::MacImplementation(this))
{
d = std::make_unique<FileProviderSettingsController::MacImplementation>(this);
const auto accManager = AccountManager::instance();
const auto accountsList = accManager->accounts();