Changeset View
Changeset View
Standalone View
Standalone View
krusader/Synchronizer/synchronizer.cpp
Show First 20 Lines • Show All 173 Lines • ▼ Show 20 Line(s) | 173 | while (!stopped && !stack.isEmpty()) { | |||
---|---|---|---|---|---|
174 | for (int thread = 0; thread < (int)stack.count() && thread < parallelThreads; thread++) { | 174 | for (int thread = 0; thread < (int)stack.count() && thread < parallelThreads; thread++) { | ||
175 | SynchronizerTask * entry = stack.at(thread); | 175 | SynchronizerTask * entry = stack.at(thread); | ||
176 | 176 | | |||
177 | if (entry->state() == ST_STATE_NEW) | 177 | if (entry->state() == ST_STATE_NEW) | ||
178 | entry->start(parentWidget); | 178 | entry->start(parentWidget); | ||
179 | 179 | | |||
180 | if (entry->inherits("CompareTask")) { | 180 | if (entry->inherits("CompareTask")) { | ||
181 | if (entry->state() == ST_STATE_READY) { | 181 | if (entry->state() == ST_STATE_READY) { | ||
182 | auto *ctentry = (CompareTask *) entry; | 182 | auto *ctentry = dynamic_cast<CompareTask *>( entry); | ||
183 | if (ctentry->isDuplicate()) | 183 | if (ctentry->isDuplicate()) | ||
184 | compareDirectory(ctentry->parent(), ctentry->leftDirList(), ctentry->rightDirList(), | 184 | compareDirectory(ctentry->parent(), ctentry->leftDirList(), ctentry->rightDirList(), | ||
185 | ctentry->leftDir(), ctentry->rightDir()); | 185 | ctentry->leftDir(), ctentry->rightDir()); | ||
186 | else | 186 | else | ||
187 | addSingleDirectory(ctentry->parent(), ctentry->dirList(), ctentry->dir(), | 187 | addSingleDirectory(ctentry->parent(), ctentry->dirList(), ctentry->dir(), | ||
188 | ctentry->isLeft()); | 188 | ctentry->isLeft()); | ||
189 | } | 189 | } | ||
190 | if (entry->state() == ST_STATE_READY || entry->state() == ST_STATE_ERROR) | 190 | if (entry->state() == ST_STATE_READY || entry->state() == ST_STATE_ERROR) | ||
▲ Show 20 Lines • Show All 1253 Lines • Show Last 20 Lines |