retorna el id del ultimo de los folders
| 299 | |
| 300 | // retorna el id del ultimo de los folders |
| 301 | qulonglong LibraryCreator::insertFolders() |
| 302 | { |
| 303 | auto _database = QSqlDatabase::database(_databaseConnection); |
| 304 | QList<Folder>::iterator i; |
| 305 | int currentId = 0; |
| 306 | Folder currentParent; |
| 307 | for (i = _currentPathFolders.begin(); i != _currentPathFolders.end(); ++i) { |
| 308 | if (!(i->knownId)) { |
| 309 | i->setFather(currentId); |
| 310 | i->type = currentParent.type; |
| 311 | currentId = DBHelper::insert(&(*i), _database); // insertFolder(currentId,*i); |
| 312 | i->setId(currentId); |
| 313 | } else { |
| 314 | currentId = i->id; |
| 315 | } |
| 316 | |
| 317 | currentParent = *i; |
| 318 | } |
| 319 | return currentId; |
| 320 | } |
| 321 | |
| 322 | void LibraryCreator::create(QDir dir) |
| 323 | { |