mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-22 13:05:51 +03:00
Enable use of domain sync status class in QML
Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
parent
f8ebbe8c71
commit
9e235f99fa
2 changed files with 6 additions and 0 deletions
|
@ -13,6 +13,7 @@
|
|||
*/
|
||||
|
||||
#include <QObject>
|
||||
#include <QQmlEngine>
|
||||
|
||||
#pragma once
|
||||
|
||||
|
@ -22,6 +23,8 @@ namespace OCC::Mac
|
|||
class FileProviderDomainSyncStatus : public QObject
|
||||
{
|
||||
Q_OBJECT
|
||||
QML_ELEMENT
|
||||
QML_UNCREATABLE("FileProviderDomainSyncStatus cannot be instantiated from QML")
|
||||
Q_PROPERTY(bool syncing READ syncing NOTIFY syncingChanged)
|
||||
Q_PROPERTY(bool downloading READ downloading NOTIFY downloadingChanged)
|
||||
Q_PROPERTY(bool uploading READ uploading NOTIFY uploadingChanged)
|
||||
|
@ -85,3 +88,5 @@ private:
|
|||
};
|
||||
|
||||
} // OCC::Mac
|
||||
|
||||
Q_DECLARE_METATYPE(OCC::Mac::FileProviderDomainSyncStatus*)
|
||||
|
|
|
@ -94,6 +94,7 @@ FileProviderDomainSyncStatus::FileProviderDomainSyncStatus(const QString &domain
|
|||
: QObject(parent)
|
||||
, d(std::make_unique<MacImplementation>(domainIdentifier, this))
|
||||
{
|
||||
qRegisterMetaType<FileProviderDomainSyncStatus*>("FileProviderDomainSyncStatus*");
|
||||
}
|
||||
|
||||
FileProviderDomainSyncStatus::~FileProviderDomainSyncStatus() = default;
|
||||
|
|
Loading…
Reference in a new issue