mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-26 23:28:14 +03:00
ActivityWidget: Show the local path in a tooltip.
Note that the activity has also entries of files that are not synced so that not every activity entry has to have a local pendant. Also, one activity entry can reference multiple files, so only the first one is shown.
This commit is contained in:
parent
caba719950
commit
631cb095dd
1 changed files with 6 additions and 0 deletions
|
@ -66,13 +66,19 @@ QVariant ActivityListModel::data(const QModelIndex &index, int role) const
|
|||
|
||||
a = _finalList.at(index.row());
|
||||
AccountStatePtr ast = AccountManager::instance()->account(a._accName);
|
||||
QStringList list;
|
||||
|
||||
if (role == Qt::EditRole)
|
||||
return QVariant();
|
||||
|
||||
switch (role) {
|
||||
case Qt::ToolTipRole:
|
||||
list = FolderMan::instance()->findFileInLocalFolders(a._file);
|
||||
if( list.count() > 0 ) {
|
||||
return QVariant(list.at(0));
|
||||
}
|
||||
return QVariant();
|
||||
|
||||
break;
|
||||
case ActivityItemDelegate::ActionIconRole:
|
||||
return QVariant(); // FIXME once the action can be quantified, display on Icon
|
||||
|
|
Loading…
Reference in a new issue