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)));
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*)),
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();
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();
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())));
}
// 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)),
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);
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) {