Logo Search packages:      
Sourcecode: kdenlive version File versions

bool ProjectFormatManager::mergeDocument ( const KURL &  url,
KdenliveDoc document 
)

merge the document with currently open document

Definition at line 54 of file projectformatmanager.cpp.

References findLoadFormat(), and LoadProjectFilter::merge().

{
    if (url.isEmpty())
      return false;

    KMimeType::Ptr format = KMimeType::findByURL(url);

    LoadProjectFilter *filter = findLoadFormat(format->name());
    if (filter) {
      QString tmpfile;
      if (KIO::NetAccess::download(url, tmpfile, 0)) {
          QFile file(tmpfile);
          if (file.open(IO_ReadOnly)) {
            filter->merge(file, document);
          }
          KIO::NetAccess::removeTempFile(tmpfile);
          //document->initSceneListGeneration();
          QTimer::singleShot(200, document, SLOT(initSceneListGeneration()));
          return true;
      }
    }

    return false;
}


Generated by  Doxygen 1.6.0   Back to index