X-Git-Url: http://git.maemo.org/git/?p=bootcreen;a=blobdiff_plain;f=bootscreen.cpp;h=d80a8ae6fab0d752e7eef8827c4068fe33e3da63;hp=ae1a04b0ca13835e43ca74f3e32e3b2848e34453;hb=dcd08b73ecb2728043cdf5a60fbfbb811b101d59;hpb=3ec4cdf81a3d1bef3206718b710096fbf7036175;ds=sidebyside diff --git a/bootscreen.cpp b/bootscreen.cpp index ae1a04b..d80a8ae 100644 --- a/bootscreen.cpp +++ b/bootscreen.cpp @@ -153,7 +153,10 @@ void BootScreen::addVideo() if(filePath != ""){ QFile fileCopy(filePath); QFileInfo fileInfo(filePath); - QString newFilePath = videosDir + fileInfo.fileName(); + QString fileName = fileInfo.fileName(); + //boot player can't read files with spaces in the name + fileName.replace(QString(" "), QString("_")); + QString newFilePath = videosDir + fileName; qDebug() << newFilePath << endl; qDebug() << fileInfo.size() << endl; if(fileInfo.size() > 11100000) @@ -168,7 +171,7 @@ void BootScreen::addVideo() else{ bool result = fileCopy.copy(newFilePath); if(result){ - list->addItem(QString("%1").arg(fileInfo.fileName())); + list->addItem(QString("%1").arg(fileName)); //autoselect item, if not in random mode if(!random){ QListWidgetItem *currentItem = list->item(list->count()-1); @@ -329,8 +332,10 @@ void BootScreen::createFile(QString filename, int index) out << "filename=" << filePath << endl; } } - else + else{ + qDebug() << filename << endl; qDebug() << "print a error" << endl; + } } void BootScreen::closeEvent(QCloseEvent *event)