Add starter FileProviderMaterialisedItemsModel

Signed-off-by: Claudio Cambra <claudio.cambra@nextcloud.com>
This commit is contained in:
Claudio Cambra 2023-10-10 11:30:29 +08:00
parent 389e663219
commit 269fb03351
No known key found for this signature in database
GPG Key ID: C839200C384636B0
3 changed files with 75 additions and 0 deletions

View File

@ -296,6 +296,8 @@ IF( APPLE )
macOS/fileprovideritemmetadata.h
macOS/fileprovideritemmetadata.cpp
macOS/fileprovideritemmetadata_mac.mm
macOS/fileprovidermaterialiseditemsmodel.h
macOS/fileprovidermaterialiseditemsmodel.cpp
macOS/fileprovidersettingscontroller.h
macOS/fileprovidersettingscontroller_mac.mm
macOS/fileprovidersocketcontroller.h

View File

@ -0,0 +1,38 @@
/*
* Copyright 2023 (c) Claudio Cambra <claudio.cambra@nextcloud.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
#include "fileprovidermaterialiseditemsmodel.h"
namespace OCC {
namespace Mac {
FileProviderMaterialisedItemsModel::FileProviderMaterialisedItemsModel(QObject * const parent)
: QAbstractListModel(parent)
{
}
int FileProviderMaterialisedItemsModel::rowCount(const QModelIndex &parent) const
{
return 0;
}
QVariant FileProviderMaterialisedItemsModel::data(const QModelIndex &index, int role) const
{
return {};
}
} // namespace Mac
} // namespace OCC

View File

@ -0,0 +1,35 @@
/*
* Copyright 2023 (c) Claudio Cambra <claudio.cambra@nextcloud.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This program is distributed in the hope that it will be useful, but
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* for more details.
*/
#pragma once
#include <QAbstractListModel>
namespace OCC {
namespace Mac {
class FileProviderMaterialisedItemsModel : public QAbstractListModel
{
Q_OBJECT
public:
explicit FileProviderMaterialisedItemsModel(QObject *parent = nullptr);
int rowCount(const QModelIndex &parent = {}) const override;
QVariant data(const QModelIndex &index, int role = Qt::DisplayRole) const override;
};
} // namespace Mac
} // namespace OCC