[Pkg-owncloud-commits] [owncloud-client] 93/218: Account: Make sure that davPath() always comes with trailing slash.
Sandro Knauß
hefee-guest at moszumanska.debian.org
Sat Oct 17 14:30:50 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 93e1ad088c2623240bf30ed37cf079a499f45b50
Author: Klaas Freitag <freitag at owncloud.com>
Date: Thu Sep 10 15:38:40 2015 +0200
Account: Make sure that davPath() always comes with trailing slash.
---
src/libsync/account.cpp | 11 +++++++++++
src/libsync/account.h | 7 ++++++-
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/src/libsync/account.cpp b/src/libsync/account.cpp
index 0308980..86c808c 100644
--- a/src/libsync/account.cpp
+++ b/src/libsync/account.cpp
@@ -61,6 +61,17 @@ Account::~Account()
delete _am;
}
+QString Account::davPath() const
+{
+ // make sure to have a trailing slash
+ if( !_davPath.endsWith('/') ) {
+ QString dp(_davPath);
+ dp.append('/');
+ return dp;
+ }
+ return _davPath;
+}
+
void Account::setSharedThis(AccountPtr sharedThis)
{
_sharedThis = sharedThis.toWeakRef();
diff --git a/src/libsync/account.h b/src/libsync/account.h
index 986bf85..a1b734c 100644
--- a/src/libsync/account.h
+++ b/src/libsync/account.h
@@ -60,7 +60,12 @@ public:
class OWNCLOUDSYNC_EXPORT Account : public QObject {
Q_OBJECT
public:
- QString davPath() const { return _davPath; }
+ /**
+ * @brief The possibly themed dav path for the account. Is has
+ * a trailing slash.
+ * @returns the (themeable) dav path for the account.
+ */
+ QString davPath() const;
void setDavPath(const QString&s) { _davPath = s; }
static AccountPtr create();
--
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