fixed crew adding overhead
This commit is contained in:
parent
e3b46832ec
commit
dca79a061c
1 changed files with 13 additions and 1 deletions
|
@ -36,6 +36,8 @@ void ProfileLoader::run()
|
||||||
QDir profileDir;
|
QDir profileDir;
|
||||||
profileDir.setPath(profileFolder);
|
profileDir.setPath(profileFolder);
|
||||||
|
|
||||||
|
QList<int> crewList;
|
||||||
|
|
||||||
profileDir.setNameFilters(QStringList("SGTA*"));
|
profileDir.setNameFilters(QStringList("SGTA*"));
|
||||||
QStringList SavegameFiles = profileDir.entryList(QDir::Files | QDir::NoDot, QDir::NoSort);
|
QStringList SavegameFiles = profileDir.entryList(QDir::Files | QDir::NoDot, QDir::NoSort);
|
||||||
QStringList BackupFiles = SavegameFiles.filter(".bak", Qt::CaseInsensitive);
|
QStringList BackupFiles = SavegameFiles.filter(".bak", Qt::CaseInsensitive);
|
||||||
|
@ -69,9 +71,19 @@ void ProfileLoader::run()
|
||||||
if (picture->readingPicture())
|
if (picture->readingPicture())
|
||||||
{
|
{
|
||||||
emit pictureLoaded(picture, picturePath);
|
emit pictureLoaded(picture, picturePath);
|
||||||
crewDB->addCrew(picture->getCrewNumber());
|
int crewNumber = picture->getCrewNumber();
|
||||||
|
if (!crewList.contains(crewNumber))
|
||||||
|
{
|
||||||
|
crewList.append(crewNumber);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
loadedV++;
|
loadedV++;
|
||||||
emit loadingProgress(loadedV, maximumV);
|
emit loadingProgress(loadedV, maximumV);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// adding found crews
|
||||||
|
foreach(int crewID, crewList)
|
||||||
|
{
|
||||||
|
crewDB->addCrew(crewID);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue