More cleanups that were possible by the new notify api.

This commit is contained in:
Klaas Freitag 2012-12-06 18:38:06 +01:00
parent fbae2d7330
commit a124dcd4e8
3 changed files with 0 additions and 92 deletions

View file

@ -29,42 +29,6 @@ class QProcess;
namespace Mirall {
enum walkErrorTypes {
WALK_ERROR_NONE = 0,
WALK_ERROR_WALK,
WALK_ERROR_INSTRUCTIONS,
WALK_ERROR_DIR_PERMS
};
struct walkStats_s {
walkStats_s();
int errorType;
ulong eval;
ulong removed;
ulong renamed;
ulong newFiles;
ulong conflicts;
ulong ignores;
ulong sync;
ulong error;
ulong dirPermErrors;
ulong seenFiles;
};
typedef walkStats_s WalkStats;
struct syncFileItem_s {
QString file;
csync_instructions_e instruction;
};
typedef syncFileItem_s SyncFileItem;
typedef QVector<SyncFileItem> SyncFileItemVector;
class CSyncThread : public QObject
{
Q_OBJECT
@ -87,8 +51,6 @@ signals:
void started();
private:
void emitStateDb( CSYNC *csync );
static int getauth(const char *prompt,
char *buf,
size_t len,

View file

@ -133,8 +133,6 @@ void ownCloudFolder::startSync(const QStringList &pathList)
connect(_csync, SIGNAL(finished()), SLOT(slotCSyncFinished()), Qt::QueuedConnection);
connect(_csync, SIGNAL(csyncError(const QString)), SLOT(slotCSyncError(const QString)), Qt::QueuedConnection);
qRegisterMetaType<SyncFileItemVector>("SyncFileItemVector");
qRegisterMetaType<WalkStats>("WalkStats");
_thread->start();
QMetaObject::invokeMethod(_csync, "startSync", Qt::QueuedConnection);
@ -252,56 +250,5 @@ void ownCloudFolder::wipe()
_wipeDb = false;
}
// TOOD: not called anywhere
SyncFileStatus ownCloudFolder::fileStatus( const QString& file )
{
if( file.isEmpty() ) return STATUS_NONE;
QFileInfo fi( path(), file );
foreach( const SyncFileItem item, _items ) {
qDebug() << "FileStatus compare: " << item.file << " <> " << fi.absoluteFilePath();
if( item.file == fi.absoluteFilePath() ) {
switch( item.instruction ) {
case CSYNC_INSTRUCTION_NONE:
return STATUS_NONE;
break;
case CSYNC_INSTRUCTION_EVAL:
return STATUS_EVAL;
break;
case CSYNC_INSTRUCTION_RENAME:
return STATUS_RENAME;
break;
case CSYNC_INSTRUCTION_NEW:
return STATUS_NEW;
break;
case CSYNC_INSTRUCTION_CONFLICT:
return STATUS_CONFLICT;
break;
case CSYNC_INSTRUCTION_IGNORE:
return STATUS_IGNORE;
break;
case CSYNC_INSTRUCTION_SYNC:
case CSYNC_INSTRUCTION_UPDATED:
return STATUS_SYNC;
break;
case CSYNC_INSTRUCTION_STAT_ERROR:
return STATUS_STAT_ERROR;
break;
case CSYNC_INSTRUCTION_ERROR:
return STATUS_ERROR;
break;
case CSYNC_INSTRUCTION_DELETED:
case CSYNC_INSTRUCTION_REMOVE:
return STATUS_REMOVE;
break;
default:
break;
}
}
}
return STATUS_NEW;
}
} // ns

View file

@ -77,7 +77,6 @@ private:
QStringList _errors;
bool _csyncError;
bool _wipeDb;
QVector<SyncFileItem> _items;
};
}