[Pkg-owncloud-commits] [owncloud-client] 33/470: Use oc:size instead of quota-used-bytes to get the sizes of folder (#4459)
Sandro Knauß
hefee-guest at moszumanska.debian.org
Thu May 12 16:24:41 UTC 2016
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 dd89ab59e4ef223112d712e4d04379fa2f6ce359
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Thu Feb 11 15:06:00 2016 +0100
Use oc:size instead of quota-used-bytes to get the sizes of folder (#4459)
---
src/gui/folderstatusmodel.cpp | 2 +-
src/gui/selectivesyncdialog.cpp | 4 ++--
src/gui/wizard/owncloudadvancedsetuppage.cpp | 4 ++--
src/libsync/discoveryphase.cpp | 4 ++--
src/libsync/networkjobs.cpp | 2 +-
5 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp
index d45800d..f4b06cf 100644
--- a/src/gui/folderstatusmodel.cpp
+++ b/src/gui/folderstatusmodel.cpp
@@ -517,7 +517,7 @@ void FolderStatusModel::fetchMore(const QModelIndex& parent)
path += info->_path;
}
LsColJob *job = new LsColJob(_accountState->account(), path, this);
- job->setProperties(QList<QByteArray>() << "resourcetype" << "quota-used-bytes");
+ job->setProperties(QList<QByteArray>() << "resourcetype" << "http://owncloud.org/ns:size");
job->setTimeout(60 * 1000);
connect(job, SIGNAL(directoryListingSubfolders(QStringList)),
SLOT(slotUpdateDirectories(QStringList)));
diff --git a/src/gui/selectivesyncdialog.cpp b/src/gui/selectivesyncdialog.cpp
index 1b693ed..ef3fb6c 100644
--- a/src/gui/selectivesyncdialog.cpp
+++ b/src/gui/selectivesyncdialog.cpp
@@ -81,7 +81,7 @@ QSize SelectiveSyncTreeView::sizeHint() const
void SelectiveSyncTreeView::refreshFolders()
{
LsColJob *job = new LsColJob(_account, _folderPath, this);
- job->setProperties(QList<QByteArray>() << "resourcetype" << "quota-used-bytes");
+ job->setProperties(QList<QByteArray>() << "resourcetype" << "http://owncloud.org/ns:size");
connect(job, SIGNAL(directoryListingSubfolders(QStringList)),
this, SLOT(slotUpdateDirectories(QStringList)));
connect(job, SIGNAL(finishedWithError(QNetworkReply*)),
@@ -263,7 +263,7 @@ void SelectiveSyncTreeView::slotItemExpanded(QTreeWidgetItem *item)
prefix = _folderPath + QLatin1Char('/');
}
LsColJob *job = new LsColJob(_account, prefix + dir, this);
- job->setProperties(QList<QByteArray>() << "resourcetype" << "quota-used-bytes");
+ job->setProperties(QList<QByteArray>() << "resourcetype" << "http://owncloud.org/ns:size");
connect(job, SIGNAL(directoryListingSubfolders(QStringList)),
SLOT(slotUpdateDirectories(QStringList)));
job->start();
diff --git a/src/gui/wizard/owncloudadvancedsetuppage.cpp b/src/gui/wizard/owncloudadvancedsetuppage.cpp
index 9a64a98..0142fa4 100644
--- a/src/gui/wizard/owncloudadvancedsetuppage.cpp
+++ b/src/gui/wizard/owncloudadvancedsetuppage.cpp
@@ -108,7 +108,7 @@ void OwncloudAdvancedSetupPage::initializePage()
auto acc = static_cast<OwncloudWizard *>(wizard())->account();
auto quotaJob = new PropfindJob(acc, _remoteFolder, this);
- quotaJob->setProperties(QList<QByteArray>() << "quota-used-bytes");
+ quotaJob->setProperties(QList<QByteArray>() << "http://owncloud.org/ns:size");
connect(quotaJob, SIGNAL(result(QVariantMap)), SLOT(slotQuotaRetrieved(QVariantMap)));
quotaJob->start();
@@ -303,7 +303,7 @@ void OwncloudAdvancedSetupPage::slotSyncEverythingClicked()
void OwncloudAdvancedSetupPage::slotQuotaRetrieved(const QVariantMap &result)
{
- _ui.lSyncEverythingSizeLabel->setText(tr("(%1)").arg(Utility::octetsToString(result["quota-used-bytes"].toDouble())));
+ _ui.lSyncEverythingSizeLabel->setText(tr("(%1)").arg(Utility::octetsToString(result["size"].toDouble())));
}
diff --git a/src/libsync/discoveryphase.cpp b/src/libsync/discoveryphase.cpp
index dd00158..29b4c22 100644
--- a/src/libsync/discoveryphase.cpp
+++ b/src/libsync/discoveryphase.cpp
@@ -485,7 +485,7 @@ void DiscoveryMainThread::doGetSizeSlot(const QString& path, qint64* result)
// Schedule the DiscoverySingleDirectoryJob
auto propfindJob = new PropfindJob(_account, fullPath, this);
- propfindJob->setProperties(QList<QByteArray>() << "resourcetype" << "quota-used-bytes");
+ propfindJob->setProperties(QList<QByteArray>() << "resourcetype" << "http://owncloud.org/ns:size");
QObject::connect(propfindJob, SIGNAL(finishedWithError()),
this, SLOT(slotGetSizeFinishedWithError()));
QObject::connect(propfindJob, SIGNAL(result(QVariantMap)),
@@ -513,7 +513,7 @@ void DiscoveryMainThread::slotGetSizeResult(const QVariantMap &map)
return; // possibly aborted
}
- *_currentGetSizeResult = map.value(QLatin1String("quota-used-bytes")).toLongLong();
+ *_currentGetSizeResult = map.value(QLatin1String("size")).toLongLong();
qDebug() << "Size of folder:" << *_currentGetSizeResult;
_currentGetSizeResult = 0;
QMutexLocker locker(&_discoveryJob->_vioMutex);
diff --git a/src/libsync/networkjobs.cpp b/src/libsync/networkjobs.cpp
index 5a51a4e..2bd924e 100644
--- a/src/libsync/networkjobs.cpp
+++ b/src/libsync/networkjobs.cpp
@@ -208,7 +208,7 @@ bool LsColXMLParser::parse( const QByteArray& xml, QHash<QString, qint64> *sizes
QString propertyContent = readContentsAsString(reader);
if (name == QLatin1String("resourcetype") && propertyContent.contains("collection")) {
folders.append(currentHref);
- } else if (name == QLatin1String("quota-used-bytes")) {
+ } else if (name == QLatin1String("size")) {
bool ok = false;
auto s = propertyContent.toLongLong(&ok);
if (ok && sizes) {
--
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