Changeset View
Changeset View
Standalone View
Standalone View
plugins/git/gitplugin.cpp
Show First 20 Lines • Show All 510 Lines • ▼ Show 20 Line(s) | 501 | { | |||
---|---|---|---|---|---|
511 | //We add the files that are not versioned | 511 | //We add the files that are not versioned | ||
512 | foreach(const QUrl& file, files) { | 512 | foreach(const QUrl& file, files) { | ||
513 | if(otherFiles.contains(file) && QFileInfo(file.toLocalFile()).isFile()) | 513 | if(otherFiles.contains(file) && QFileInfo(file.toLocalFile()).isFile()) | ||
514 | toadd += file; | 514 | toadd += file; | ||
515 | } | 515 | } | ||
516 | 516 | | |||
517 | if(!toadd.isEmpty()) { | 517 | if(!toadd.isEmpty()) { | ||
518 | VcsJob* job = add(toadd); | 518 | VcsJob* job = add(toadd); | ||
519 | job->exec(); | 519 | job->exec(); // krazy:exclude=crashy | ||
520 | } | 520 | } | ||
521 | } | 521 | } | ||
522 | 522 | | |||
523 | bool isEmptyDirStructure(const QDir &dir) | 523 | bool isEmptyDirStructure(const QDir &dir) | ||
524 | { | 524 | { | ||
525 | foreach (const QFileInfo &i, dir.entryInfoList(QDir::AllEntries | QDir::NoDotAndDotDot)) { | 525 | foreach (const QFileInfo &i, dir.entryInfoList(QDir::AllEntries | QDir::NoDotAndDotDot)) { | ||
526 | if (i.isDir()) { | 526 | if (i.isDir()) { | ||
527 | if (!isEmptyDirStructure(QDir(i.filePath()))) return false; | 527 | if (!isEmptyDirStructure(QDir(i.filePath()))) return false; | ||
▲ Show 20 Lines • Show All 1031 Lines • Show Last 20 Lines |