Remvoe now unneeded SyncRunFileLog::instructionToStr
authorHannah von Reth <hannah.vonreth@owncloud.com>
Thu, 23 Apr 2020 08:25:03 +0000 (10:25 +0200)
committerKevin Ottens <kevin.ottens@nextcloud.com>
Tue, 15 Dec 2020 09:59:11 +0000 (10:59 +0100)
src/gui/syncrunfilelog.cpp
src/gui/syncrunfilelog.h

index 2d17153e2879fb095e42b661fbb02dd3e69a997f..7a0d383a174c6e5deb0cfabf34336c633be8ad15 100644 (file)
@@ -39,56 +39,6 @@ QString SyncRunFileLog::directionToStr(SyncFileItem::Direction dir)
     return re;
 }
 
-QString SyncRunFileLog::instructionToStr(SyncInstructions inst)
-{
-    QString re;
-
-    switch (inst) {
-    case CSYNC_INSTRUCTION_NONE:
-        re = "INST_NONE";
-        break;
-    case CSYNC_INSTRUCTION_EVAL:
-        re = "INST_EVAL";
-        break;
-    case CSYNC_INSTRUCTION_REMOVE:
-        re = "INST_REMOVE";
-        break;
-    case CSYNC_INSTRUCTION_RENAME:
-        re = "INST_RENAME";
-        break;
-    case CSYNC_INSTRUCTION_EVAL_RENAME:
-        re = "INST_EVAL_RENAME";
-        break;
-    case CSYNC_INSTRUCTION_NEW:
-        re = "INST_NEW";
-        break;
-    case CSYNC_INSTRUCTION_CONFLICT:
-        re = "INST_CONFLICT";
-        break;
-    case CSYNC_INSTRUCTION_IGNORE:
-        re = "INST_IGNORE";
-        break;
-    case CSYNC_INSTRUCTION_SYNC:
-        re = "INST_SYNC";
-        break;
-    case CSYNC_INSTRUCTION_STAT_ERROR:
-        re = "INST_STAT_ERR";
-        break;
-    case CSYNC_INSTRUCTION_ERROR:
-        re = "INST_ERROR";
-        break;
-    case CSYNC_INSTRUCTION_TYPE_CHANGE:
-        re = "INST_TYPE_CHANGE";
-        break;
-    case CSYNC_INSTRUCTION_UPDATE_METADATA:
-        re = "INST_METADATA";
-        break;
-    }
-
-    return re;
-}
-
-
 void SyncRunFileLog::start(const QString &folderPath)
 {
     const qint64 logfileMaxSize = 10 * 1024 * 1024; // 10MiB
@@ -179,7 +129,7 @@ void SyncRunFileLog::logItem(const SyncFileItem &item)
     } else {
         _out << item._file << QLatin1String(" -> ") << item._renameTarget << L;
     }
-    _out << instructionToStr(item._instruction) << L;
+    _out << item._instruction << L;
     _out << directionToStr(item._direction) << L;
     _out << QString::number(item._modtime) << L;
     _out << item._etag << L;
index 9d325763ced4fdd8ce331a9156c69cb5fab594c1..ac618a01113fb3eb6ff32d5a568f9288478a31b5 100644 (file)
@@ -43,7 +43,6 @@ public:
 protected:
 private:
     QString dateTimeStr(const QDateTime &dt);
-    QString instructionToStr(SyncInstructions inst);
     QString directionToStr(SyncFileItem::Direction dir);
 
     QScopedPointer<QFile> _file;