Logo Search packages:      
Sourcecode: kdenlive version File versions

void Gui::KdenliveApp::readProperties ( KConfig *  _cfg  )  [protected, virtual]

reads the session config file and restores the application's state including the last opened files and documents by reading the temporary files saved by saveProperties()

See also:
KTMainWindow::readProperties

Definition at line 2033 of file kdenlive.cpp.

References initView(), m_doc, m_projectFormat, ProjectFormatManager::openDocument(), and KdenliveDoc::setModified().

                                                   {
      QString filename = _cfg->readEntry("filename", "");
      KURL url(filename);
      bool modified = _cfg->readBoolEntry("modified", false);
      if (modified) {
          bool canRecover;
          QString tempname =
            kapp->checkRecoverFile(filename, canRecover);
          KURL _url(tempname);

          if (canRecover) {
            initView();
            m_projectFormatManager.openDocument(_url, m_doc);
            m_doc->setModified(true);
            setCaption(url.fileName() + " - " + projectFormatName(m_projectFormat), true);
            QFile::remove(tempname);
          }
      } else {
          if (!filename.isEmpty()) {
            initView();
            m_projectFormatManager.openDocument(url, m_doc);
            setCaption(url.fileName() + " - " + projectFormatName(m_projectFormat), false);
          }
      }
    }


Generated by  Doxygen 1.6.0   Back to index