Implemented compatablility import of glabels-3 project files (#39).

This commit is contained in:
hochwasser
2018-11-04 14:40:39 +01:00
committed by Jim Evins
parent 1cdb3979ab
commit ba3c60216f
28 changed files with 2495 additions and 3 deletions
+5 -2
View File
@@ -32,6 +32,8 @@
#include "XmlUtil.h"
#include "DataCache.h"
#include "XmlLabelParser_3.h"
#include "barcode/Backends.h"
#include "merge/Factory.h"
@@ -77,7 +79,7 @@ namespace glabels
gunzip( rawData, unzippedData );
success = doc.setContent( unzippedData, false, &errorString, &errorLine, &errorColumn );
#else
qWarning() << "Warning: Cannot read compressed glabels project file! gLabels not build with ZLIB.";
qWarning() << "Warning: Cannot read compressed glabels project file! gLabels not built with ZLIB.";
return nullptr;
#endif
}
@@ -239,7 +241,8 @@ namespace glabels
QString version = XmlUtil::getStringAttr( node, "version", "" );
if ( version != "4.0" )
{
qWarning() << "TODO: compatibility mode.";
// Attempt to import as version 3.0 format (glabels 2.0 - glabels 3.4)
return XmlLabelParser_3::parseRootNode(node);
}
auto* label = new Model();