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
diff options
context:
space:
mode:
authorOlivier Goffart <olivier@woboq.com>2016-04-22 11:05:50 +0300
committerOlivier Goffart <olivier@woboq.com>2016-04-22 11:05:50 +0300
commit84ac2e64e0c975a95d2b896c0341c13a0125160a (patch)
tree5e800548779c087175220fa65b75fed628304967 /src/gui/quotainfo.cpp
parentb61ae351dd9e51ebd7e96afd7ee48cb675e75eb6 (diff)
Quota: Add branding option for the base folder (#4714)
As discussed on issue ##4460 Having the quote to be queried on subfolder is wrong in the generic case, so add a branding option to configure it. This partially reverts commit ff4cdc3161ddbb74a0fe10f969043ff898fbb93a
Diffstat (limited to 'src/gui/quotainfo.cpp')
-rw-r--r--src/gui/quotainfo.cpp16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/gui/quotainfo.cpp b/src/gui/quotainfo.cpp
index ba124debe..6ba83ea5b 100644
--- a/src/gui/quotainfo.cpp
+++ b/src/gui/quotainfo.cpp
@@ -17,6 +17,7 @@
#include "networkjobs.h"
#include "folderman.h"
#include "creds/abstractcredentials.h"
+#include <theme.h>
#include <QTimer>
#include <QDebug>
@@ -82,20 +83,7 @@ bool QuotaInfo::canGetQuota() const
QString QuotaInfo::quotaBaseFolder() const
{
- // If there's exactly one folder, use its remote path.
- // Otherwise use /
- bool foundOne = false;
- QString path = "/";
- for (const auto & folder : FolderMan::instance()->map()) {
- if (folder->accountState() == _accountState) {
- if (foundOne)
- return "/";
- foundOne = true;
- path = folder->remotePath();
- }
- }
-
- return path;
+ return Theme::instance()->quotaBaseFolder();
}
void QuotaInfo::slotCheckQuota()