| 1 | /* ---------------------------------- calcDiffThread.cpp --------------------------------------------------------------------------- |
| 2 | Class to calculate the differences between source & snapshot in a seperate thread |
| 3 | |
| 4 | =============================================================================================================================== |
| 5 | =============================================================================================================================== |
| 6 | This file is part of "luckyBackup" project |
| 7 | Copyright 2008-2012, Loukas Avgeriou |
| 8 | luckyBackup is distributed under the terms of the GNU General Public License |
| 9 | luckyBackup is free software: you can redistribute it and/or modify |
| 10 | it under the terms of the GNU General Public License as published by |
| 11 | the Free Software Foundation, either version 3 of the License, or |
| 12 | (at your option) any later version. |
| 13 | |
| 14 | luckyBackup is distributed in the hope that it will be useful, |
| 15 | but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 16 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 17 | GNU General Public License for more details. |
| 18 | |
| 19 | You should have received a copy of the GNU General Public License |
| 20 | along with luckyBackup. If not, see <http://www.gnu.org/licenses/>. |
| 21 | |
| 22 | |
| 23 | project version : Please see "main.cpp" for project version |
| 24 | |
| 25 | developer : luckyb |
| 26 | last modified : 22 May 2016 |
| 27 | =============================================================================================================================== |
| 28 | =============================================================================================================================== |
| 29 | */ |
| 30 | |
| 31 | |
| 32 | #include "calcDiffThread.h"cxx . . $ `<file>/src/calcDiffThread.h`/ |
| 33 | |
| 34 | #include <QStack> |
| 35 | #include <QTextStream> |
| 36 | |
| 37 | #include "global.h"cxx . . $ `<file>/src/global.h`/ |
| 38 | #include "operationClass.h"cxx . . $ `<file>/src/operationClass.h`/ |
| 39 | |
| 40 | // class CalcDiffThread Constructor================================================================================================= |
| 41 | CalcDiffThreadcxx . . $ CalcDiffThread#::CalcDiffThreadcxx . . $ CalcDiffThread#CalcDiffThread(749de1b6ae65bddd).(QObjectcxx . . $ QObject# *parent) : QThreadcxx . . $ QThread#QThread(749de1b6ae65bddd).(parent) |
| 42 | { |
| 43 | //initialize variables |
| 44 | returnStringcxx . . $ CalcDiffThread#returnString. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 45 | dirToReadStringcxx . . $ CalcDiffThread#dirToReadString. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 46 | destcxx . . $ CalcDiffThread#dest. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 47 | CurrentSnapshotDirectorycxx . . $ CalcDiffThread#CurrentSnapshotDirectory. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 48 | CurrentSnapshotStringcxx . . $ CalcDiffThread#CurrentSnapshotString. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 49 | sourceLastcxx . . $ CalcDiffThread#sourceLast. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 50 | sourcecxx . . $ CalcDiffThread#source. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 51 | CurrentSnapshotNocxx . . $ CalcDiffThread#CurrentSnapshotNo. = 0; |
| 52 | currentSnapscxx . . $ CalcDiffThread#currentSnaps. = 0; |
| 53 | syncTYPEcxx . . $ CalcDiffThread#syncTYPE. = false; |
| 54 | abortNOWcxx . . $ CalcDiffThread#abortNOW. = false; |
| 55 | } |
| 56 | |
| 57 | // class CalcDiffThread Destructor================================================================================================= |
| 58 | CalcDiffThreadcxx . . $ CalcDiffThread#::~cxx . . $ CalcDiffThread#`~CalcDiffThread`(ced63f7c635d850d).CalcDiffThreadcxx . . $ CalcDiffThread# () |
| 59 | { |
| 60 | waitcxx . . $ QThread#wait(534bc65d63671d2b).(); |
| 61 | } |
| 62 | |
| 63 | // run the QThread================================================================================================= |
| 64 | void CalcDiffThreadcxx . . $ CalcDiffThread#::runcxx . . $ CalcDiffThread#run(49f6e7a06ebc5aa8). () |
| 65 | { |
| 66 | returnStringcxx . . $ CalcDiffThread#returnString. =cxx . . $ QString#`operator=`(d02845eef0c33901). ""; |
| 67 | emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! updateViewercxx . . $ CalcDiffThread#updateViewer(abbfd46f3b7726de).(trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Scanning destination") +cxx . . $ operator+(3d22f08efddf8107). "\n\n..." +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Please wait"), false); |
| 68 | QFileInfoListcxx . . $ QFileInfoList# returnDirContents = readRecursivecxx . . $ CalcDiffThread#readRecursive(cfcb11828a38d486).(dirToReadStringcxx . . $ QString#QString(132dd6869045752b).); //this is the destination as a Qfileinfo list |
| 69 | |
| 70 | int countDirEntries=0, countReturnEntries=0; |
| 71 | |
| 72 | // Remove the "luckybackup snapshots root" directory from the returnDirContents list |
| 73 | countReturnEntries = 0; |
| 74 | while ( (countReturnEntries < returnDirContents.sizecxx . . $ QList#size(ea6fe5115c70a13f).()) && (!syncTYPEcxx . . $ CalcDiffThread#syncTYPE.) ) |
| 75 | { |
| 76 | QFileInfocxx . . $ QFileInfo# localFileInfo = returnDirContentscxx . . $ QFileInfo#QFileInfo(208c3155c9413262)..atcxx . . $ QList#at(e2681f9bb6b2f357).(countReturnEntries); |
| 77 | if ( (localFileInfo.filePathcxx . . $ QFileInfo#filePath(6ef7b6c27b00b43d).()+cxx . . $ operator+(fab9b4f80031f353).SLASHcxx . . $ Global/SLASH.).containscxx . . $ QString#contains(8cce4688c16f48f3).((destcxx . . $ CalcDiffThread#dest. +cxx . . $ operator+(fab9b4f80031f353). snapDefaultDircxx . . $ Global/snapDefaultDir.)) ) |
| 78 | returnDirContents.removeAtcxx . . $ QList#removeAt(d4f767463ce0a6b3).(countReturnEntries); |
| 79 | else |
| 80 | countReturnEntries++; |
| 81 | |
| 82 | if (abortNOWcxx . . $ CalcDiffThread#abortNOW.) |
| 83 | return; |
| 84 | } |
| 85 | |
| 86 | |
| 87 | // Remove files/dirs listed at changes.file from the QFileInfo list (destination) |
| 88 | QStringListcxx . . $ QStringList# removedFilescxx . . $ QStringList#QStringList(ced63f7c635d850d).; |
| 89 | removedFiles.clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).(); |
| 90 | countcxx . . $ CalcDiffThread#count. = CurrentSnapshotNocxx . . $ CalcDiffThread#CurrentSnapshotNo.+1; |
| 91 | while ( (countcxx . . $ CalcDiffThread#count. < currentSnapscxx . . $ CalcDiffThread#currentSnaps.) && (!syncTYPEcxx . . $ CalcDiffThread#syncTYPE.) ) |
| 92 | { |
| 93 | snapchangesfilenamecxx . . $ Global/snapchangesfilename. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). snapChangesDircxx . . $ Global/snapChangesDir. +cxx . . $ operator+(fab9b4f80031f353). profileNamecxx . . $ Global/profileName. +cxx . . $ operator+(3d22f08efddf8107). "-" +cxx . . $ operator+(fab9b4f80031f353). Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetNamecxx . . $ operation#GetName(6ef7b6c27b00b43d).() +cxx . . $ operator+(3d22f08efddf8107). "-" +cxx . . $ operator+(fab9b4f80031f353). |
| 94 | (Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSnapshotsListItemcxx . . $ operation#GetSnapshotsListItem(3f3c3d0e9c0eb37f).(countcxx . . $ CalcDiffThread#count.)) +cxx . . $ operator+(3d22f08efddf8107). ".changes.log"; |
| 95 | snapfilecxx . . $ Global/snapfile..setFileNamecxx . . $ QFile#setFileName(3520e46b33348bf6).(snapchangesfilenamecxx . . $ Global/snapchangesfilename.); |
| 96 | snapfilecxx . . $ Global/snapfile..opencxx . . $ QFile#open(dca164408be960c8).(QIODevicecxx . . $ QIODevice#::ReadOnlycxx . . $ QIODevice#ReadOnly. |cxx . . $ `operator|`(c9e45f682471e48d). QIODevicecxx . . $ QIODevice#::Textcxx . . $ QIODevice#Text.); |
| 97 | QTextStreamcxx . . $ QTextStream# incxx . . $ QTextStream#QTextStream(bebe8f2dee7f9e86).(&snapfilecxx . . $ Global/snapfile.); |
| 98 | while (!in.atEndcxx . . $ QTextStream#atEnd(50ce9a9e25b4a850).()) |
| 99 | removedFiles.appendcxx . . $ QList#append(77d9f17553126ecb).(in.readLinecxx . . $ QTextStream#readLine(20e0a2766677f583).()); |
| 100 | |
| 101 | snapfilecxx . . $ Global/snapfile..closecxx . . $ QFileDevice#close(49f6e7a06ebc5aa8).(); |
| 102 | |
| 103 | countcxx . . $ CalcDiffThread#count.++; |
| 104 | } |
| 105 | countReturnEntries = 0; |
| 106 | |
| 107 | while ( (countReturnEntries < returnDirContents.sizecxx . . $ QList#size(ea6fe5115c70a13f).()) && (!syncTYPEcxx . . $ CalcDiffThread#syncTYPE.) ) |
| 108 | { |
| 109 | QFileInfocxx . . $ QFileInfo# localFileInfo = returnDirContentscxx . . $ QFileInfo#QFileInfo(208c3155c9413262)..atcxx . . $ QList#at(e2681f9bb6b2f357).(countReturnEntries); |
| 110 | QStringcxx . . $ QString# destFile = localFileInfo.filePathcxx . . $ QFileInfo#filePath(6ef7b6c27b00b43d).(); |
| 111 | destFile.removecxx . . $ QString#remove(d7c3fdecc68f03c6).(destcxx . . $ CalcDiffThread#dest., Qtcxx . . $ Qt/::CaseSensitivecxx . . $ Qt/CaseSensitive.); |
| 112 | |
| 113 | countDirEntries = 0; |
| 114 | bool removed = false; |
| 115 | while (countDirEntries < removedFiles.sizecxx . . $ QList#size(ea6fe5115c70a13f).()) |
| 116 | { |
| 117 | if ( (destFile ==cxx . . $ `operator==`(5bc2975d2d751687). removedFiles.atcxx . . $ QList#at(e2681f9bb6b2f357).(countDirEntries)) || ((destFile+cxx . . $ operator+(fab9b4f80031f353).SLASHcxx . . $ Global/SLASH.) ==cxx . . $ `operator==`(5bc2975d2d751687). removedFiles.atcxx . . $ QList#at(e2681f9bb6b2f357).(countDirEntries)) ) |
| 118 | { |
| 119 | removed = true; |
| 120 | returnDirContents.removeAtcxx . . $ QList#removeAt(d4f767463ce0a6b3).(countReturnEntries); |
| 121 | } |
| 122 | countDirEntries++; |
| 123 | } |
| 124 | if (removed) |
| 125 | removed = false; |
| 126 | else |
| 127 | countReturnEntries++; |
| 128 | } |
| 129 | |
| 130 | // Replace destination directory data with snapshot data - NOT in sync mode |
| 131 | // Do this for every snapshot from the current to the last one going back |
| 132 | countcxx . . $ CalcDiffThread#count. = currentSnapscxx . . $ CalcDiffThread#currentSnaps.-2; |
| 133 | while ( (countcxx . . $ CalcDiffThread#count. >= CurrentSnapshotNocxx . . $ CalcDiffThread#CurrentSnapshotNo.) && (!syncTYPEcxx . . $ CalcDiffThread#syncTYPE.) ) |
| 134 | { |
| 135 | QStringcxx . . $ QString# SnapshotDirectoryStringToRead = Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSnapshotsListItemcxx . . $ operation#GetSnapshotsListItem(3f3c3d0e9c0eb37f). (countcxx . . $ CalcDiffThread#count.); |
| 136 | QStringcxx . . $ QString# SnapshotDirectoryToRead = destcxx . . $ CalcDiffThread#dest. +cxx . . $ operator+(fab9b4f80031f353). snapDefaultDircxx . . $ Global/snapDefaultDir. +cxx . . $ operator+(fab9b4f80031f353). SnapshotDirectoryStringToRead +cxx . . $ operator+(fab9b4f80031f353). SLASHcxx . . $ Global/SLASH. +cxx . . $ operator+(fab9b4f80031f353). sourceLastcxx . . $ CalcDiffThread#sourceLast.; |
| 137 | |
| 138 | QDircxx . . $ QDir# currentsnapdircxx . . $ QDir#QDir(3520e46b33348bf6).(SnapshotDirectoryToRead); |
| 139 | if ( (currentsnapdir.existscxx . . $ QDir#exists(50ce9a9e25b4a850).()) && (!syncTYPEcxx . . $ CalcDiffThread#syncTYPE.) ) |
| 140 | { |
| 141 | emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! updateViewercxx . . $ CalcDiffThread#updateViewer(abbfd46f3b7726de).(trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Scanning snapshot") +cxx . . $ operator+(3d22f08efddf8107). " " +cxx . . $ operator+(fab9b4f80031f353). SnapshotDirectoryStringToRead +cxx . . $ operator+(3d22f08efddf8107). "\n\n..." +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Please wait"), false); |
| 142 | QFileInfoListcxx . . $ QFileInfoList# currentsnapdirContents = readRecursivecxx . . $ CalcDiffThread#readRecursive(cfcb11828a38d486).(SnapshotDirectoryToReadcxx . . $ QString#QString(132dd6869045752b).); // this is the snapshots directory currently read as a QFileInfo list |
| 143 | countDirEntries = 0; |
| 144 | |
| 145 | while (countDirEntries < currentsnapdirContents.sizecxx . . $ QList#size(ea6fe5115c70a13f).()) |
| 146 | { |
| 147 | //strip off beginning of snapshot file path |
| 148 | QFileInfocxx . . $ QFileInfo# snapFileInfo = currentsnapdirContentscxx . . $ QFileInfo#QFileInfo(208c3155c9413262)..atcxx . . $ QList#at(e2681f9bb6b2f357).(countDirEntries); |
| 149 | QStringcxx . . $ QString# snapFile = snapFileInfo.filePathcxx . . $ QFileInfo#filePath(6ef7b6c27b00b43d).(); |
| 150 | snapFile.removecxx . . $ QString#remove(d7c3fdecc68f03c6).(SnapshotDirectoryToRead, Qtcxx . . $ Qt/::CaseSensitivecxx . . $ Qt/CaseSensitive.); |
| 151 | |
| 152 | countReturnEntries = 0; |
| 153 | bool replaced = false; |
| 154 | while (countReturnEntries < returnDirContents.sizecxx . . $ QList#size(ea6fe5115c70a13f).()) |
| 155 | { |
| 156 | QFileInfocxx . . $ QFileInfo# localFileInfo = returnDirContentscxx . . $ QFileInfo#QFileInfo(208c3155c9413262)..atcxx . . $ QList#at(e2681f9bb6b2f357).(countReturnEntries); |
| 157 | QStringcxx . . $ QString# destFile = localFileInfo.filePathcxx . . $ QFileInfo#filePath(6ef7b6c27b00b43d).(); |
| 158 | for (int count3=CurrentSnapshotNocxx . . $ CalcDiffThread#CurrentSnapshotNo.; count3 < currentSnapscxx . . $ CalcDiffThread#currentSnaps.-1; count3++) // if the destFile belongs to a "later" snapFile |
| 159 | { |
| 160 | QStringcxx . . $ QString# IlostTrack = Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSnapshotsListItemcxx . . $ operation#GetSnapshotsListItem(3f3c3d0e9c0eb37f). (count3); |
| 161 | if (destFile.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).(destcxx . . $ CalcDiffThread#dest. +cxx . . $ operator+(fab9b4f80031f353). snapDefaultDircxx . . $ Global/snapDefaultDir. +cxx . . $ operator+(fab9b4f80031f353). IlostTrack) ) |
| 162 | destFile.removecxx . . $ QString#remove(d7c3fdecc68f03c6).(destcxx . . $ CalcDiffThread#dest. +cxx . . $ operator+(fab9b4f80031f353). snapDefaultDircxx . . $ Global/snapDefaultDir. +cxx . . $ operator+(fab9b4f80031f353). IlostTrack +cxx . . $ operator+(fab9b4f80031f353). SLASHcxx . . $ Global/SLASH. +cxx . . $ operator+(fab9b4f80031f353). sourceLastcxx . . $ CalcDiffThread#sourceLast., Qtcxx . . $ Qt/::CaseSensitivecxx . . $ Qt/CaseSensitive.); |
| 163 | } |
| 164 | destFile.removecxx . . $ QString#remove(d7c3fdecc68f03c6).(destcxx . . $ CalcDiffThread#dest., Qtcxx . . $ Qt/::CaseSensitivecxx . . $ Qt/CaseSensitive.); |
| 165 | |
| 166 | if (snapFile ==cxx . . $ `operator==`(5bc2975d2d751687). destFile) |
| 167 | { |
| 168 | returnDirContents.removeAtcxx . . $ QList#removeAt(d4f767463ce0a6b3).(countReturnEntries); |
| 169 | returnDirContents.insertcxx . . $ QList#insert(20dcc09d4a3213bb).(countReturnEntries,snapFileInfo); |
| 170 | replaced = true; |
| 171 | } |
| 172 | countReturnEntries++; |
| 173 | } |
| 174 | if ( (!replaced) && (!removedFiles.containscxx . . $ QStringList#contains(8cce4688c16f48f3).(snapFile,Qtcxx . . $ Qt/::CaseSensitivecxx . . $ Qt/CaseSensitive. )) ) |
| 175 | returnDirContents.appendcxx . . $ QList#append(77d9f17553126ecb).(snapFileInfo); |
| 176 | |
| 177 | countDirEntries++; |
| 178 | |
| 179 | if (abortNOWcxx . . $ CalcDiffThread#abortNOW.) |
| 180 | return; |
| 181 | } |
| 182 | } |
| 183 | countcxx . . $ CalcDiffThread#count.--; |
| 184 | } |
| 185 | // Calculate differences between snapshot and source |
| 186 | QFileInfoListcxx . . $ QFileInfoList# changedFilescxx . . $ QList#QList(ced63f7c635d850d)., existingSourcecxx . . $ QList#QList(ced63f7c635d850d)., existingSnapcxx . . $ QList#QList(ced63f7c635d850d).; |
| 187 | changedFiles.clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).(); existingSource.clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).(); existingSnap.clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).(); |
| 188 | QStringcxx . . $ QString# changedfiles=""cxx . . $ QString#QString(85c52e162fed56f9)., existingsource = ""cxx . . $ QString#QString(85c52e162fed56f9)., existingsnap = ""cxx . . $ QString#QString(85c52e162fed56f9).; |
| 189 | QListcxx . . $ QList#<bool> snapMatchesSourcecxx . . $ QList#QList(ced63f7c635d850d).; |
| 190 | snapMatchesSource.clearcxx . . $ QList#clear(49f6e7a06ebc5aa8).(); |
| 191 | |
| 192 | emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! updateViewercxx . . $ CalcDiffThread#updateViewer(abbfd46f3b7726de).(trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Scanning source") +cxx . . $ operator+(3d22f08efddf8107). "\n\n..." +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Please wait"), false); |
| 193 | QFileInfoListcxx . . $ QFileInfoList# sourceDirAsList = readRecursivecxx . . $ CalcDiffThread#readRecursive(cfcb11828a38d486).(sourcecxx . . $ QString#QString(132dd6869045752b).); // This is source as a QFileInfo list |
| 194 | |
| 195 | QStringcxx . . $ QString# calcInfoText = trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Calculating differences") +cxx . . $ operator+(3d22f08efddf8107). "\n\n..." +cxx . . $ operator+(fab9b4f80031f353). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Please wait") +cxx . . $ operator+(3d22f08efddf8107). "\n\n"; |
| 196 | QStringcxx . . $ QString# sourceDirAsListSize = countStrcxx . . $ QString#QString(132dd6869045752b)..setNumcxx . . $ QString#setNum(6483560ce2afa901).(sourceDirAsList.sizecxx . . $ QList#size(ea6fe5115c70a13f).()); |
| 197 | |
| 198 | countDirEntries = 0; |
| 199 | while (countDirEntries < sourceDirAsList.sizecxx . . $ QList#size(ea6fe5115c70a13f).()) |
| 200 | { |
| 201 | bool foundMatchSourceToSnap = false; // If a file with some filename exists at the source and the snapshot |
| 202 | // strip off beginning of source file path |
| 203 | QFileInfocxx . . $ QFileInfo# sourceFileInfo = sourceDirAsListcxx . . $ QFileInfo#QFileInfo(208c3155c9413262)..atcxx . . $ QList#at(e2681f9bb6b2f357).(countDirEntries); |
| 204 | QStringcxx . . $ QString# sourceFile = sourceFileInfo.filePathcxx . . $ QFileInfo#filePath(6ef7b6c27b00b43d).(); |
| 205 | if (sourceFile.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).(sourcecxx . . $ CalcDiffThread#source.)) |
| 206 | sourceFile.removecxx . . $ QString#remove(d7c3fdecc68f03c6).(sourcecxx . . $ CalcDiffThread#source., Qtcxx . . $ Qt/::CaseSensitivecxx . . $ Qt/CaseSensitive.); |
| 207 | |
| 208 | emitcxx . . $ `<external>/1208926524888476972/qobjectdefs.h:97:10`! updateViewercxx . . $ CalcDiffThread#updateViewer(abbfd46f3b7726de).(calcInfoText +cxx . . $ operator+(fab9b4f80031f353). countStrcxx . . $ Global/countStr..setNumcxx . . $ QString#setNum(6483560ce2afa901).(countDirEntries) +cxx . . $ operator+(3d22f08efddf8107). " / " +cxx . . $ operator+(fab9b4f80031f353). sourceDirAsListSize, false); // Give the user sth to watch counting |
| 209 | if (abortNOWcxx . . $ CalcDiffThread#abortNOW.) |
| 210 | return; |
| 211 | |
| 212 | // compare with every file in snapshot |
| 213 | countReturnEntries = 0; |
| 214 | while (countReturnEntries < returnDirContents.sizecxx . . $ QList#size(ea6fe5115c70a13f).()) |
| 215 | { |
| 216 | if (countDirEntries == 0) |
| 217 | snapMatchesSource.appendcxx . . $ QList#append(77d9f17553126ecb).(false); // build a <bool> list |
| 218 | |
| 219 | //strip off beginning of snapshot file path |
| 220 | QFileInfocxx . . $ QFileInfo# snapFileInfo = returnDirContentscxx . . $ QFileInfo#QFileInfo(208c3155c9413262)..atcxx . . $ QList#at(e2681f9bb6b2f357).(countReturnEntries); |
| 221 | QStringcxx . . $ QString# snapFile = snapFileInfo.filePathcxx . . $ QFileInfo#filePath(6ef7b6c27b00b43d).(); |
| 222 | // ********************* TO EDIT *************************************************************************************** |
| 223 | for (countcxx . . $ CalcDiffThread#count.=currentSnapscxx . . $ CalcDiffThread#currentSnaps.-2; countcxx . . $ CalcDiffThread#count. >= CurrentSnapshotNocxx . . $ CalcDiffThread#CurrentSnapshotNo.; countcxx . . $ CalcDiffThread#count.--) |
| 224 | { |
| 225 | QStringcxx . . $ QString# SnapshotDirectoryStringToRead = Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSnapshotsListItemcxx . . $ operation#GetSnapshotsListItem(3f3c3d0e9c0eb37f). (countcxx . . $ CalcDiffThread#count.); |
| 226 | if (snapFile.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).(destcxx . . $ CalcDiffThread#dest. +cxx . . $ operator+(fab9b4f80031f353). snapDefaultDircxx . . $ Global/snapDefaultDir. +cxx . . $ operator+(fab9b4f80031f353). SnapshotDirectoryStringToRead) ) |
| 227 | snapFile.removecxx . . $ QString#remove(d7c3fdecc68f03c6).(destcxx . . $ CalcDiffThread#dest. +cxx . . $ operator+(fab9b4f80031f353). snapDefaultDircxx . . $ Global/snapDefaultDir. +cxx . . $ operator+(fab9b4f80031f353). SnapshotDirectoryStringToRead +cxx . . $ operator+(fab9b4f80031f353). SLASHcxx . . $ Global/SLASH. +cxx . . $ operator+(fab9b4f80031f353). sourceLastcxx . . $ CalcDiffThread#sourceLast., Qtcxx . . $ Qt/::CaseSensitivecxx . . $ Qt/CaseSensitive.); |
| 228 | //if (snapFile.startsWith(dest + snapDefaultDir + CurrentSnapshotString) ) |
| 229 | // snapFile.remove(dest + snapDefaultDir + CurrentSnapshotString + SLASH + sourceLast, Qt::CaseSensitive); |
| 230 | } |
| 231 | // ********************* TO EDIT *************************************************************************************** |
| 232 | |
| 233 | if (snapFile.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).(destcxx . . $ CalcDiffThread#dest.)) |
| 234 | snapFile.removecxx . . $ QString#remove(d7c3fdecc68f03c6).(destcxx . . $ CalcDiffThread#dest., Qtcxx . . $ Qt/::CaseSensitivecxx . . $ Qt/CaseSensitive.); |
| 235 | |
| 236 | // 1. Data that have changed at source. |
| 237 | // The snapshot data will replace the relevant source data, at RESTORE |
| 238 | if (snapFile ==cxx . . $ `operator==`(5bc2975d2d751687). sourceFile) |
| 239 | { |
| 240 | snapMatchesSource.replacecxx . . $ QList#replace(20dcc09d4a3213bb).(countReturnEntries, true); |
| 241 | foundMatchSourceToSnap = true; |
| 242 | if ((snapFileInfo.lastModifiedcxx . . $ QFileInfo#lastModified(4e062b5c490497ac).() !=cxx . . $ QDateTime#`operator!=`(147858620bc979f5). sourceFileInfo.lastModifiedcxx . . $ QFileInfo#lastModified(4e062b5c490497ac).()) || |
| 243 | (snapFileInfo.sizecxx . . $ QFileInfo#size(98833e9ab7de59a4).() != sourceFileInfo.sizecxx . . $ QFileInfo#size(98833e9ab7de59a4).())) |
| 244 | { |
| 245 | changedFiles.appendcxx . . $ QList#append(77d9f17553126ecb).(snapFileInfo); |
| 246 | |
| 247 | // Do not add anything if it's a directory!! |
| 248 | if (snapFileInfo.isDircxx . . $ QFileInfo#isDir(50ce9a9e25b4a850).()) |
| 249 | snapFile.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(SLASHcxx . . $ Global/SLASH.); |
| 250 | else |
| 251 | if (changedfiles.sizecxx . . $ QString#size(455f465bc33b4cdf).() < 10000) |
| 252 | changedfiles.appendcxx . . $ QString#append(6a89d0b7f4d2681c).("* <b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). snapFile +cxx . . $ operator+(3d22f08efddf8107). "</b> - " +cxx . . $ operator+(fab9b4f80031f353). snapFileInfo.lastModifiedcxx . . $ QFileInfo#lastModified(4e062b5c490497ac).().toStringcxx . . $ QDateTime#toString(5555d9024dcf93fb).("yyyy MMM dd - hh:mm:ss"cxx . . $ QString#QString(85c52e162fed56f9).) +cxx . . $ operator+(3d22f08efddf8107). "<br>"); |
| 253 | |
| 254 | //else |
| 255 | // break; |
| 256 | } |
| 257 | } |
| 258 | |
| 259 | countReturnEntries++; |
| 260 | } |
| 261 | |
| 262 | // 2. Data that exist at the source but not at the snapshot |
| 263 | // These will be deleted at RESTORE if "delete existing source data that do not exist at the backup" is checked |
| 264 | if (!foundMatchSourceToSnap) |
| 265 | { |
| 266 | existingSource.appendcxx . . $ QList#append(77d9f17553126ecb).(sourceFileInfo); |
| 267 | if (sourceFileInfo.isDircxx . . $ QFileInfo#isDir(50ce9a9e25b4a850).()) |
| 268 | sourceFile.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(SLASHcxx . . $ Global/SLASH.); |
| 269 | if (existingsource.sizecxx . . $ QString#size(455f465bc33b4cdf).() < 10000) |
| 270 | existingsource.appendcxx . . $ QString#append(6a89d0b7f4d2681c).("* <b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). sourceFile +cxx . . $ operator+(3d22f08efddf8107). "</b> - " +cxx . . $ operator+(fab9b4f80031f353). sourceFileInfo.lastModifiedcxx . . $ QFileInfo#lastModified(4e062b5c490497ac).().toStringcxx . . $ QDateTime#toString(5555d9024dcf93fb).("yyyy MMM dd - hh:mm:ss"cxx . . $ QString#QString(85c52e162fed56f9).) +cxx . . $ operator+(3d22f08efddf8107). "<br>"); |
| 271 | } |
| 272 | |
| 273 | countDirEntries++; |
| 274 | } |
| 275 | |
| 276 | // 3. Data that exist at the snapshot but not at the source. |
| 277 | // These will be transferred over at RESTORE |
| 278 | countReturnEntries = 0; |
| 279 | while (countReturnEntries < snapMatchesSource.sizecxx . . $ QList#size(ea6fe5115c70a13f).()) |
| 280 | { |
| 281 | if (!snapMatchesSource.atcxx . . $ QList#at(e2681f9bb6b2f357).(countReturnEntries)) |
| 282 | { |
| 283 | QFileInfocxx . . $ QFileInfo# snapFileInfo = returnDirContentscxx . . $ QFileInfo#QFileInfo(208c3155c9413262)..atcxx . . $ QList#at(e2681f9bb6b2f357).(countReturnEntries); |
| 284 | QStringcxx . . $ QString# snapFile = snapFileInfo.filePathcxx . . $ QFileInfo#filePath(6ef7b6c27b00b43d).(); |
| 285 | // ********************* TO EDIT *************************************************************************************** |
| 286 | for (countcxx . . $ CalcDiffThread#count.=currentSnapscxx . . $ CalcDiffThread#currentSnaps.-2; countcxx . . $ CalcDiffThread#count. >= CurrentSnapshotNocxx . . $ CalcDiffThread#CurrentSnapshotNo.; countcxx . . $ CalcDiffThread#count.--) |
| 287 | { |
| 288 | QStringcxx . . $ QString# SnapshotDirectoryStringToRead = Operationcxx . . $ Global/Operation.[currentOperationcxx . . $ Global/currentOperation.] -> GetSnapshotsListItemcxx . . $ operation#GetSnapshotsListItem(3f3c3d0e9c0eb37f). (countcxx . . $ CalcDiffThread#count.); |
| 289 | if (snapFile.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).(destcxx . . $ CalcDiffThread#dest. +cxx . . $ operator+(fab9b4f80031f353). snapDefaultDircxx . . $ Global/snapDefaultDir. +cxx . . $ operator+(fab9b4f80031f353). SnapshotDirectoryStringToRead) ) |
| 290 | snapFile.removecxx . . $ QString#remove(d7c3fdecc68f03c6).(destcxx . . $ CalcDiffThread#dest. +cxx . . $ operator+(fab9b4f80031f353). snapDefaultDircxx . . $ Global/snapDefaultDir. +cxx . . $ operator+(fab9b4f80031f353). SnapshotDirectoryStringToRead +cxx . . $ operator+(fab9b4f80031f353). SLASHcxx . . $ Global/SLASH. +cxx . . $ operator+(fab9b4f80031f353). sourceLastcxx . . $ CalcDiffThread#sourceLast., Qtcxx . . $ Qt/::CaseSensitivecxx . . $ Qt/CaseSensitive.); |
| 291 | } |
| 292 | // ********************* TO EDIT *************************************************************************************** |
| 293 | |
| 294 | if (snapFile.startsWithcxx . . $ QString#startsWith(8cce4688c16f48f3).(destcxx . . $ CalcDiffThread#dest.)) |
| 295 | snapFile.removecxx . . $ QString#remove(d7c3fdecc68f03c6).(destcxx . . $ CalcDiffThread#dest., Qtcxx . . $ Qt/::CaseSensitivecxx . . $ Qt/CaseSensitive.); |
| 296 | if (snapFileInfo.isDircxx . . $ QFileInfo#isDir(50ce9a9e25b4a850).()) |
| 297 | snapFile.appendcxx . . $ QString#append(6a89d0b7f4d2681c).(SLASHcxx . . $ Global/SLASH.); |
| 298 | |
| 299 | existingSnap.appendcxx . . $ QList#append(77d9f17553126ecb).(snapFileInfo); |
| 300 | if (existingsnap.sizecxx . . $ QString#size(455f465bc33b4cdf).() < 10000) |
| 301 | existingsnap.appendcxx . . $ QString#append(6a89d0b7f4d2681c).("* <b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). snapFile +cxx . . $ operator+(3d22f08efddf8107). "</b> - " +cxx . . $ operator+(fab9b4f80031f353). snapFileInfo.lastModifiedcxx . . $ QFileInfo#lastModified(4e062b5c490497ac).().toStringcxx . . $ QDateTime#toString(5555d9024dcf93fb).("yyyy MMM dd - hh:mm:ss"cxx . . $ QString#QString(85c52e162fed56f9).) +cxx . . $ operator+(3d22f08efddf8107). "<br>"); |
| 302 | } |
| 303 | countReturnEntries++; |
| 304 | } |
| 305 | |
| 306 | // Build the text to display to user |
| 307 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(d02845eef0c33901).("<font color=red><p align=\"center\">"); |
| 308 | if (syncTYPEcxx . . $ CalcDiffThread#syncTYPE.) |
| 309 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" <b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Sync dir A & B differences") +cxx . . $ operator+(3d22f08efddf8107). "</b><br>"); |
| 310 | else |
| 311 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" <b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Snapshot and source differences") +cxx . . $ operator+(3d22f08efddf8107). "</b><br>"); |
| 312 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(d02845eef0c33901).("_______________________________________________________</p>"); |
| 313 | if (changedfiles !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") |
| 314 | { |
| 315 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(d02845eef0c33901).("</font><font color=blue><p align=\"center\">"); |
| 316 | if (syncTYPEcxx . . $ CalcDiffThread#syncTYPE.) |
| 317 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" " +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Sync dir B data that also exists at sync dir A and is different") +cxx . . $ operator+(3d22f08efddf8107). "</p>"); |
| 318 | else |
| 319 | { |
| 320 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" " +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Snapshot data that also exists at the source and is different") +cxx . . $ operator+(3d22f08efddf8107). "<br>"); |
| 321 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" " +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("The snapshot data will replace the source data during RESTORE") +cxx . . $ operator+(3d22f08efddf8107). "</p>"); |
| 322 | } |
| 323 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(changedfiles); |
| 324 | if (changedfiles.sizecxx . . $ QString#size(455f465bc33b4cdf).() > 9900) |
| 325 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" <br>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Data amount is huge. Displaying only first entries") +cxx . . $ operator+(3d22f08efddf8107). "<br>"); |
| 326 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(d02845eef0c33901).("_______________________________________________________<br>"); |
| 327 | } |
| 328 | if (existingsnap !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") |
| 329 | { |
| 330 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(d02845eef0c33901).("</font><font color=green><p align=\"center\">"); |
| 331 | if (syncTYPEcxx . . $ CalcDiffThread#syncTYPE.) |
| 332 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" " +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Sync dir B data that do NOT exist at sync dir A") +cxx . . $ operator+(3d22f08efddf8107). "</p>"); |
| 333 | else |
| 334 | { |
| 335 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" " +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Snapshot data that do NOT exist at the source") +cxx . . $ operator+(3d22f08efddf8107). "<br>"); |
| 336 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" " +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("These will be transferred over at the source during RESTORE") +cxx . . $ operator+(3d22f08efddf8107). "</p>"); |
| 337 | } |
| 338 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(existingsnap); |
| 339 | if (existingsnap.sizecxx . . $ QString#size(455f465bc33b4cdf).() > 9900) |
| 340 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" <br>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Data amount is huge. Displaying only first entries") +cxx . . $ operator+(3d22f08efddf8107). "<br>"); |
| 341 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(d02845eef0c33901).("_______________________________________________________<br>"); |
| 342 | } |
| 343 | if (existingsource !=cxx . . $ QString#`operator!=`(7d4bdb1abc417636). "") |
| 344 | { |
| 345 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(d02845eef0c33901).("</font><font color=magenta><p align=\"center\">"); |
| 346 | if (syncTYPEcxx . . $ CalcDiffThread#syncTYPE.) |
| 347 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" " +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Sync dir A data that do NOT exist at sync dir B") +cxx . . $ operator+(3d22f08efddf8107). "</p>"); |
| 348 | else |
| 349 | { |
| 350 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" " +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Source data that do NOT exist at the snapshot") +cxx . . $ operator+(3d22f08efddf8107). "<br>"); |
| 351 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" " +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("These will be deleted during RESTORE only if you enable the option:") +cxx . . $ operator+(3d22f08efddf8107). "<br>"); |
| 352 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" \"<b>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("delete existing source data that do not exist at the backup") +cxx . . $ operator+(3d22f08efddf8107). "</b>\"</p>"); |
| 353 | } |
| 354 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(existingsource); |
| 355 | if (existingsource.sizecxx . . $ QString#size(455f465bc33b4cdf).() > 9900) |
| 356 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(6a89d0b7f4d2681c).(" <br>" +cxx . . $ operator+(c75c3ae4eb9af1a8). trcxx . . $ CalcDiffThread#tr(75d9f1c324b4579d).("Data amount is huge. Displaying only first entries") +cxx . . $ operator+(3d22f08efddf8107). "<br>"); |
| 357 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(d02845eef0c33901).("_________________________________________________________________<br>"); |
| 358 | } |
| 359 | returnStringcxx . . $ CalcDiffThread#returnString..appendcxx . . $ QString#append(d02845eef0c33901).("</font>"); |
| 360 | } |
| 361 | |
| 362 | // set parametres================================================================================================= |
| 363 | void CalcDiffThreadcxx . . $ CalcDiffThread#::passParamscxx . . $ CalcDiffThread#passParams(c02e609e5be302db).(QStringcxx . . $ QString# dirtoreadstring, QStringcxx . . $ QString# desti, QStringcxx . . $ QString# currentsnapshotdirectory, QStringcxx . . $ QString# currentsnapshotstring, QStringcxx . . $ QString# sourcelast, QStringcxx . . $ QString# sourcei, int currentsnapshotno, int currentsnaps, bool synctype) |
| 364 | { |
| 365 | this -> dirToReadStringcxx . . $ CalcDiffThread#dirToReadString. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). dirtoreadstring; |
| 366 | this -> destcxx . . $ CalcDiffThread#dest. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). desti; |
| 367 | this -> CurrentSnapshotDirectorycxx . . $ CalcDiffThread#CurrentSnapshotDirectory. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). currentsnapshotdirectory; |
| 368 | this -> CurrentSnapshotStringcxx . . $ CalcDiffThread#CurrentSnapshotString. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). currentsnapshotstring; |
| 369 | this -> sourceLastcxx . . $ CalcDiffThread#sourceLast. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). sourcelast; |
| 370 | this -> sourcecxx . . $ CalcDiffThread#source. =cxx . . $ QString#`operator=`(b79fde0b0ce9b948). sourcei; |
| 371 | this -> CurrentSnapshotNocxx . . $ CalcDiffThread#CurrentSnapshotNo. = currentsnapshotno; |
| 372 | this -> currentSnapscxx . . $ CalcDiffThread#currentSnaps. = currentsnaps; |
| 373 | this -> syncTYPEcxx . . $ CalcDiffThread#syncTYPE. = synctype; |
| 374 | } |
| 375 | |
| 376 | // Return the resulting text================================================================================================= |
| 377 | QStringcxx . . $ QString# CalcDiffThreadcxx . . $ CalcDiffThread#::returnResultcxx . . $ CalcDiffThread#returnResult(4365c3963150523e).() |
| 378 | { |
| 379 | return returnStringcxx . . $ QString#QString(132dd6869045752b).; |
| 380 | } |
| 381 | |
| 382 | // Set the abortNOW =========================================================================================== |
| 383 | void CalcDiffThreadcxx . . $ CalcDiffThread#::setAbortcxx . . $ CalcDiffThread#setAbort(b45ddcbc8423892c).(bool abortset) |
| 384 | { |
| 385 | abortNOWcxx . . $ CalcDiffThread#abortNOW. = abortset; |
| 386 | } |
| 387 | |
| 388 | // // Extract a QFileInfoList from a directory's path =============================================================================================== |
| 389 | QFileInfoListcxx . . $ QFileInfoList# CalcDiffThreadcxx . . $ CalcDiffThread#::readRecursivecxx . . $ CalcDiffThread#readRecursive(cfcb11828a38d486).(QStringcxx . . $ QString# dirToReadString) |
| 390 | { |
| 391 | // QFileInfoList readRecursive(QString); |
| 392 | |
| 393 | QDircxx . . $ QDir# dirToReadcxx . . $ QDir#QDir(3520e46b33348bf6).(dirToReadString); |
| 394 | dirToRead.setFiltercxx . . $ QDir#setFilter(3cb6a626764edf13).(QDircxx . . $ QDir#::AllDirscxx . . $ QDir#AllDirs. |cxx . . $ `operator|`(153b300229e4e3d0). QDircxx . . $ QDir#::NoDotAndDotDotcxx . . $ QDir#NoDotAndDotDot. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::AllEntriescxx . . $ QDir#AllEntries. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::Hiddencxx . . $ QDir#Hidden.); |
| 395 | dirToRead.setSortingcxx . . $ QDir#setSorting(d6e6037501f8ac03).(QDircxx . . $ QDir#::Namecxx . . $ QDir#Name. |cxx . . $ `operator|`(2e9dd8934c680bb9). QDircxx . . $ QDir#::DirsFirstcxx . . $ QDir#DirsFirst. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::IgnoreCasecxx . . $ QDir#IgnoreCase. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::LocaleAwarecxx . . $ QDir#LocaleAware.); |
| 396 | |
| 397 | QFileInfoListcxx . . $ QFileInfoList# DirContentsStart = dirToRead.entryInfoListcxx . . $ QDir#entryInfoList(c85cb969d00e05df).(); |
| 398 | QFileInfoListcxx . . $ QFileInfoList# returnDirContentsFinalcxx . . $ QList#QList(ced63f7c635d850d).; |
| 399 | |
| 400 | |
| 401 | QStackcxx . . $ QStack#<QDircxx . . $ QDir#> dirStack; |
| 402 | dirStack.pushcxx . . $ QStack#push(77d9f17553126ecb).(dirToRead); |
| 403 | |
| 404 | while( !dirStack.emptycxx . . $ QVector#empty(50ce9a9e25b4a850).() ) |
| 405 | { |
| 406 | QDircxx . . $ QDir# lastDir = dirStackcxx . . $ QDir#QDir(601f444709e147bb)..lastcxx . . $ QVector#last(19b2b6f17af048b).(); |
| 407 | lastDir.setFiltercxx . . $ QDir#setFilter(3cb6a626764edf13).(QDircxx . . $ QDir#::AllDirscxx . . $ QDir#AllDirs. |cxx . . $ `operator|`(153b300229e4e3d0). QDircxx . . $ QDir#::NoDotAndDotDotcxx . . $ QDir#NoDotAndDotDot. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::AllEntriescxx . . $ QDir#AllEntries. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::Hiddencxx . . $ QDir#Hidden.); |
| 408 | lastDir.setSortingcxx . . $ QDir#setSorting(d6e6037501f8ac03).(QDircxx . . $ QDir#::Namecxx . . $ QDir#Name. |cxx . . $ `operator|`(2e9dd8934c680bb9). QDircxx . . $ QDir#::DirsFirstcxx . . $ QDir#DirsFirst. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::IgnoreCasecxx . . $ QDir#IgnoreCase. |cxx . . $ QFlags#`operator|`(2cc1994e0be6f18e). QDircxx . . $ QDir#::LocaleAwarecxx . . $ QDir#LocaleAware.); |
| 409 | QFileInfoListcxx . . $ QFileInfoList# flist = lastDir.entryInfoListcxx . . $ QDir#entryInfoList(c85cb969d00e05df).( ); |
| 410 | dirStack.popcxx . . $ QStack#pop(5f357b03ed472e5e).(); |
| 411 | |
| 412 | foreachcxx . . $ `<external>/15045578679651060896/qglobal.h:1145:13`! (QFileInfo localFileInfo, flist) |
| 413 | { |
| 414 | returnDirContentsFinal.appendcxx . . $ QList#append(77d9f17553126ecb).(localFileInfo); |
| 415 | if (localFileInfo.isDircxx . . $ QFileInfo#isDir(50ce9a9e25b4a850).()) |
| 416 | { |
| 417 | QDircxx . . $ QDir# direntcxx . . $ QDir#QDir(3520e46b33348bf6).( localFileInfo.absoluteFilePathcxx . . $ QFileInfo#absoluteFilePath(6ef7b6c27b00b43d).() ); |
| 418 | dirStack.pushcxx . . $ QStack#push(77d9f17553126ecb).( dirent ); |
| 419 | } |
| 420 | } |
| 421 | } |
| 422 | |
| 423 | return returnDirContentsFinalcxx . . $ QList#QList(88d75cd4b19cb2d1).; |
| 424 | } |
| 425 | |
| 426 | // end of calcDiffThread.cpp --------------------------------------------------------------------------- |
| 427 |