Commit ff7a7462 authored by Langella Olivier's avatar Langella Olivier
Browse files

format is not required anymore in data_file

parent a88e5121
......@@ -151,7 +151,7 @@
</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="format" use="required">
<xs:attribute name="format">
<xs:annotation>
<xs:documentation>
Format type of this file : must be "mzxml" or "mzml".
......
......@@ -484,25 +484,15 @@ MasschroqmlParser::startElement_data_file(const QXmlAttributes &attributes)
return false;
}
QString format = attributes.value("format");
if(format.isEmpty())
{
_errorStr =
QObject::tr("The data_file tag must have a mime_type attribute.");
return false;
}
QFileInfo filenameInfo(filename);
if(!filenameInfo.exists())
{
_errorStr = QObject::tr("cannot find the '%1' input file : %2 \n")
.arg(format, filename);
_errorStr = QObject::tr("cannot find input file : %2 \n").arg(filename);
return false;
}
else if(!filenameInfo.isReadable())
{
_errorStr = QObject::tr("cannot read the '%1' input file : %2 \n")
.arg(format, filename);
_errorStr = QObject::tr("cannot read input file : %2 \n").arg(filename);
return false;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment