[Pkg-owncloud-commits] [owncloud-client] 199/484: Proper const usage
Sandro Knauß
hefee-guest at moszumanska.debian.org
Wed Dec 16 00:37:42 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 cf8be7de918624a04e3d95170c39f4a4fa22fbb0
Author: Roeland Jago Douma <rullzer at owncloud.com>
Date: Thu Oct 29 13:48:53 2015 +0100
Proper const usage
---
src/gui/share.cpp | 15 +++++++--------
src/gui/share.h | 14 +++++++-------
2 files changed, 14 insertions(+), 15 deletions(-)
diff --git a/src/gui/share.cpp b/src/gui/share.cpp
index 1c44a60..8e63d00 100644
--- a/src/gui/share.cpp
+++ b/src/gui/share.cpp
@@ -31,17 +31,17 @@ Share::Share(AccountPtr account, const QString& id, const QString& path, int sha
}
-const QString Share::getId()
+QString Share::getId() const
{
return _id;
}
-int Share::getShareType()
+int Share::getShareType() const
{
return _shareType;
}
-int Share::getPermissions()
+int Share::getPermissions() const
{
return _permissions;
}
@@ -64,17 +64,17 @@ void Share::slotDeleted(const QVariantMap &reply)
emit shareDeleted();
}
-const QUrl LinkShare::getLink()
+QUrl LinkShare::getLink() const
{
return _url;
}
-const QDate LinkShare::getExpireDate()
+QDate LinkShare::getExpireDate() const
{
return _expireDate;
}
-bool LinkShare::isPasswordSet()
+bool LinkShare::isPasswordSet() const
{
return _passwordSet;
}
@@ -254,12 +254,11 @@ void ShareManager::slotSharesFetched(const QVariantMap &reply)
LinkShare *ShareManager::parseLinkShare(const QVariantMap &data) {
QUrl url;
- const QString versionString = _account->serverVersion();
// From ownCloud server 8.2 the url field is always set for public shares
if (data.contains("url")) {
url = QUrl(data.value("url").toString());
- } else if (versionString.contains('.') && versionString.split('.')[0].toInt() >= 8) {
+ } else if (_account->serverVersionInt() >= (8 << 16)) {
// From ownCloud server version 8 on, a different share link scheme is used.
url = QUrl(Account::concatUrlPath(_account->url(), QString("index.php/s/%1").arg(data.value("token").toString())).toString());
} else {
diff --git a/src/gui/share.h b/src/gui/share.h
index 92f4406..3fb4458 100644
--- a/src/gui/share.h
+++ b/src/gui/share.h
@@ -31,7 +31,7 @@ class Share : public QObject {
public:
/*
- * Constructor for link shares
+ * Constructor for shares
*/
explicit Share(AccountPtr account,
const QString& id,
@@ -43,17 +43,17 @@ public:
/*
* Get the id
*/
- const QString getId();
+ QString getId() const;
/*
* Get the shareType
*/
- int getShareType();
+ int getShareType() const;
/*
* Get permissions
*/
- int getPermissions();
+ int getPermissions() const;
/*
* Set the permissions of a share
@@ -110,7 +110,7 @@ public:
/*
* Get the share link
*/
- const QUrl getLink();
+ QUrl getLink() const;
/*
* Get the publicUpload status of this share
@@ -137,12 +137,12 @@ public:
/*
* Is the password set?
*/
- bool isPasswordSet();
+ bool isPasswordSet() const;
/*
* Get the expiration date
*/
- const QDate getExpireDate();
+ QDate getExpireDate() const;
/*
* Set the expiration date
--
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