mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-24 05:55:59 +03:00
Has function for ActivityModel, typos
Signed-off-by: Dominique Fuchs <32204802+DominiqueFuchs@users.noreply.github.com>
This commit is contained in:
parent
25e09815be
commit
687a99279d
4 changed files with 18 additions and 6 deletions
|
@ -46,7 +46,7 @@ Systray::Systray() // TODO: make singleton, provide ::instance()
|
|||
_trayEngine->addImageProvider("avatars", new ImageProvider);
|
||||
_trayEngine->rootContext()->setContextProperty("userModelBackend", UserModel::instance());
|
||||
_trayEngine->rootContext()->setContextProperty("systrayBackend", this);
|
||||
_trayComponent = new QQmlComponent(_trayEngine, QUrl(QStringLiteral("qrc:/qml/src/gui/tray/window.qml")));
|
||||
_trayComponent = new QQmlComponent(_trayEngine, QUrl(QStringLiteral("qrc:/qml/src/gui/tray/Window.qml")));
|
||||
_trayContext = _trayEngine->contextForObject(_trayComponent->create());
|
||||
|
||||
// TODO: hack to pass the icon to QML
|
||||
|
|
|
@ -40,6 +40,14 @@ ActivityListModel::ActivityListModel(AccountState *accountState, QObject* parent
|
|||
{
|
||||
}
|
||||
|
||||
QHash<int, QByteArray> ActivityListModel::roleNames() const
|
||||
{
|
||||
QHash<int, QByteArray> roles;
|
||||
roles[PathRole] = "path";
|
||||
roles[MessageRole] = "message";
|
||||
return roles;
|
||||
}
|
||||
|
||||
QVariant ActivityListModel::data(const QModelIndex &index, int role) const
|
||||
{
|
||||
Activity a;
|
||||
|
|
|
@ -17,7 +17,7 @@
|
|||
|
||||
#include <QtCore>
|
||||
|
||||
#include "activitydata.h"
|
||||
#include "ActivityData.h"
|
||||
|
||||
class QJsonDocument;
|
||||
|
||||
|
@ -48,8 +48,9 @@ public:
|
|||
iconStateSync
|
||||
};
|
||||
|
||||
enum datarole { ActionIconRole = Qt::UserRole + 1,
|
||||
UserIconRole,
|
||||
enum datarole {
|
||||
ActionIconRole = Qt::UserRole + 1,
|
||||
UserIconRole,
|
||||
AccountRole,
|
||||
ObjectTypeRole,
|
||||
ActionsLinksRole,
|
||||
|
@ -95,6 +96,9 @@ private slots:
|
|||
signals:
|
||||
void activityJobStatusCode(int statusCode);
|
||||
|
||||
protected:
|
||||
QHash<int, QByteArray> roleNames() const;
|
||||
|
||||
private:
|
||||
void startFetchJob();
|
||||
void combineActivityLists();
|
||||
|
|
|
@ -397,12 +397,12 @@ Window {
|
|||
Layout.alignment: Qt.AlignLeft
|
||||
Text {
|
||||
id: activityTextTitle
|
||||
text: filename
|
||||
text: path
|
||||
font.pointSize: 9
|
||||
}
|
||||
Text {
|
||||
id: activityTextInfo
|
||||
text: info
|
||||
text: message
|
||||
font.pointSize: 8
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue