当前位置: 首页>>代码示例>>C++>>正文


C++ Media::srcFilePath方法代码示例

本文整理汇总了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;
}
开发者ID:nemomobile-graveyard,项目名称:webupload-engine,代码行数:32,代码来源:system.cpp


注:本文中的Media::srcFilePath方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。