[Pkg-owncloud-commits] [owncloud-client] 376/484: ShareDialog: show an error if the sharing API is disabled (#4126)

Sandro Knauß hefee-guest at moszumanska.debian.org
Wed Dec 16 00:38:08 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 575fc9acbdfb90c493d0568f354224d1af6fac25
Author: Olivier Goffart <ogoffart at woboq.com>
Date:   Thu Nov 19 12:00:53 2015 +0100

    ShareDialog:  show an error if the sharing API is disabled (#4126)
---
 src/gui/sharedialog.cpp | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)

diff --git a/src/gui/sharedialog.cpp b/src/gui/sharedialog.cpp
index a433d2d..d5963fc 100644
--- a/src/gui/sharedialog.cpp
+++ b/src/gui/sharedialog.cpp
@@ -76,6 +76,11 @@ ShareDialog::ShareDialog(AccountPtr account, const QString &sharePath, const QSt
 
     this->setWindowTitle(tr("%1 Sharing").arg(Theme::instance()->appNameGUI()));
 
+    if (!account->capabilities().shareAPI()) {
+        _ui->shareWidgetsLayout->addWidget(new QLabel(tr("The server does not allow sharing")));
+        return;
+    }
+
     bool autoShare = true;
 
     // We only do user/group sharing from 8.2.0
@@ -120,7 +125,9 @@ void ShareDialog::getShares()
         job->start();
     }
 
-    _linkWidget->getShares();
+    if (_linkWidget) {
+        _linkWidget->getShares();
+    }
     if (_userGroupWidget != NULL) {
         _userGroupWidget->getShares();
     }

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