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;
|
||||
case LOCAL_REPLICA:
|
||||
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);
|
||||
break;
|
||||
|
|
|
@ -66,12 +66,12 @@ void DiscoveryJob::update_job_update_callback (bool local,
|
|||
DiscoveryJob *updateJob = static_cast<DiscoveryJob*>(userdata);
|
||||
if (updateJob) {
|
||||
// Don't wanna overload the UI
|
||||
if (!updateJob->lastUpdateProgressCallbackCall.isValid()) {
|
||||
updateJob->lastUpdateProgressCallbackCall.restart(); // first call
|
||||
} else if (updateJob->lastUpdateProgressCallbackCall.elapsed() < 200) {
|
||||
if (!updateJob->_lastUpdateProgressCallbackCall.isValid()) {
|
||||
updateJob->_lastUpdateProgressCallbackCall.restart(); // first call
|
||||
} else if (updateJob->_lastUpdateProgressCallbackCall.elapsed() < 200) {
|
||||
return;
|
||||
} else {
|
||||
updateJob->lastUpdateProgressCallbackCall.restart();
|
||||
updateJob->_lastUpdateProgressCallbackCall.restart();
|
||||
}
|
||||
|
||||
QString path(QUrl::fromPercentEncoding(QByteArray(dirUrl)).section('/', -1));
|
||||
|
@ -472,7 +472,7 @@ void DiscoveryJob::start() {
|
|||
csync_set_log_callback(_log_callback);
|
||||
csync_set_log_level(_log_level);
|
||||
csync_set_log_userdata(_log_userdata);
|
||||
lastUpdateProgressCallbackCall.invalidate();
|
||||
_lastUpdateProgressCallbackCall.invalidate();
|
||||
int ret = csync_update(_csync_ctx);
|
||||
|
||||
_csync_ctx->checkSelectiveSyncBlackListHook = 0;
|
||||
|
|
|
@ -117,11 +117,11 @@ public:
|
|||
class DiscoveryJob : public QObject {
|
||||
Q_OBJECT
|
||||
friend class DiscoveryMainThread;
|
||||
CSYNC *_csync_ctx;
|
||||
csync_log_callback _log_callback;
|
||||
int _log_level;
|
||||
void* _log_userdata;
|
||||
QElapsedTimer lastUpdateProgressCallbackCall;
|
||||
CSYNC *_csync_ctx;
|
||||
csync_log_callback _log_callback;
|
||||
int _log_level;
|
||||
void* _log_userdata;
|
||||
QElapsedTimer _lastUpdateProgressCallbackCall;
|
||||
|
||||
/**
|
||||
* return true if the given path should be synced,
|
||||
|
|
Loading…
Reference in a new issue