[Pkg-owncloud-commits] [owncloud-client] 455/498: Theme: add a settings for configuring the default of newBigFolderSizeLimit
Sandro Knauß
hefee-guest at moszumanska.debian.org
Tue Aug 11 14:49:17 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 0e3262b1812d9911143e7f2e149ef59df30024c8
Author: Olivier Goffart <ogoffart at woboq.com>
Date: Wed Aug 5 15:33:38 2015 +0200
Theme: add a settings for configuring the default of newBigFolderSizeLimit
---
src/libsync/configfile.cpp | 3 ++-
src/libsync/theme.cpp | 7 +++++++
src/libsync/theme.h | 7 +++++++
3 files changed, 16 insertions(+), 1 deletion(-)
diff --git a/src/libsync/configfile.cpp b/src/libsync/configfile.cpp
index 4d802ce..2917be1 100644
--- a/src/libsync/configfile.cpp
+++ b/src/libsync/configfile.cpp
@@ -573,7 +573,8 @@ void ConfigFile::setDownloadLimit(int kbytes)
QPair<bool, quint64> ConfigFile::newBigFolderSizeLimit() const
{
- qint64 value = getValue(newBigFolderSizeLimitC, QString(), 500).toLongLong(); // Default to 500MB
+ auto defaultValue = Theme::instance()->newBigFolderSizeLimit();
+ qint64 value = getValue(newBigFolderSizeLimitC, QString(), defaultValue).toLongLong();
bool use = value >= 0 && getValue(useNewBigFolderSizeLimitC, QString(), true).toBool();
return qMakePair(use, quint64(qMax<qint64>(0, value)));
}
diff --git a/src/libsync/theme.cpp b/src/libsync/theme.cpp
index 50da8d1..3aafeaa 100644
--- a/src/libsync/theme.cpp
+++ b/src/libsync/theme.cpp
@@ -248,6 +248,13 @@ QString Theme::transmissionChecksum() const
return QString::null; // No transmission by default.
}
+qint64 Theme::newBigFolderSizeLimit() const
+{
+ // Default to 500MB
+ return 500;
+}
+
+
QString Theme::gitSHA1() const
{
QString devString;
diff --git a/src/libsync/theme.h b/src/libsync/theme.h
index b977272..2d34c31 100644
--- a/src/libsync/theme.h
+++ b/src/libsync/theme.h
@@ -208,6 +208,13 @@ public:
*/
virtual QString transmissionChecksum() const;
+ /**
+ * Default option for the newBigFolderSizeLimit.
+ * Size in MB of the maximum size of folder before we ask the confirmation.
+ * Set -1 to never ask confirmation. 0 to ask confirmation for every folder.
+ **/
+ virtual qint64 newBigFolderSizeLimit() const;
+
protected:
#ifndef TOKEN_AUTH_ONLY
QIcon themeIcon(const QString& name, bool sysTray = false) const;
--
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