Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/owncloud/client.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorOlivier Goffart <ogoffart@woboq.com>2016-02-11 17:06:00 +0300
committerOlivier Goffart <ogoffart@woboq.com>2016-02-11 17:09:47 +0300
commitdd89ab59e4ef223112d712e4d04379fa2f6ce359 (patch)
treeadf3d2a5f5f527eb9dced9cb4f46b3c8508d42a9 /src
parent83adb7b55baa911a9b47b1ed1b3a19b6e9612c61 (diff)
Use oc:size instead of quota-used-bytes to get the sizes of folder (#4459)
Diffstat (limited to 'src')
-rw-r--r--src/gui/folderstatusmodel.cpp2
-rw-r--r--src/gui/selectivesyncdialog.cpp4
-rw-r--r--src/gui/wizard/owncloudadvancedsetuppage.cpp4
-rw-r--r--src/libsync/discoveryphase.cpp4
-rw-r--r--src/libsync/networkjobs.cpp2
5 files changed, 8 insertions, 8 deletions
diff --git a/src/gui/folderstatusmodel.cpp b/src/gui/folderstatusmodel.cpp
index d45800d0f..f4b06cf38 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 1b693ed83..ef3fb6c55 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 9a64a98ef..0142fa4eb 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 dd0015843..29b4c223e 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 5a51a4e44..2bd924edf 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) {