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:
Klaas Freitag 2015-11-16 15:07:02 +01:00
parent caba719950
commit 631cb095dd

View file

@ -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