MCPcopy Create free account
hub / github.com/codestation/qcma / foreach

Function foreach

common/sqlitedb.cpp:330–359  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

328 QFileInfoList qsl = dir.entryInfoList(QDir::AllEntries | QDir::NoDotAndDotDot);
329
330 foreach(const QFileInfo &info, qsl) {
331
332 if(!continueOperation()) {
333 return -1;
334 }
335
336 //qDebug() << "Processing " << info.fileName();
337
338 QString rel_name = rel_path.isNull() ? info.fileName() : rel_path + "/" + info.fileName();
339
340 int ohfi = insertObjectEntryInternal(base_path, rel_name, parent_ohfi, root_ohfi);
341
342 if(ohfi > 0) {
343 // update progress dialog
344 if(info.isDir()) {
345 emit directoryAdded(base_path + "/" + rel_name);
346 int inserted = recursiveScanRootDirectory(base_path, rel_name, ohfi, root_ohfi);
347 if(inserted < 0) {
348 return -1;
349 }
350
351 total_objects += inserted;
352 qint64 dirsize = getChildenTotalSize(ohfi);
353 setObjectSize(ohfi, dirsize);
354 } else if(info.isFile()) {
355 emit fileAdded(info.fileName());
356 total_objects++;
357 }
358 }
359 }
360
361 return total_objects;
362}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected