a?adido c?digo espec?fico para versi?n de mac os x, de forma que el path relativo de los c?mics se almacene adecuadamente en la base de datos

This commit is contained in:
Luis Ángel San Martín 2012-07-15 11:44:14 +02:00
parent 0a7b6a8592
commit 77c2d934fe

View File

@ -171,7 +171,18 @@ void LibraryCreator::create(QDir dir)
return;
QFileInfo fileInfo = list.at(i);
QString fileName = fileInfo.fileName();
#ifdef Q_WS_MAC
QStringList src = _source.split("/");
QString filePath = fileInfo.absoluteFilePath();
QStringList fp = filePath.split("/");
for(int i = 0; i< src.count();i++)
{
fp.removeFirst();
}
QString relativePath = "/" + fp.join("/");
#else
QString relativePath = QDir::cleanPath(fileInfo.absoluteFilePath()).remove(_source);
#endif
if(fileInfo.isDir())
{
//se añade al path actual el folder, aún no se sabe si habrá que añadirlo a la base de datos