Comparar commits
1 Commits
| Autor | SHA1 | Data | |
|---|---|---|---|
| 05632addb9 |
+1
-1
@@ -5,7 +5,7 @@ set( MIRALL_VERSION_YEAR 2016 )
|
||||
set( MIRALL_SOVERSION 0 )
|
||||
|
||||
if ( NOT DEFINED MIRALL_VERSION_SUFFIX )
|
||||
set( MIRALL_VERSION_SUFFIX "git") #e.g. beta1, beta2, rc1
|
||||
set( MIRALL_VERSION_SUFFIX "pre1") #e.g. beta1, beta2, rc1
|
||||
endif( NOT DEFINED MIRALL_VERSION_SUFFIX )
|
||||
|
||||
if( NOT DEFINED MIRALL_VERSION_BUILD )
|
||||
|
||||
@@ -89,7 +89,7 @@ struct csync_s {
|
||||
|
||||
/* hooks for checking the white list (uses the update_callback_userdata) */
|
||||
int (*checkSelectiveSyncBlackListHook)(void*, const char*);
|
||||
int (*checkSelectiveSyncNewFolderHook)(void*, const char* /* path */, const char* /* remotePerm */);
|
||||
int (*checkSelectiveSyncNewFolderHook)(void*, const char*);
|
||||
|
||||
|
||||
csync_vio_opendir_hook remote_opendir_hook;
|
||||
|
||||
@@ -436,7 +436,7 @@ static int _csync_detect_update(CSYNC *ctx, const char *file,
|
||||
st->instruction = CSYNC_INSTRUCTION_NEW;
|
||||
|
||||
if (fs->type == CSYNC_VIO_FILE_TYPE_DIRECTORY && ctx->current == REMOTE_REPLICA && ctx->callbacks.checkSelectiveSyncNewFolderHook) {
|
||||
if (ctx->callbacks.checkSelectiveSyncNewFolderHook(ctx->callbacks.update_callback_userdata, path, fs->remotePerm)) {
|
||||
if (ctx->callbacks.checkSelectiveSyncNewFolderHook(ctx->callbacks.update_callback_userdata, path)) {
|
||||
csync_file_stat_free(st);
|
||||
return 1;
|
||||
}
|
||||
|
||||
@@ -37,10 +37,6 @@ Operating system:
|
||||
|
||||
OS language:
|
||||
|
||||
Qt version used by client package (Linux only, see also Settings dialog):
|
||||
|
||||
Client package (From ownCloud or distro) (Linux only):
|
||||
|
||||
Installation path of client:
|
||||
|
||||
### Logs
|
||||
|
||||
@@ -643,9 +643,6 @@ X-GNOME-Autostart-Delay=3
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
|
||||
|
||||
# Translations
|
||||
Comment[oc]=@APPLICATION_NAME@ sincronizacion del client
|
||||
GenericName[oc]=Dorsièr de Sincronizacion
|
||||
|
||||
@@ -675,13 +675,8 @@ void AccountSettings::refreshSelectiveSyncStatus()
|
||||
ui->selectiveSyncButtons->setVisible(true);
|
||||
ui->bigFolderUi->setVisible(false);
|
||||
} else {
|
||||
ConfigFile cfg;
|
||||
QString info =
|
||||
!cfg.confirmExternalStorage() ? tr("There are folders that were not synchronized because they are too big: ") :
|
||||
!cfg.newBigFolderSizeLimit().first ? tr("There are folders that were not synchronized because they are external storages: ") :
|
||||
tr("There are folders that were not synchronized because they are too big or external storages: ");
|
||||
|
||||
ui->selectiveSyncNotification->setText(info + msg);
|
||||
QString wholeMsg = tr("There are new folders that were not synchronized because they are too big: ") + msg;
|
||||
ui->selectiveSyncNotification->setText(wholeMsg);
|
||||
ui->selectiveSyncButtons->setVisible(false);
|
||||
ui->bigFolderUi->setVisible(true);
|
||||
shouldBeVisible = true;
|
||||
|
||||
+7
-12
@@ -104,8 +104,7 @@ Folder::Folder(const FolderDefinition& definition,
|
||||
connect(_engine.data(), SIGNAL(transmissionProgress(ProgressInfo)), this, SLOT(slotTransmissionProgress(ProgressInfo)));
|
||||
connect(_engine.data(), SIGNAL(itemCompleted(const SyncFileItem &, const PropagatorJob &)),
|
||||
this, SLOT(slotItemCompleted(const SyncFileItem &, const PropagatorJob &)));
|
||||
connect(_engine.data(), SIGNAL(newBigFolder(QString,bool)),
|
||||
this, SLOT(slotNewBigFolderDiscovered(QString,bool)));
|
||||
connect(_engine.data(), SIGNAL(newBigFolder(QString)), this, SLOT(slotNewBigFolderDiscovered(QString)));
|
||||
connect(_engine.data(), SIGNAL(seenLockedFile(QString)), FolderMan::instance(), SLOT(slotSyncOnceFileUnlocks(QString)));
|
||||
connect(_engine.data(), SIGNAL(aboutToPropagate(SyncFileItemVector&)),
|
||||
SLOT(slotLogPropagationStart()));
|
||||
@@ -749,12 +748,10 @@ void Folder::startSync(const QStringList &pathList)
|
||||
|
||||
setDirtyNetworkLimits();
|
||||
|
||||
SyncOptions opt;
|
||||
ConfigFile cfgFile;
|
||||
auto newFolderLimit = cfgFile.newBigFolderSizeLimit();
|
||||
opt._newBigFolderSizeLimit = newFolderLimit.first ? newFolderLimit.second * 1000LL * 1000LL : -1; // convert from MB to B
|
||||
opt._confirmExternalStorage = cfgFile.confirmExternalStorage();
|
||||
_engine->setSyncOptions(opt);
|
||||
quint64 limit = newFolderLimit.first ? newFolderLimit.second * 1000 * 1000 : -1; // convert from MB to B
|
||||
_engine->setNewBigFolderSizeLimit(limit);
|
||||
|
||||
_engine->setIgnoreHiddenFiles(_definition.ignoreHiddenFiles);
|
||||
|
||||
@@ -931,7 +928,7 @@ void Folder::slotItemCompleted(const SyncFileItem &item, const PropagatorJob& jo
|
||||
emit ProgressDispatcher::instance()->itemCompleted(alias(), item, job);
|
||||
}
|
||||
|
||||
void Folder::slotNewBigFolderDiscovered(const QString &newF, bool isExternal)
|
||||
void Folder::slotNewBigFolderDiscovered(const QString &newF)
|
||||
{
|
||||
auto newFolder = newF;
|
||||
if (!newFolder.endsWith(QLatin1Char('/'))) {
|
||||
@@ -956,11 +953,9 @@ void Folder::slotNewBigFolderDiscovered(const QString &newF, bool isExternal)
|
||||
journal->setSelectiveSyncList(SyncJournalDb::SelectiveSyncUndecidedList, undecidedList);
|
||||
emit newBigFolderDiscovered(newFolder);
|
||||
}
|
||||
QString message = !isExternal ?
|
||||
(tr("A new folder larger than %1 MB has been added: %2.\n")
|
||||
.arg(ConfigFile().newBigFolderSizeLimit().second).arg(newF))
|
||||
: (tr("A folder from an external storage has been added.\n"));
|
||||
message += tr("Please go in the settings to select it if you wish to download it.");
|
||||
QString message = tr("A new folder larger than %1 MB has been added: %2.\n"
|
||||
"Please go in the settings to select it if you wish to download it.")
|
||||
.arg(ConfigFile().newBigFolderSizeLimit().second).arg(newF);
|
||||
|
||||
auto logger = Logger::instance();
|
||||
logger->postOptionalGuiLog(Theme::instance()->appNameGUI(), message);
|
||||
|
||||
+1
-1
@@ -290,7 +290,7 @@ private slots:
|
||||
|
||||
void slotEmitFinishedDelayed();
|
||||
|
||||
void slotNewBigFolderDiscovered(const QString &, bool isExternal);
|
||||
void slotNewBigFolderDiscovered(const QString &);
|
||||
|
||||
void slotLogPropagationStart();
|
||||
|
||||
|
||||
@@ -29,14 +29,6 @@ Q_DECLARE_METATYPE(QPersistentModelIndex)
|
||||
namespace OCC {
|
||||
|
||||
static const char propertyParentIndexC[] = "oc_parentIndex";
|
||||
static const char propertyPermissionMap[] = "oc_permissionMap";
|
||||
|
||||
static QString removeTrailingSlash(const QString &s) {
|
||||
if (s.endsWith('/')) {
|
||||
return s.left(s.size() - 1);
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
FolderStatusModel::FolderStatusModel(QObject *parent)
|
||||
:QAbstractItemModel(parent), _accountState(0), _dirty(false)
|
||||
@@ -170,7 +162,7 @@ QVariant FolderStatusModel::data(const QModelIndex &index, int role) const
|
||||
case Qt::CheckStateRole:
|
||||
return x._checked;
|
||||
case Qt::DecorationRole:
|
||||
return QFileIconProvider().icon(x._isExternal ? QFileIconProvider::Network : QFileIconProvider::Folder);
|
||||
return QFileIconProvider().icon(QFileIconProvider::Folder);
|
||||
case Qt::ForegroundRole:
|
||||
if (x._isUndecided) {
|
||||
return QColor(Qt::red);
|
||||
@@ -376,9 +368,6 @@ FolderStatusModel::SubFolderInfo* FolderStatusModel::infoForIndex(const QModelIn
|
||||
if (parentInfo->hasLabel()) {
|
||||
return 0;
|
||||
}
|
||||
if (index.row() >= parentInfo->_subs.size()) {
|
||||
return 0;
|
||||
}
|
||||
return &parentInfo->_subs[index.row()];
|
||||
} else {
|
||||
if (index.row() >= _folders.count()) {
|
||||
@@ -548,15 +537,12 @@ void FolderStatusModel::fetchMore(const QModelIndex& parent)
|
||||
path += info->_path;
|
||||
}
|
||||
LsColJob *job = new LsColJob(_accountState->account(), path, this);
|
||||
job->setProperties(QList<QByteArray>() << "resourcetype" << "http://owncloud.org/ns:size" << "http://owncloud.org/ns:permissions");
|
||||
job->setProperties(QList<QByteArray>() << "resourcetype" << "http://owncloud.org/ns:size");
|
||||
job->setTimeout(60 * 1000);
|
||||
connect(job, SIGNAL(directoryListingSubfolders(QStringList)),
|
||||
SLOT(slotUpdateDirectories(QStringList)));
|
||||
connect(job, SIGNAL(finishedWithError(QNetworkReply*)),
|
||||
this, SLOT(slotLscolFinishedWithError(QNetworkReply*)));
|
||||
connect(job, SIGNAL(directoryListingIterated(const QString&, const QMap<QString,QString>&)),
|
||||
this, SLOT(slotGatherPermissions(const QString&, const QMap<QString,QString>&)));
|
||||
|
||||
job->start();
|
||||
|
||||
QPersistentModelIndex persistentIndex(parent);
|
||||
@@ -567,20 +553,6 @@ void FolderStatusModel::fetchMore(const QModelIndex& parent)
|
||||
QTimer::singleShot(1000, this, SLOT(slotShowFetchProgress()));
|
||||
}
|
||||
|
||||
void FolderStatusModel::slotGatherPermissions(const QString &href, const QMap<QString,QString> &map)
|
||||
{
|
||||
auto it = map.find("permissions");
|
||||
if (it == map.end())
|
||||
return;
|
||||
|
||||
auto job = sender();
|
||||
auto permissionMap = job->property(propertyPermissionMap).toMap();
|
||||
job->setProperty(propertyPermissionMap, QVariant()); // avoid a detach of the map while it is modified
|
||||
Q_ASSERT(!href.endsWith(QLatin1Char('/'))); // LsColXMLParser::parse removes the trailing slash before calling us.
|
||||
permissionMap[href] = *it;
|
||||
job->setProperty(propertyPermissionMap, permissionMap);
|
||||
}
|
||||
|
||||
void FolderStatusModel::slotUpdateDirectories(const QStringList &list)
|
||||
{
|
||||
auto job = qobject_cast<LsColJob *>(sender());
|
||||
@@ -626,7 +598,6 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list)
|
||||
selectiveSyncUndecidedSet.insert(str);
|
||||
}
|
||||
}
|
||||
const auto permissionMap = job->property(propertyPermissionMap).toMap();
|
||||
|
||||
QStringList sortedSubfolders = list;
|
||||
// skip the parent item (first in the list)
|
||||
@@ -647,8 +618,8 @@ void FolderStatusModel::slotUpdateDirectories(const QStringList &list)
|
||||
newInfo._folder = parentInfo->_folder;
|
||||
newInfo._pathIdx = parentInfo->_pathIdx;
|
||||
newInfo._pathIdx << newSubs.size();
|
||||
newInfo._size = job->_sizes.value(path);
|
||||
newInfo._isExternal = permissionMap.value(removeTrailingSlash(path)).toString().contains("M");
|
||||
auto size = job ? job->_sizes.value(path) : 0;
|
||||
newInfo._size = size;
|
||||
newInfo._path = relativePath;
|
||||
newInfo._name = relativePath.split('/', QString::SkipEmptyParts).last();
|
||||
|
||||
|
||||
@@ -51,7 +51,7 @@ public:
|
||||
|
||||
struct SubFolderInfo {
|
||||
SubFolderInfo()
|
||||
: _folder(0), _size(0), _isExternal(false), _fetched(false), _fetching(false),
|
||||
: _folder(0), _size(0), _fetched(false), _fetching(false),
|
||||
_hasError(false), _fetchingLabel(false), _isUndecided(false), _checked(Qt::Checked) {}
|
||||
Folder *_folder;
|
||||
QString _name;
|
||||
@@ -59,7 +59,6 @@ public:
|
||||
QVector<int> _pathIdx;
|
||||
QVector<SubFolderInfo> _subs;
|
||||
qint64 _size;
|
||||
bool _isExternal;
|
||||
|
||||
bool _fetched; // If we did the LSCOL for this folder already
|
||||
bool _fetching; // Whether a LSCOL job is currently running
|
||||
@@ -114,7 +113,6 @@ public slots:
|
||||
|
||||
private slots:
|
||||
void slotUpdateDirectories(const QStringList &);
|
||||
void slotGatherPermissions(const QString &name, const QMap<QString,QString> &properties);
|
||||
void slotLscolFinishedWithError(QNetworkReply *r);
|
||||
void slotFolderSyncStateChange(Folder* f);
|
||||
void slotFolderScheduleQueueChanged();
|
||||
|
||||
@@ -32,7 +32,6 @@
|
||||
|
||||
#include <QNetworkProxy>
|
||||
#include <QDir>
|
||||
#include <QScopedValueRollback>
|
||||
|
||||
namespace OCC {
|
||||
|
||||
@@ -67,7 +66,6 @@ GeneralSettings::GeneralSettings(QWidget *parent) :
|
||||
connect(_ui->crashreporterCheckBox, SIGNAL(toggled(bool)), SLOT(saveMiscSettings()));
|
||||
connect(_ui->newFolderLimitCheckBox, SIGNAL(toggled(bool)), SLOT(saveMiscSettings()));
|
||||
connect(_ui->newFolderLimitSpinBox, SIGNAL(valueChanged(int)), SLOT(saveMiscSettings()));
|
||||
connect(_ui->newExternalStorage, SIGNAL(toggled(bool)), SLOT(saveMiscSettings()));
|
||||
|
||||
#ifndef WITH_CRASHREPORTER
|
||||
_ui->crashreporterCheckBox->setVisible(false);
|
||||
@@ -87,9 +85,6 @@ GeneralSettings::GeneralSettings(QWidget *parent) :
|
||||
_ui->monoIconsCheckBox->setVisible(QDir(themeDir).exists());
|
||||
|
||||
connect(_ui->ignoredFilesButton, SIGNAL(clicked()), SLOT(slotIgnoreFilesEditor()));
|
||||
|
||||
// accountAdded means the wizard was finished and the wizard might change some options.
|
||||
connect(AccountManager::instance(), SIGNAL(accountAdded(AccountState*)), this, SLOT(loadMiscSettings()));
|
||||
}
|
||||
|
||||
GeneralSettings::~GeneralSettings()
|
||||
@@ -104,7 +99,6 @@ QSize GeneralSettings::sizeHint() const {
|
||||
|
||||
void GeneralSettings::loadMiscSettings()
|
||||
{
|
||||
QScopedValueRollback<bool> scope(_currentlyLoading, true);
|
||||
ConfigFile cfgFile;
|
||||
_ui->monoIconsCheckBox->setChecked(cfgFile.monoIcons());
|
||||
_ui->desktopNotificationsCheckBox->setChecked(cfgFile.optionalDesktopNotifications());
|
||||
@@ -112,8 +106,6 @@ void GeneralSettings::loadMiscSettings()
|
||||
auto newFolderLimit = cfgFile.newBigFolderSizeLimit();
|
||||
_ui->newFolderLimitCheckBox->setChecked(newFolderLimit.first);
|
||||
_ui->newFolderLimitSpinBox->setValue(newFolderLimit.second);
|
||||
_ui->newExternalStorage->setChecked(cfgFile.confirmExternalStorage());
|
||||
_ui->monoIconsCheckBox->setChecked(cfgFile.monoIcons());
|
||||
}
|
||||
|
||||
void GeneralSettings::slotUpdateInfo()
|
||||
@@ -138,8 +130,6 @@ void GeneralSettings::slotUpdateInfo()
|
||||
|
||||
void GeneralSettings::saveMiscSettings()
|
||||
{
|
||||
if (_currentlyLoading)
|
||||
return;
|
||||
ConfigFile cfgFile;
|
||||
bool isChecked = _ui->monoIconsCheckBox->isChecked();
|
||||
cfgFile.setMonoIcons(isChecked);
|
||||
@@ -148,7 +138,6 @@ void GeneralSettings::saveMiscSettings()
|
||||
|
||||
cfgFile.setNewBigFolderSizeLimit(_ui->newFolderLimitCheckBox->isChecked(),
|
||||
_ui->newFolderLimitSpinBox->value());
|
||||
cfgFile.setConfirmExternalStorage(_ui->newExternalStorage->isChecked());
|
||||
}
|
||||
|
||||
void GeneralSettings::slotToggleLaunchOnStartup(bool enable)
|
||||
|
||||
@@ -45,14 +45,13 @@ private slots:
|
||||
void slotToggleOptionalDesktopNotifications(bool);
|
||||
void slotUpdateInfo();
|
||||
void slotIgnoreFilesEditor();
|
||||
void loadMiscSettings();
|
||||
|
||||
private:
|
||||
void loadMiscSettings();
|
||||
|
||||
Ui::GeneralSettings *_ui;
|
||||
QPointer<IgnoreListEditor> _ignoreEditor;
|
||||
QPointer<SyncLogDialog> _syncLogDialog;
|
||||
bool _currentlyLoading = false;
|
||||
};
|
||||
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>785</width>
|
||||
<width>706</width>
|
||||
<height>523</height>
|
||||
</rect>
|
||||
</property>
|
||||
@@ -52,37 +52,33 @@
|
||||
<property name="title">
|
||||
<string>Advanced</string>
|
||||
</property>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<widget class="QPushButton" name="ignoredFilesButton">
|
||||
<property name="text">
|
||||
<string>Edit &Ignored Files</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>555</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
<layout class="QGridLayout" name="gridLayout">
|
||||
<item row="0" column="0">
|
||||
<widget class="QPushButton" name="ignoredFilesButton">
|
||||
<property name="text">
|
||||
<string>Edit &Ignored Files</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="0" column="1" colspan="2">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>555</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="1" column="0" colspan="3">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="newFolderLimitCheckBox">
|
||||
<property name="text">
|
||||
<string>Ask for confirmation before synchronizing folders larger than</string>
|
||||
<string>Ask &confirmation before downloading folders larger than</string>
|
||||
</property>
|
||||
<property name="checked">
|
||||
<bool>true</bool>
|
||||
@@ -102,7 +98,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string extracomment="Trailing part of "Ask confirmation before syncing folder larger than" ">MB</string>
|
||||
<string>MB</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
@@ -121,14 +117,7 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QCheckBox" name="newExternalStorage">
|
||||
<property name="text">
|
||||
<string>Ask for confirmation before synchronizing external storages</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<item row="2" column="0" colspan="2">
|
||||
<widget class="QCheckBox" name="crashreporterCheckBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="MinimumExpanding" vsizetype="Fixed">
|
||||
@@ -141,6 +130,23 @@
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item row="2" column="2">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_5">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_5">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
</item>
|
||||
|
||||
@@ -533,11 +533,9 @@ void OwncloudSetupWizard::slotAssistantFinished( int result )
|
||||
if (f) {
|
||||
f->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncBlackList,
|
||||
_ocWizard->selectiveSyncBlacklist());
|
||||
if (!_ocWizard->isConfirmBigFolderChecked()) {
|
||||
// The user already accepted the selective sync dialog. everything is in the white list
|
||||
f->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncWhiteList,
|
||||
// The user already accepted the selective sync dialog. everything is in the white list
|
||||
f->journalDb()->setSelectiveSyncList(SyncJournalDb::SelectiveSyncWhiteList,
|
||||
QStringList() << QLatin1String("/"));
|
||||
}
|
||||
}
|
||||
_ocWizard->appendToConfigurationLog(tr("<font color=\"green\"><b>Local sync folder %1 successfully created!</b></font>").arg(localFolder));
|
||||
}
|
||||
|
||||
@@ -68,15 +68,6 @@ OwncloudAdvancedSetupPage::OwncloudAdvancedSetupPage()
|
||||
_ui.lServerIcon->setPixmap(appIcon.pixmap(48));
|
||||
_ui.lLocalIcon->setText(QString());
|
||||
_ui.lLocalIcon->setPixmap(QPixmap(Theme::hidpiFileName(":/client/resources/folder-sync.png")));
|
||||
|
||||
if (theme->wizardHideExternalStorageConfirmationCheckbox()) {
|
||||
_ui.confCheckBoxExternal->hide();
|
||||
}
|
||||
if (theme->wizardHideFolderSizeLimitCheckbox()) {
|
||||
_ui.confCheckBoxSize->hide();
|
||||
_ui.confSpinBox->hide();
|
||||
_ui.confTraillingSizeLabel->hide();
|
||||
}
|
||||
}
|
||||
|
||||
void OwncloudAdvancedSetupPage::setupCustomization()
|
||||
@@ -127,12 +118,6 @@ void OwncloudAdvancedSetupPage::initializePage()
|
||||
_selectiveSyncBlacklist = QStringList("/");
|
||||
QTimer::singleShot(0, this, SLOT(slotSelectiveSyncClicked()));
|
||||
}
|
||||
|
||||
ConfigFile cfgFile;
|
||||
auto newFolderLimit = cfgFile.newBigFolderSizeLimit();
|
||||
_ui.confCheckBoxSize->setChecked(newFolderLimit.first);
|
||||
_ui.confSpinBox->setValue(newFolderLimit.second);
|
||||
_ui.confCheckBoxExternal->setChecked(cfgFile.confirmExternalStorage());
|
||||
}
|
||||
|
||||
// Called if the user changes the user- or url field. Adjust the texts and
|
||||
@@ -215,11 +200,6 @@ QStringList OwncloudAdvancedSetupPage::selectiveSyncBlacklist() const
|
||||
return _selectiveSyncBlacklist;
|
||||
}
|
||||
|
||||
bool OwncloudAdvancedSetupPage::isConfirmBigFolderChecked() const
|
||||
{
|
||||
return _ui.rSyncEverything->isChecked() && _ui.confCheckBoxSize->isChecked();
|
||||
}
|
||||
|
||||
bool OwncloudAdvancedSetupPage::validatePage()
|
||||
{
|
||||
if(!_created) {
|
||||
@@ -228,13 +208,6 @@ bool OwncloudAdvancedSetupPage::validatePage()
|
||||
startSpinner();
|
||||
emit completeChanged();
|
||||
|
||||
if (_ui.rSyncEverything->isChecked()) {
|
||||
ConfigFile cfgFile;
|
||||
cfgFile.setNewBigFolderSizeLimit(_ui.confCheckBoxSize->isChecked(),
|
||||
_ui.confSpinBox->value());
|
||||
cfgFile.setConfirmExternalStorage(_ui.confCheckBoxExternal->isChecked());
|
||||
}
|
||||
|
||||
emit createLocalAndRemoteFolders(localFolder(), _remoteFolder);
|
||||
return false;
|
||||
} else {
|
||||
|
||||
@@ -41,7 +41,6 @@ public:
|
||||
bool validatePage() Q_DECL_OVERRIDE;
|
||||
QString localFolder() const;
|
||||
QStringList selectiveSyncBlacklist() const;
|
||||
bool isConfirmBigFolderChecked() const;
|
||||
void setRemoteFolder( const QString& remoteFolder);
|
||||
void setMultipleFoldersExist( bool exist );
|
||||
void directoriesCreated();
|
||||
|
||||
@@ -6,12 +6,12 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>912</width>
|
||||
<height>633</height>
|
||||
<width>917</width>
|
||||
<height>493</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Maximum" vsizetype="Maximum">
|
||||
<sizepolicy hsizetype="Preferred" vsizetype="Maximum">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
@@ -226,14 +226,11 @@
|
||||
<item row="0" column="1" colspan="2">
|
||||
<widget class="QWidget" name="widget" native="true">
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<property name="leftMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<property name="rightMargin">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item>
|
||||
<widget class="QRadioButton" name="rSyncEverything">
|
||||
<property name="text">
|
||||
@@ -266,64 +263,6 @@
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QGridLayout" name="gridLayout_2">
|
||||
<property name="horizontalSpacing">
|
||||
<number>0</number>
|
||||
</property>
|
||||
<item row="0" column="0">
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::Minimum</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>10</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item row="0" column="1">
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<widget class="QCheckBox" name="confCheckBoxSize">
|
||||
<property name="text">
|
||||
<string>Ask for confirmation before synchroni&zing folders larger than</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QSpinBox" name="confSpinBox">
|
||||
<property name="maximum">
|
||||
<number>999999</number>
|
||||
</property>
|
||||
<property name="value">
|
||||
<number>99</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="confTraillingSizeLabel">
|
||||
<property name="text">
|
||||
<string extracomment="Trailing part of "Ask confirmation before syncing folder larger than" ">MB</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item row="1" column="1">
|
||||
<widget class="QCheckBox" name="confCheckBoxExternal">
|
||||
<property name="text">
|
||||
<string>Ask for confirmation before synchronizing e&xternal storages</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
@@ -406,70 +345,5 @@
|
||||
</layout>
|
||||
</widget>
|
||||
<resources/>
|
||||
<connections>
|
||||
<connection>
|
||||
<sender>rSyncEverything</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>confCheckBoxSize</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>217</x>
|
||||
<y>78</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>298</x>
|
||||
<y>126</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>rSyncEverything</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>confSpinBox</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>311</x>
|
||||
<y>83</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>952</x>
|
||||
<y>134</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>rSyncEverything</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>confTraillingSizeLabel</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>277</x>
|
||||
<y>76</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>1076</x>
|
||||
<y>136</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
<connection>
|
||||
<sender>rSyncEverything</sender>
|
||||
<signal>toggled(bool)</signal>
|
||||
<receiver>confCheckBoxExternal</receiver>
|
||||
<slot>setEnabled(bool)</slot>
|
||||
<hints>
|
||||
<hint type="sourcelabel">
|
||||
<x>181</x>
|
||||
<y>78</y>
|
||||
</hint>
|
||||
<hint type="destinationlabel">
|
||||
<x>382</x>
|
||||
<y>174</y>
|
||||
</hint>
|
||||
</hints>
|
||||
</connection>
|
||||
</connections>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>506</width>
|
||||
<height>515</height>
|
||||
<width>602</width>
|
||||
<height>193</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="sizePolicy">
|
||||
@@ -80,7 +80,7 @@
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>Ser&ver Address</string>
|
||||
<string>Server &Address</string>
|
||||
</property>
|
||||
<property name="buddy">
|
||||
<cstring>leUrl</cstring>
|
||||
@@ -166,13 +166,10 @@
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeType">
|
||||
<enum>QSizePolicy::MinimumExpanding</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>200</height>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
|
||||
@@ -86,6 +86,7 @@ OwncloudWizard::OwncloudWizard(QWidget *parent)
|
||||
setTitleFormat(Qt::RichText);
|
||||
setSubTitleFormat(Qt::RichText);
|
||||
setButtonText(QWizard::CustomButton1, tr("Skip folders configuration"));
|
||||
|
||||
}
|
||||
|
||||
void OwncloudWizard::setAccount(AccountPtr account)
|
||||
@@ -108,10 +109,6 @@ QStringList OwncloudWizard::selectiveSyncBlacklist() const
|
||||
return _advancedSetupPage->selectiveSyncBlacklist();
|
||||
}
|
||||
|
||||
bool OwncloudWizard::isConfirmBigFolderChecked() const
|
||||
{
|
||||
return _advancedSetupPage->isConfirmBigFolderChecked();
|
||||
}
|
||||
|
||||
QString OwncloudWizard::ocUrl() const
|
||||
{
|
||||
|
||||
@@ -59,7 +59,6 @@ public:
|
||||
QString ocUrl() const;
|
||||
QString localFolder() const;
|
||||
QStringList selectiveSyncBlacklist() const;
|
||||
bool isConfirmBigFolderChecked() const;
|
||||
|
||||
void enableFinishOnResultWidget(bool enable);
|
||||
|
||||
|
||||
@@ -67,7 +67,6 @@ static const char downloadLimitC[] = "BWLimit/downloadLimit";
|
||||
|
||||
static const char newBigFolderSizeLimitC[] = "newBigFolderSizeLimit";
|
||||
static const char useNewBigFolderSizeLimitC[] = "useNewBigFolderSizeLimit";
|
||||
static const char confirmExternalStorageC[] = "confirmExternalStorage";
|
||||
|
||||
static const char maxLogLinesC[] = "Logging/maxLogLines";
|
||||
|
||||
@@ -597,16 +596,6 @@ void ConfigFile::setNewBigFolderSizeLimit(bool isChecked, quint64 mbytes)
|
||||
setValue(useNewBigFolderSizeLimitC, isChecked);
|
||||
}
|
||||
|
||||
bool ConfigFile::confirmExternalStorage() const
|
||||
{
|
||||
return getValue(confirmExternalStorageC, QString(), true).toBool();
|
||||
}
|
||||
|
||||
void ConfigFile::setConfirmExternalStorage(bool isChecked)
|
||||
{
|
||||
setValue(confirmExternalStorageC, isChecked);
|
||||
}
|
||||
|
||||
bool ConfigFile::promptDeleteFiles() const
|
||||
{
|
||||
QSettings settings(configFile(), QSettings::IniFormat);
|
||||
|
||||
@@ -105,8 +105,6 @@ public:
|
||||
/** [checked, size in MB] **/
|
||||
QPair<bool, quint64> newBigFolderSizeLimit() const;
|
||||
void setNewBigFolderSizeLimit(bool isChecked, quint64 mbytes);
|
||||
bool confirmExternalStorage() const;
|
||||
void setConfirmExternalStorage(bool);
|
||||
|
||||
static bool setConfDir(const QString &value);
|
||||
|
||||
|
||||
@@ -20,9 +20,6 @@
|
||||
#include <QUrl>
|
||||
#include "account.h"
|
||||
#include <QFileInfo>
|
||||
#include "theme.h"
|
||||
#include <cstring>
|
||||
|
||||
|
||||
namespace OCC {
|
||||
|
||||
@@ -84,32 +81,14 @@ int DiscoveryJob::isInSelectiveSyncBlackListCallback(void *data, const char *pat
|
||||
return static_cast<DiscoveryJob*>(data)->isInSelectiveSyncBlackList(path);
|
||||
}
|
||||
|
||||
bool DiscoveryJob::checkSelectiveSyncNewFolder(const QString& path, const char *remotePerm)
|
||||
bool DiscoveryJob::checkSelectiveSyncNewFolder(const QString& path)
|
||||
{
|
||||
|
||||
if (_syncOptions._confirmExternalStorage && std::strchr(remotePerm, 'M')) {
|
||||
// 'M' in the permission means external storage.
|
||||
|
||||
/* Note: DiscoverySingleDirectoryJob::directoryListingIteratedSlot make sure that only the
|
||||
* root of a mounted storage has 'M', all sub entries have 'm' */
|
||||
|
||||
// Only allow it if the white list contains exactly this path (not parents)
|
||||
// We want to ask confirmation for external storage even if the parents where selected
|
||||
if (_selectiveSyncWhiteList.contains(path + QLatin1Char('/'))) {
|
||||
return false;
|
||||
}
|
||||
|
||||
emit newBigFolder(path, true);
|
||||
return true;
|
||||
}
|
||||
|
||||
// If this path or the parent is in the white list, then we do not block this file
|
||||
// If this path or the parent is in the white list, then we do not block this file
|
||||
if (findPathInList(_selectiveSyncWhiteList, path)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
auto limit = _syncOptions._newBigFolderSizeLimit;
|
||||
if (limit < 0) {
|
||||
if (_newBigFolderSizeLimit < 0) {
|
||||
// no limit, everything is allowed;
|
||||
return false;
|
||||
}
|
||||
@@ -123,9 +102,10 @@ bool DiscoveryJob::checkSelectiveSyncNewFolder(const QString& path, const char *
|
||||
_vioWaitCondition.wait(&_vioMutex);
|
||||
}
|
||||
|
||||
auto limit = _newBigFolderSizeLimit;
|
||||
if (result >= limit) {
|
||||
// we tell the UI there is a new folder
|
||||
emit newBigFolder(path, false);
|
||||
emit newBigFolder(path);
|
||||
return true;
|
||||
} else {
|
||||
// it is not too big, put it in the white list (so we will not do more query for the children)
|
||||
@@ -139,9 +119,9 @@ bool DiscoveryJob::checkSelectiveSyncNewFolder(const QString& path, const char *
|
||||
}
|
||||
}
|
||||
|
||||
int DiscoveryJob::checkSelectiveSyncNewFolderCallback(void *data, const char *path, const char *remotePerm)
|
||||
int DiscoveryJob::checkSelectiveSyncNewFolderCallback(void *data, const char *path)
|
||||
{
|
||||
return static_cast<DiscoveryJob*>(data)->checkSelectiveSyncNewFolder(QString::fromUtf8(path), remotePerm);
|
||||
return static_cast<DiscoveryJob*>(data)->checkSelectiveSyncNewFolder(QString::fromUtf8(path));
|
||||
}
|
||||
|
||||
|
||||
@@ -341,9 +321,7 @@ void DiscoverySingleDirectoryJob::directoryListingIteratedSlot(QString file, con
|
||||
// The first entry is for the folder itself, we should process it differently.
|
||||
_ignoredFirst = true;
|
||||
if (map.contains("permissions")) {
|
||||
auto perm = map.value("permissions");
|
||||
emit firstDirectoryPermissions(perm);
|
||||
_isExternalStorage = perm.contains(QLatin1Char('M'));
|
||||
emit firstDirectoryPermissions(map.value("permissions"));
|
||||
}
|
||||
if (map.contains("data-fingerprint")) {
|
||||
_dataFingerprint = map.value("data-fingerprint").toUtf8();
|
||||
@@ -366,13 +344,6 @@ void DiscoverySingleDirectoryJob::directoryListingIteratedSlot(QString file, con
|
||||
if (!file_stat->etag || strlen(file_stat->etag) == 0) {
|
||||
qDebug() << "WARNING: etag of" << file_stat->name << "is" << file_stat->etag << " This must not happen.";
|
||||
}
|
||||
if (_isExternalStorage) {
|
||||
/* All the entries in a external storage have 'M' in their permission. However, for all
|
||||
purposes in the desktop client, we only need to know about the mount points.
|
||||
So replace the 'M' by a 'm' for every sub entries in an external storage */
|
||||
std::replace(std::begin(file_stat->remotePerm), std::end(file_stat->remotePerm),
|
||||
'M', 'm');
|
||||
}
|
||||
|
||||
QStringRef fileRef(&file);
|
||||
int slashPos = file.lastIndexOf(QLatin1Char('/'));
|
||||
|
||||
@@ -34,15 +34,6 @@ class Account;
|
||||
* if the files are new, or changed.
|
||||
*/
|
||||
|
||||
struct SyncOptions {
|
||||
/** Maximum size (in Bytes) a folder can have without asking for confirmation.
|
||||
* -1 means infinite */
|
||||
qint64 _newBigFolderSizeLimit = -1;
|
||||
/** If a confirmation should be asked for external storages */
|
||||
bool _confirmExternalStorage = false;
|
||||
};
|
||||
|
||||
|
||||
/**
|
||||
* @brief The FileStatPointer class
|
||||
* @ingroup libsync
|
||||
@@ -116,8 +107,6 @@ private:
|
||||
bool _ignoredFirst;
|
||||
// Set to true if this is the root path and we need to check the data-fingerprint
|
||||
bool _isRootPath;
|
||||
// If this directory is an external storage (The first item has 'M' in its permission)
|
||||
bool _isExternalStorage = false;
|
||||
QPointer<LsColJob> _lsColJob;
|
||||
|
||||
public:
|
||||
@@ -187,8 +176,8 @@ class DiscoveryJob : public QObject {
|
||||
*/
|
||||
bool isInSelectiveSyncBlackList(const char* path) const;
|
||||
static int isInSelectiveSyncBlackListCallback(void *, const char *);
|
||||
bool checkSelectiveSyncNewFolder(const QString &path, const char *remotePerm);
|
||||
static int checkSelectiveSyncNewFolderCallback(void* data, const char* path, const char* remotePerm);
|
||||
bool checkSelectiveSyncNewFolder(const QString &path);
|
||||
static int checkSelectiveSyncNewFolderCallback(void*, const char*);
|
||||
|
||||
// Just for progress
|
||||
static void update_job_update_callback (bool local,
|
||||
@@ -208,7 +197,7 @@ class DiscoveryJob : public QObject {
|
||||
|
||||
public:
|
||||
explicit DiscoveryJob(CSYNC *ctx, QObject* parent = 0)
|
||||
: QObject(parent), _csync_ctx(ctx) {
|
||||
: QObject(parent), _csync_ctx(ctx), _newBigFolderSizeLimit(-1) {
|
||||
// We need to forward the log property as csync uses thread local
|
||||
// and updates run in another thread
|
||||
_log_callback = csync_get_log_callback();
|
||||
@@ -218,7 +207,7 @@ public:
|
||||
|
||||
QStringList _selectiveSyncBlackList;
|
||||
QStringList _selectiveSyncWhiteList;
|
||||
SyncOptions _syncOptions;
|
||||
qint64 _newBigFolderSizeLimit;
|
||||
Q_INVOKABLE void start();
|
||||
signals:
|
||||
void finished(int result);
|
||||
@@ -229,7 +218,7 @@ signals:
|
||||
void doGetSizeSignal(const QString &path, qint64 *result);
|
||||
|
||||
// A new folder was discovered and was not synced because of the confirmation feature
|
||||
void newBigFolder(const QString &folder, bool isExternal);
|
||||
void newBigFolder(const QString &folder);
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -300,8 +300,7 @@ private:
|
||||
|
||||
// Map chunk number with its size from the PROPFIND on resume.
|
||||
// (Only used from slotPropfindIterate/slotPropfindFinished because the LsColJob use signals to report data.)
|
||||
struct ServerChunkInfo { quint64 size; QString originalName; };
|
||||
QMap<int, ServerChunkInfo> _serverChunks;
|
||||
QMap<int, quint64> _serverChunks;
|
||||
|
||||
quint64 chunkSize() const { return propagator()->chunkSize(); }
|
||||
/**
|
||||
|
||||
@@ -41,8 +41,7 @@ QUrl PropagateUploadFileNG::chunkUrl(int chunk)
|
||||
+ propagator()->account()->davUser()
|
||||
+ QLatin1Char('/') + QString::number(_transferId);
|
||||
if (chunk >= 0) {
|
||||
// We need to do add leading 0 because the server orders the chunk alphabetically
|
||||
path += QLatin1Char('/') + QString::number(chunk).rightJustified(8, '0');
|
||||
path += QLatin1Char('/') + QString::number(chunk);
|
||||
}
|
||||
return Utility::concatUrlPath(propagator()->account()->url(), path);
|
||||
}
|
||||
@@ -109,11 +108,9 @@ void PropagateUploadFileNG::slotPropfindIterate(const QString &name, const QMap<
|
||||
return; // skip the info about the path itself
|
||||
}
|
||||
bool ok = false;
|
||||
QString chunkName = name.mid(name.lastIndexOf('/')+1);
|
||||
auto chunkId = chunkName.toUInt(&ok);
|
||||
auto chunkId = name.mid(name.lastIndexOf('/')+1).toUInt(&ok);
|
||||
if (ok) {
|
||||
ServerChunkInfo chunkinfo = { properties["getcontentlength"].toULongLong(), chunkName };
|
||||
_serverChunks[chunkId] = chunkinfo;
|
||||
_serverChunks[chunkId] = properties["getcontentlength"].toULongLong();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -126,7 +123,7 @@ void PropagateUploadFileNG::slotPropfindFinished()
|
||||
_currentChunk = 0;
|
||||
_sent = 0;
|
||||
while (_serverChunks.contains(_currentChunk)) {
|
||||
_sent += _serverChunks[_currentChunk].size;
|
||||
_sent += _serverChunks[_currentChunk];
|
||||
_serverChunks.remove(_currentChunk);
|
||||
++_currentChunk;
|
||||
}
|
||||
@@ -144,7 +141,7 @@ void PropagateUploadFileNG::slotPropfindFinished()
|
||||
qDebug() << "Resuming "<< _item->_file << " from chunk " << _currentChunk << "; sent ="<< _sent;
|
||||
|
||||
if (!_serverChunks.isEmpty()) {
|
||||
qDebug() << "To Delete" << _serverChunks.keys();
|
||||
qDebug() << "To Delete" << _serverChunks;
|
||||
propagator()->_activeJobList.append(this);
|
||||
_removeJobError = false;
|
||||
|
||||
@@ -152,7 +149,7 @@ void PropagateUploadFileNG::slotPropfindFinished()
|
||||
// we should remove the later chunks. Otherwise when we do dynamic chunk sizing, we may end up
|
||||
// with corruptions if there are too many chunks, or if we abort and there are still stale chunks.
|
||||
for (auto it = _serverChunks.begin(); it != _serverChunks.end(); ++it) {
|
||||
auto job = new DeleteJob(propagator()->account(), Utility::concatUrlPath(chunkUrl(), it->originalName), this);
|
||||
auto job = new DeleteJob(propagator()->account(), Utility::concatUrlPath(chunkUrl(), QString::number(it.key())), this);
|
||||
QObject::connect(job, SIGNAL(finishedSignal()), this, SLOT(slotDeleteJobFinished()));
|
||||
_jobs.append(job);
|
||||
job->start();
|
||||
|
||||
@@ -71,6 +71,7 @@ SyncEngine::SyncEngine(AccountPtr account, const QString& localPath,
|
||||
, _backInTimeFiles(0)
|
||||
, _uploadLimit(0)
|
||||
, _downloadLimit(0)
|
||||
, _newBigFolderSizeLimit(-1)
|
||||
, _checksum_hook(journal)
|
||||
, _anotherSyncNeeded(NoFollowUpSync)
|
||||
{
|
||||
@@ -829,14 +830,14 @@ void SyncEngine::startSync()
|
||||
return;
|
||||
}
|
||||
|
||||
discoveryJob->_syncOptions = _syncOptions;
|
||||
discoveryJob->_newBigFolderSizeLimit = _newBigFolderSizeLimit;
|
||||
discoveryJob->moveToThread(&_thread);
|
||||
connect(discoveryJob, SIGNAL(finished(int)), this, SLOT(slotDiscoveryJobFinished(int)));
|
||||
connect(discoveryJob, SIGNAL(folderDiscovered(bool,QString)),
|
||||
this, SIGNAL(folderDiscovered(bool,QString)));
|
||||
|
||||
connect(discoveryJob, SIGNAL(newBigFolder(QString,bool)),
|
||||
this, SIGNAL(newBigFolder(QString,bool)));
|
||||
connect(discoveryJob, SIGNAL(newBigFolder(QString)),
|
||||
this, SIGNAL(newBigFolder(QString)));
|
||||
|
||||
|
||||
// This is used for the DiscoveryJob to be able to request the main thread/
|
||||
|
||||
@@ -78,7 +78,10 @@ public:
|
||||
|
||||
bool isSyncRunning() const { return _syncRunning; }
|
||||
|
||||
void setSyncOptions(const SyncOptions &options) { _syncOptions = options; }
|
||||
/* Set the maximum size a folder can have without asking for confirmation
|
||||
* -1 means infinite
|
||||
*/
|
||||
void setNewBigFolderSizeLimit(qint64 limit) { _newBigFolderSizeLimit = limit; }
|
||||
bool ignoreHiddenFiles() const { return _csync_ctx->ignore_hidden_files; }
|
||||
void setIgnoreHiddenFiles(bool ignore) { _csync_ctx->ignore_hidden_files = ignore; }
|
||||
|
||||
@@ -143,7 +146,7 @@ signals:
|
||||
void aboutToRestoreBackup(bool *restore);
|
||||
|
||||
// A new folder was discovered and was not synced because of the confirmation feature
|
||||
void newBigFolder(const QString &folder, bool isExternal);
|
||||
void newBigFolder(const QString &folder);
|
||||
|
||||
/** Emitted when propagation has problems with a locked file.
|
||||
*
|
||||
@@ -254,7 +257,8 @@ private:
|
||||
|
||||
int _uploadLimit;
|
||||
int _downloadLimit;
|
||||
SyncOptions _syncOptions;
|
||||
/* maximum size a folder can have without asking for confirmation: -1 means infinite */
|
||||
qint64 _newBigFolderSizeLimit;
|
||||
|
||||
// hash containing the permissions on the remote directory
|
||||
QHash<QString, QByteArray> _remotePerms;
|
||||
|
||||
+1
-12
@@ -275,15 +275,6 @@ qint64 Theme::newBigFolderSizeLimit() const
|
||||
return 500;
|
||||
}
|
||||
|
||||
bool Theme::wizardHideExternalStorageConfirmationCheckbox() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
bool Theme::wizardHideFolderSizeLimitCheckbox() const
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
QString Theme::gitSHA1() const
|
||||
{
|
||||
@@ -421,7 +412,7 @@ QPixmap Theme::wizardHeaderBanner() const
|
||||
if (!c.isValid())
|
||||
return QPixmap();
|
||||
|
||||
QPixmap pix(QSize(750, 78));
|
||||
QPixmap pix(QSize(600, 78));
|
||||
pix.fill(wizardHeaderBackgroundColor());
|
||||
return pix;
|
||||
}
|
||||
@@ -487,6 +478,4 @@ QString Theme::quotaBaseFolder() const
|
||||
{
|
||||
return QLatin1String("/");
|
||||
}
|
||||
|
||||
|
||||
} // end namespace client
|
||||
|
||||
@@ -219,17 +219,6 @@ public:
|
||||
**/
|
||||
virtual qint64 newBigFolderSizeLimit() const;
|
||||
|
||||
/**
|
||||
* Hide the checkbox that says "Ask for confirmation before synchronizing folders larger than X MB"
|
||||
* in the account wizard
|
||||
*/
|
||||
virtual bool wizardHideFolderSizeLimitCheckbox() const;
|
||||
/**
|
||||
* Hide the checkbox that says "Ask for confirmation before synchronizing external storages"
|
||||
* in the account wizard
|
||||
*/
|
||||
virtual bool wizardHideExternalStorageConfirmationCheckbox() const;
|
||||
|
||||
/**
|
||||
* Alternative path on the server that provides access to the webdav capabilities
|
||||
*
|
||||
@@ -313,7 +302,6 @@ public:
|
||||
*/
|
||||
virtual QString quotaBaseFolder() const;
|
||||
|
||||
|
||||
protected:
|
||||
#ifndef TOKEN_AUTH_ONLY
|
||||
QIcon themeIcon(const QString& name, bool sysTray = false, bool sysTrayMenuVisible = false) const;
|
||||
|
||||
@@ -589,10 +589,9 @@ public:
|
||||
char payload = '*';
|
||||
|
||||
do {
|
||||
QString chunkName = QString::number(count).rightJustified(8, '0');
|
||||
if (!sourceFolder->children.contains(chunkName))
|
||||
if (!sourceFolder->children.contains(QString::number(count)))
|
||||
break;
|
||||
auto &x = sourceFolder->children[chunkName];
|
||||
auto &x = sourceFolder->children[QString::number(count)];
|
||||
Q_ASSERT(!x.isDir);
|
||||
Q_ASSERT(x.size > 0); // There should not be empty chunks
|
||||
size += x.size;
|
||||
|
||||
@@ -3038,17 +3038,17 @@ Es ist nicht ratsam, diese zu benutzen.</translation>
|
||||
<message>
|
||||
<location filename="../src/libsync/syncengine.cpp" line="444"/>
|
||||
<source>File names ending with a period are not supported on this file system.</source>
|
||||
<translation>Dateinamen enden mit einem Periode, die in diesem Dateisystem nicht unterstützt wird.</translation>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsync/syncengine.cpp" line="454"/>
|
||||
<source>File names containing the character '%1' are not supported on this file system.</source>
|
||||
<translation>Dateinamen beinhalten das Zeichen '%1' und diese werden in diesem Dateisystems nicht unterstützt.</translation>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsync/syncengine.cpp" line="457"/>
|
||||
<source>The file name is a reserved name on this file system.</source>
|
||||
<translation>Der Dateiname ist ein reservierter Name in diesem Dateisystem.</translation>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsync/syncengine.cpp" line="462"/>
|
||||
|
||||
@@ -3045,17 +3045,17 @@ We adviseren deze site niet te gebruiken.</translation>
|
||||
<message>
|
||||
<location filename="../src/libsync/syncengine.cpp" line="444"/>
|
||||
<source>File names ending with a period are not supported on this file system.</source>
|
||||
<translation>Bestandsnamen die eindigen met een punt worden niet ondersteund door het bestandssysteem.</translation>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsync/syncengine.cpp" line="454"/>
|
||||
<source>File names containing the character '%1' are not supported on this file system.</source>
|
||||
<translation>Bestandsnamen met een '%1' symbool worden niet ondersteund door het bestandssysteem.</translation>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsync/syncengine.cpp" line="457"/>
|
||||
<source>The file name is a reserved name on this file system.</source>
|
||||
<translation>De bestandsnaam is een gereserveerde naam op dit bestandssysteem.</translation>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsync/syncengine.cpp" line="462"/>
|
||||
|
||||
@@ -1234,7 +1234,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an
|
||||
<message>
|
||||
<location filename="../src/gui/creds/httpcredentialsgui.cpp" line="35"/>
|
||||
<source>Please enter %1 password:<br><br>User: %2<br>Account: %3<br></source>
|
||||
<translation>Por favor, insira a palavra-passe %1:<br><br>Utilizador: %2<br>Conta: %3<br></translation>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/gui/creds/httpcredentialsgui.cpp" line="48"/>
|
||||
@@ -1249,7 +1249,7 @@ Continuing the sync as normal will cause all your files to be overwritten by an
|
||||
<message>
|
||||
<location filename="../src/gui/creds/httpcredentialsgui.cpp" line="78"/>
|
||||
<source><a href="%1">Click here</a> to request an app password from the web interface.</source>
|
||||
<translation><a href="%1">Clique aqui</a> para solicitar uma palavra-passe da aplicação a partir da interface da Web.</translation>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
</context>
|
||||
<context>
|
||||
@@ -1964,7 +1964,7 @@ Não é aconselhada a sua utilização.</translation>
|
||||
<message>
|
||||
<location filename="../src/libsync/propagatedownload.cpp" line="379"/>
|
||||
<source>The download would reduce free disk space below %1</source>
|
||||
<translation>A transferência poderá reduzir o espaço livre em disco para menos de %1</translation>
|
||||
<translation>A transferência poderá reduzir o espaço livre em disco para abaixo de %1</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsync/propagatedownload.cpp" line="384"/>
|
||||
@@ -3796,7 +3796,7 @@ Não é aconselhada a sua utilização.</translation>
|
||||
<message>
|
||||
<location filename="../src/libsync/progressdispatcher.cpp" line="70"/>
|
||||
<source>uploading</source>
|
||||
<translation>a enviar</translation>
|
||||
<translation>A enviar</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsync/progressdispatcher.cpp" line="72"/>
|
||||
|
||||
@@ -3039,17 +3039,17 @@ It is not advisable to use it.</source>
|
||||
<message>
|
||||
<location filename="../src/libsync/syncengine.cpp" line="444"/>
|
||||
<source>File names ending with a period are not supported on this file system.</source>
|
||||
<translation>Os nomes de arquivos que terminam com um ponto não são suportados neste sistema de arquivos.</translation>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsync/syncengine.cpp" line="454"/>
|
||||
<source>File names containing the character '%1' are not supported on this file system.</source>
|
||||
<translation>Os nomes de arquivos que contêm o caractere '%1' não são suportados neste sistema de arquivos.</translation>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsync/syncengine.cpp" line="457"/>
|
||||
<source>The file name is a reserved name on this file system.</source>
|
||||
<translation>O nome do arquivo é um nome reservado neste sistema de arquivos.</translation>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsync/syncengine.cpp" line="462"/>
|
||||
|
||||
@@ -3037,17 +3037,17 @@ It is not advisable to use it.</source>
|
||||
<message>
|
||||
<location filename="../src/libsync/syncengine.cpp" line="444"/>
|
||||
<source>File names ending with a period are not supported on this file system.</source>
|
||||
<translation>Эта файловая система не поддерживает имена файлов, оканчивающиеся на точку.</translation>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsync/syncengine.cpp" line="454"/>
|
||||
<source>File names containing the character '%1' are not supported on this file system.</source>
|
||||
<translation>Эта файловая система не поддерживает имена файлов, содержащие символ '%1'.</translation>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsync/syncengine.cpp" line="457"/>
|
||||
<source>The file name is a reserved name on this file system.</source>
|
||||
<translation>Данное имя файла зарезервировано в данной файловой системе.</translation>
|
||||
<translation type="unfinished"/>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../src/libsync/syncengine.cpp" line="462"/>
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário