mirror of
https://github.com/nextcloud/desktop.git
synced 2024-10-25 05:45:42 +03:00
Provide better error messages in owncloud for csync bugs.
This commit is contained in:
parent
8e637bd8c7
commit
903c8ca220
5 changed files with 39 additions and 9 deletions
|
@ -480,16 +480,16 @@ void Application::computeOverallSyncStatus()
|
|||
}
|
||||
}
|
||||
|
||||
QIcon statusIcon = _theme->syncStateIcon( overallResult.status(), 22 );
|
||||
|
||||
// QIcon statusIcon = _theme->syncStateIcon( overallResult.status(), 22 );
|
||||
// if( overallResult.status() == SyncResult::Success ) {
|
||||
if( overallResult.status() == SyncResult::Success ) {
|
||||
// Rather display the mirall icon instead of the ok icon.
|
||||
#ifdef _WIN32
|
||||
QIcon statusIcon = _theme->applicationIcon( 16 );
|
||||
statusIcon = _theme->applicationIcon( 16 );
|
||||
#else
|
||||
QIcon statusIcon = _theme->applicationIcon( 22 );
|
||||
statusIcon = _theme->applicationIcon( 22 );
|
||||
#endif
|
||||
// }
|
||||
}
|
||||
|
||||
_tray->setIcon( statusIcon );
|
||||
_tray->setToolTip(trayMessage);
|
||||
|
|
|
@ -170,7 +170,34 @@ void CSyncThread::run()
|
|||
_mutex.unlock();
|
||||
|
||||
if( csync_init(csync) < 0 ) {
|
||||
emit csyncError(tr("CSync init failed."));
|
||||
CSYNC_ERROR_CODE err = csync_errno();
|
||||
QString errStr;
|
||||
|
||||
switch( err ) {
|
||||
case CSYNC_ERR_LOCK:
|
||||
errStr = tr("CSync failed to create a lock file.");
|
||||
break;
|
||||
case CSYNC_ERR_STATEDB_LOAD:
|
||||
errStr = tr("CSync failed to load the state db.");
|
||||
break;
|
||||
case CSYNC_ERR_MODULE:
|
||||
errStr = tr("CSync failed to load the ownCloud module.");
|
||||
break;
|
||||
case CSYNC_ERR_TIMESKEW:
|
||||
errStr = tr("The system time between the local machine and the server differs "
|
||||
"too much. Please use a time syncronization service (ntp) on both machines.");
|
||||
break;
|
||||
case CSYNC_ERR_FILESYSTEM:
|
||||
errStr = tr("CSync could not detect the filesystem type.");
|
||||
break;
|
||||
case CSYNC_ERR_TREE:
|
||||
errStr = tr("CSync got an error while processing internal trees.");
|
||||
break;
|
||||
default:
|
||||
errStr = tr("An internal error number %1 happend.").arg( (int) err );
|
||||
}
|
||||
qDebug() << " #### ERROR String emitted: " << errStr;
|
||||
emit csyncError(errStr);
|
||||
goto cleanup;
|
||||
}
|
||||
|
||||
|
|
|
@ -246,7 +246,6 @@ void FolderMan::slotScheduleSync( const QString& alias )
|
|||
qDebug() << "Schedule folder " << alias << " to sync!";
|
||||
if( _currentSyncFolder == alias ) {
|
||||
// the current folder is currently syncing.
|
||||
qDebug() << "OOOOOOOOOOOOOOOOOOOOOOO Folder is currently syncing";
|
||||
}
|
||||
|
||||
if( _scheduleQueue.contains( alias ) ) {
|
||||
|
|
|
@ -189,7 +189,11 @@ void ownCloudFolder::slotCSyncError(const QString& err)
|
|||
void ownCloudFolder::slotCSyncTerminated()
|
||||
{
|
||||
// do not ask csync here for reasons.
|
||||
emit syncFinished( SyncResult(SyncResult::Error));
|
||||
SyncResult res( SyncResult::Error );
|
||||
_errors.append( tr("The CSync thread terminated unexpectedly.") );
|
||||
res.setErrorStrings(_errors);
|
||||
|
||||
emit syncFinished( res );
|
||||
}
|
||||
|
||||
void ownCloudFolder::slotCSyncFinished()
|
||||
|
|
|
@ -78,7 +78,7 @@ QString Theme::statusHeaderText( SyncResult::Status status ) const
|
|||
} else if( status == SyncResult::Success ) {
|
||||
resultStr = tr("Sync Success");
|
||||
} else if( status == SyncResult::Error ) {
|
||||
resultStr = tr("Sync Error");
|
||||
resultStr = tr("Sync Error - Click info button for details.");
|
||||
} else if( status == SyncResult::Disabled ) {
|
||||
resultStr = tr("Sync Disabled");
|
||||
} else if( status == SyncResult::SetupError ) {
|
||||
|
|
Loading…
Reference in a new issue