[Pkg-owncloud-commits] [owncloud-client] 61/484: AccountSettings: Show disabled 'Add Folder' tooltip on click #3645

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:13 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 efdb29d2f9238ce0b66f66d1227e3e7484856e74
Author: Christian Kamm <mail at ckamm.de>
Date:   Wed Oct 14 11:34:30 2015 +0200

    AccountSettings: Show disabled 'Add Folder' tooltip on click #3645
---
 src/gui/accountsettings.cpp | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/src/gui/accountsettings.cpp b/src/gui/accountsettings.cpp
index bdaa2e3..65736af 100644
--- a/src/gui/accountsettings.cpp
+++ b/src/gui/accountsettings.cpp
@@ -42,6 +42,7 @@
 #include <QKeySequence>
 #include <QIcon>
 #include <QVariant>
+#include <QToolTip>
 #include <qstringlistmodel.h>
 #include <qpropertyanimation.h>
 
@@ -181,9 +182,15 @@ void AccountSettings::slotCustomContextMenuRequested(const QPoint &pos)
 
 void AccountSettings::slotFolderActivated( const QModelIndex& indx )
 {
-    if (indx.data(FolderStatusDelegate::AddButton).toBool()
-            && indx.flags() & Qt::ItemIsEnabled) {
-        slotAddFolder();
+    if (indx.data(FolderStatusDelegate::AddButton).toBool()) {
+        if (indx.flags() & Qt::ItemIsEnabled) {
+            slotAddFolder();
+        } else {
+            QToolTip::showText(
+                    QCursor::pos(),
+                    _model->data(indx, Qt::ToolTipRole).toString(),
+                    this);
+        }
         return;
     }
     if (_model->classify(indx) == FolderStatusModel::RootFolder) {

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