mirror of
https://github.com/nextcloud/desktop.git
synced 2025-10-26 11:17:43 +00:00
Merge remote-tracking branch '1.3' into master
This commit is contained in:
commit
4553fa1d09
@ -1,6 +1,6 @@
|
||||
set( VERSION_MAJOR 1 )
|
||||
set( VERSION_MINOR 3 )
|
||||
set( VERSION_PATCH 0 )
|
||||
set( VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SUFFIX}beta3)
|
||||
set( VERSION ${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}${VERSION_SUFFIX}beta4)
|
||||
set( SOVERSION 0 )
|
||||
|
||||
|
||||
@ -58,6 +58,8 @@ CSyncThread::~CSyncThread()
|
||||
|
||||
}
|
||||
|
||||
//Convert an error code from csync to a user readable string.
|
||||
// Keep that function thread safe as it can be called from the sync thread or the main thread
|
||||
QString CSyncThread::csyncErrorToString( CSYNC_ERROR_CODE err, const char *errString )
|
||||
{
|
||||
QString errStr;
|
||||
@ -248,8 +250,8 @@ int CSyncThread::treewalkError(TREE_WALK_FILE* file)
|
||||
return 0;
|
||||
|
||||
if( file &&
|
||||
file->instruction == CSYNC_INSTRUCTION_STAT_ERROR ||
|
||||
file->instruction == CSYNC_INSTRUCTION_ERROR ) {
|
||||
(file->instruction == CSYNC_INSTRUCTION_STAT_ERROR ||
|
||||
file->instruction == CSYNC_INSTRUCTION_ERROR) ) {
|
||||
_mutex.lock();
|
||||
_syncedItems[indx]._instruction = file->instruction;
|
||||
_mutex.unlock();
|
||||
|
||||
@ -38,7 +38,7 @@ public:
|
||||
CSyncThread(CSYNC *);
|
||||
~CSyncThread();
|
||||
|
||||
QString csyncErrorToString( CSYNC_ERROR_CODE, const char * );
|
||||
static QString csyncErrorToString( CSYNC_ERROR_CODE, const char * );
|
||||
|
||||
Q_INVOKABLE void startSync();
|
||||
|
||||
|
||||
@ -98,7 +98,9 @@ ownCloudFolder::ownCloudFolder(const QString &alias,
|
||||
csync_set_auth_callback( _csync_ctx, getauth );
|
||||
|
||||
if( csync_init( _csync_ctx ) < 0 ) {
|
||||
qDebug() << "Could not initialize csync!";
|
||||
qDebug() << "Could not initialize csync!" << csync_get_error(_csync_ctx) << csync_get_error_string(_csync_ctx);
|
||||
slotCSyncError(CSyncThread::csyncErrorToString(csync_get_error(_csync_ctx), csync_get_error_string(_csync_ctx)));
|
||||
csync_destroy(_csync_ctx);
|
||||
_csync_ctx = 0;
|
||||
}
|
||||
setProxy();
|
||||
@ -259,6 +261,13 @@ void ownCloudFolder::startSync()
|
||||
|
||||
void ownCloudFolder::startSync(const QStringList &pathList)
|
||||
{
|
||||
if (!_csync_ctx) {
|
||||
qDebug() << Q_FUNC_INFO << "_csync_ctx is empty. probably because csync_init has failed.";
|
||||
// the error should already be set
|
||||
QMetaObject::invokeMethod(this, "slotCSyncFinished", Qt::QueuedConnection);
|
||||
return;
|
||||
}
|
||||
|
||||
if (_thread && _thread->isRunning()) {
|
||||
qCritical() << "* ERROR csync is still running and new sync requested.";
|
||||
return;
|
||||
|
||||
@ -483,7 +483,10 @@ bool ownCloudInfo::certsUntrusted()
|
||||
|
||||
void ownCloudInfo::slotError( QNetworkReply::NetworkError err)
|
||||
{
|
||||
qDebug() << "ownCloudInfo Network Error: " << err;
|
||||
QNetworkReply *reply = qobject_cast<QNetworkReply*>(sender());
|
||||
|
||||
qDebug() << "ownCloudInfo Network Error"
|
||||
<< err << ":" << reply->errorString();
|
||||
|
||||
switch (err) {
|
||||
case QNetworkReply::ProxyConnectionRefusedError:
|
||||
|
||||
Loading…
Reference in New Issue
Block a user