MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / isValidProject

Method isValidProject

src/Gui/DocumentRecovery.cpp:566–584  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

564}
565
566bool DocumentRecoveryPrivate::isValidProject(const QFileInfo& fi) const
567{
568 if (!fi.exists()) {
569 return false;
570 }
571
572 const QString projectFile = fi.absoluteFilePath();
573
574 if (!zipDataIsValid(projectFile)) {
575 return false;
576 }
577
578 if (!xmlFilesAreValid(projectFile)) {
579 return false;
580 }
581
582 App::ProjectFile project(projectFile.toStdString());
583 return project.loadDocument();
584}
585
586DocumentRecoveryPrivate::XmlConfig DocumentRecoveryPrivate::readXmlFile(const QString& fn) const
587{

Callers

nothing calls this directly

Calls 5

zipDataIsValidFunction · 0.85
xmlFilesAreValidFunction · 0.85
toStdStringMethod · 0.80
loadDocumentMethod · 0.80
existsMethod · 0.45

Tested by

no test coverage detected