void Folder::slotRunEtagJob()
{
- qDebug() << "* Trying to check" << alias() << "for changes via ETag check. (time since last sync:" << (_timeSinceLastSyncDone.elapsed() / 1000) << "s)";
+ qDebug() << "* Trying to check" << remoteUrl().toString() << "for changes via ETag check. (time since last sync:" << (_timeSinceLastSyncDone.elapsed() / 1000) << "s)";
Q_ASSERT(_accountState );
AccountPtr account = _accountState->account();
if (!_requestEtagJob.isNull()) {
- qDebug() << Q_FUNC_INFO << alias() << "has ETag job queued, not trying to sync";
+ qDebug() << Q_FUNC_INFO << remoteUrl().toString() << "has ETag job queued, not trying to sync";
return;
}
if (_definition.paused || !_accountState->isConnected()) {
- qDebug() << "Not syncing. :" << alias() << _definition.paused << AccountState::stateString(_accountState->state());
+ qDebug() << "Not syncing. :" << remoteUrl().toString() << _definition.paused << AccountState::stateString(_accountState->state());
return;
}
void Folder::etagRetreived(const QString& etag)
{
- qDebug() << "* Compare etag with previous etag: last:" << _lastEtag << ", received:" << etag;
+ //qDebug() << "* Compare etag with previous etag: last:" << _lastEtag << ", received:" << etag;
// re-enable sync if it was disabled because network was down
FolderMan::instance()->setSyncEnabled(true);
if (_lastEtag != etag) {
+ qDebug() << "* Compare etag with previous etag: last:" << _lastEtag << ", received:" << etag << "-> CHANGED";
_lastEtag = etag;
emit scheduleToSync(this);
}
_syncResult.setSyncFileItemVector(SyncFileItemVector());
emit syncStateChange();
- qDebug() << "*** Start syncing " << alias() << " - client version"
+ qDebug() << "*** Start syncing " << remoteUrl().toString() << " - client version"
<< qPrintable(Theme::instance()->version());
if (! setIgnoredFiles())
void FolderMan::slotRunOneEtagJob()
{
if (_currentEtagJob.isNull()) {
- QString alias;
+ Folder *folder;
foreach(Folder *f, _folderMap) {
if (f->etagJob()) {
// Caveat: always grabs the first folder with a job, but we think this is Ok for now and avoids us having a seperate queue.
_currentEtagJob = f->etagJob();
- alias = f->alias();
+ folder = f;
break;
}
}
restartApplication();
}
} else {
- qDebug() << "Scheduling" << alias << "to check remote ETag";
+ qDebug() << "Scheduling" << folder->remoteUrl().toString() << "to check remote ETag";
_currentEtagJob->start(); // on destroy/end it will continue the queue via slotEtagJobDestroyed
}
}
void FolderMan::slotStartScheduledFolderSync()
{
if( _currentSyncFolder ) {
- qDebug() << "Currently folder " << _currentSyncFolder->alias() << " is running, wait for finish!";
+ qDebug() << "Currently folder " << _currentSyncFolder->remoteUrl().toString() << " is running, wait for finish!";
return;
}
void FolderMan::slotFolderSyncStarted( )
{
- qDebug() << ">===================================== sync started for " << _currentSyncFolder->alias();
+ qDebug() << ">===================================== sync started for " << _currentSyncFolder->remoteUrl().toString();
}
/*
*/
void FolderMan::slotFolderSyncFinished( const SyncResult& )
{
- qDebug() << "<===================================== sync finished for " << _currentSyncFolder->alias();
+ qDebug() << "<===================================== sync finished for " << _currentSyncFolder->remoteUrl().toString();
_lastSyncFolder = _currentSyncFolder;
_currentSyncFolder = 0;
auto result = folder->syncResult();
- qDebug() << "Sync state changed for folder " << folder->alias() << ": " << result.statusString();
+ qDebug() << "Sync state changed for folder " << folder->remoteUrl().toString() << ": " << result.statusString();
if (result.status() == SyncResult::Success || result.status() == SyncResult::Error) {
Logger::instance()->enterNextLogFile();
void AbstractNetworkJob::setTimeout(qint64 msec)
{
- qDebug() << Q_FUNC_INFO << msec;
+ //qDebug() << Q_FUNC_INFO << msec;
_timer.start(msec);
}
const QUrl url = account()->url();
const QString displayUrl = QString( "%1://%2%3").arg(url.scheme()).arg(url.host()).arg(url.path());
- qDebug() << "!!!" << metaObject()->className() << "created for" << displayUrl << "+" << path();
+ QString parentMetaObjectName = parent() ? parent()->metaObject()->className() : "";
+ qDebug() << "!!!" << metaObject()->className() << "created for" << displayUrl << "+" << path() << parentMetaObjectName;
}
void AbstractNetworkJob::slotTimeout()