mirror of
https://github.com/nextcloud/desktop.git
synced 2024-11-27 17:37:36 +03:00
Some minor cleanups.
This commit is contained in:
parent
1aaa9db34e
commit
4b212f905f
3 changed files with 11 additions and 11 deletions
|
@ -50,7 +50,7 @@ csync_vio_handle_t *csync_vio_opendir(CSYNC *ctx, const char *name) {
|
||||||
break;
|
break;
|
||||||
case LOCAL_REPLICA:
|
case LOCAL_REPLICA:
|
||||||
if( ctx->callbacks.update_callback ) {
|
if( ctx->callbacks.update_callback ) {
|
||||||
ctx->callbacks.update_callback(ctx->replica, name, ctx->callbacks.update_callback_userdata);
|
ctx->callbacks.update_callback(ctx->replica, name, ctx->callbacks.update_callback_userdata);
|
||||||
}
|
}
|
||||||
return csync_vio_local_opendir(name);
|
return csync_vio_local_opendir(name);
|
||||||
break;
|
break;
|
||||||
|
|
|
@ -66,12 +66,12 @@ void DiscoveryJob::update_job_update_callback (bool local,
|
||||||
DiscoveryJob *updateJob = static_cast<DiscoveryJob*>(userdata);
|
DiscoveryJob *updateJob = static_cast<DiscoveryJob*>(userdata);
|
||||||
if (updateJob) {
|
if (updateJob) {
|
||||||
// Don't wanna overload the UI
|
// Don't wanna overload the UI
|
||||||
if (!updateJob->lastUpdateProgressCallbackCall.isValid()) {
|
if (!updateJob->_lastUpdateProgressCallbackCall.isValid()) {
|
||||||
updateJob->lastUpdateProgressCallbackCall.restart(); // first call
|
updateJob->_lastUpdateProgressCallbackCall.restart(); // first call
|
||||||
} else if (updateJob->lastUpdateProgressCallbackCall.elapsed() < 200) {
|
} else if (updateJob->_lastUpdateProgressCallbackCall.elapsed() < 200) {
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
updateJob->lastUpdateProgressCallbackCall.restart();
|
updateJob->_lastUpdateProgressCallbackCall.restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
QString path(QUrl::fromPercentEncoding(QByteArray(dirUrl)).section('/', -1));
|
QString path(QUrl::fromPercentEncoding(QByteArray(dirUrl)).section('/', -1));
|
||||||
|
@ -472,7 +472,7 @@ void DiscoveryJob::start() {
|
||||||
csync_set_log_callback(_log_callback);
|
csync_set_log_callback(_log_callback);
|
||||||
csync_set_log_level(_log_level);
|
csync_set_log_level(_log_level);
|
||||||
csync_set_log_userdata(_log_userdata);
|
csync_set_log_userdata(_log_userdata);
|
||||||
lastUpdateProgressCallbackCall.invalidate();
|
_lastUpdateProgressCallbackCall.invalidate();
|
||||||
int ret = csync_update(_csync_ctx);
|
int ret = csync_update(_csync_ctx);
|
||||||
|
|
||||||
_csync_ctx->checkSelectiveSyncBlackListHook = 0;
|
_csync_ctx->checkSelectiveSyncBlackListHook = 0;
|
||||||
|
|
|
@ -117,11 +117,11 @@ public:
|
||||||
class DiscoveryJob : public QObject {
|
class DiscoveryJob : public QObject {
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
friend class DiscoveryMainThread;
|
friend class DiscoveryMainThread;
|
||||||
CSYNC *_csync_ctx;
|
CSYNC *_csync_ctx;
|
||||||
csync_log_callback _log_callback;
|
csync_log_callback _log_callback;
|
||||||
int _log_level;
|
int _log_level;
|
||||||
void* _log_userdata;
|
void* _log_userdata;
|
||||||
QElapsedTimer lastUpdateProgressCallbackCall;
|
QElapsedTimer _lastUpdateProgressCallbackCall;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* return true if the given path should be synced,
|
* return true if the given path should be synced,
|
||||||
|
|
Loading…
Reference in a new issue