本文整理汇总了C++中Media::srcFilePath方法的典型用法代码示例。如果您正苦于以下问题:C++ Media::srcFilePath方法的具体用法?C++ Media::srcFilePath怎么用?C++ Media::srcFilePath使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Media
的用法示例。
在下文中一共展示了Media::srcFilePath方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: validateEntry
System::EngineResponse System::validateEntry (WebUpload::Entry * entry) {
System::EngineResponse res = System::ENGINE_RESPONSE_OK;
qDebug() << __FUNCTION__ << ": called";
// Ok here's the problem: the target dir can be different for each medium
// in the entry, but will it ever in real life be other than .share?
// We need to have enough space for preprocessing all media before trying
// to upload anything. Further checks are done later anyway, so let's just
// assume everything goes under ~/MyDocs/.share. Bying checking available
// space now we make sure the engine doesn't hang up and doesn't leave
// garbage xml files.
QDir targetDir = QDir::homePath() + "/MyDocs/.share/";
bool enoughDiskSpace = checkDiskSpace(targetDir, entry);
if (!enoughDiskSpace) {
return System::ENGINE_RESPONSE_NO_DISKSPACE;
}
QVectorIterator<Media *> mediaIter = entry->media();
while (mediaIter.hasNext ()) {
Media * media = mediaIter.next ();
QString filePath = media->srcFilePath ();
qDebug() << "SYSTEM::" << __FUNCTION__ << filePath;
if ((!filePath.isEmpty ()) && (!QFile::exists (filePath))) {
return System::ENGINE_RESPONSE_FILES_MISSING;
}
}
return res;
}