[Pkg-owncloud-commits] [owncloud-client] 324/484: ActivityWidget: Show the local path in a tooltip.

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:59 UTC 2015


This is an automated email from the git hooks/post-receive script.

hefee-guest pushed a commit to branch master
in repository owncloud-client.

commit 631cb095dd961ca07c05cf9788856ea792fe2cc6
Author: Klaas Freitag <freitag at owncloud.com>
Date:   Mon Nov 16 15:07:02 2015 +0100

    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.
---
 src/gui/activitywidget.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/gui/activitywidget.cpp b/src/gui/activitywidget.cpp
index 2204faa..b404c6d 100644
--- a/src/gui/activitywidget.cpp
+++ b/src/gui/activitywidget.cpp
@@ -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

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud-client.git



More information about the Pkg-owncloud-commits mailing list