Commit 69215e8e authored by Edlira Nano's avatar Edlira Nano
Browse files

added LICENCE file + modified schema location in mass_chroq.cpp

git-svn-id: https://subversion.renater.fr/masschroq/trunk@2078 e4b6dbb4-9209-464b-83f7-6257456c460c
parent 66e37286
MassChroQ: Mass Chromatogram Quantification software.
Copyright (C) 2010-2011 Olivier Langella, Edlira Nano, Benoit Valot, Michel Zivy.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
......@@ -142,17 +142,22 @@ MassChroq::validateXmlFile() {
#if QT_VERSION >= QT_V_4_6
QFile schema_file(MASSCHROQ_XSD);
QFileInfo schema_file_info(schema_file);
if (!schema_file_info.exists()) {
qDebug() << "MassChroQ XSD schema file '%1' does not exist.";
throw mcqError(QObject::tr("MassChroQ XSD schema file '%1' does not exist.\n").arg(schema_file_info.absoluteFilePath()));
if ( !QFile::exists(MASSCHROQ_XSD) ) {
QString schema_current = (QDir::current()).absolutePath();
schema_current.append("/masschroq.xsd");
if (QFile::exists(schema_current)) {
schema_file.setFileName(schema_current);
} else {
qDebug() << "MassChroQ XSD schema file '%1' does not exist.";
throw mcqError(QObject::tr("MassChroQ XSD schema file '%1' or '%2' does not exist.\n").arg(schema_file.fileName(), schema_current));
}
}
if (!schema_file.open(QIODevice::ReadOnly)) {
throw
mcqError(QObject::tr("error opening the file of the XSD schema : %1 \n Try make install to install the schema file. \n").arg(schema_file_info.absoluteFilePath()));
mcqError(QObject::tr("error opening the file of the XSD schema : %1 \n Try make install to install the schema file. \n").arg(schema_file.fileName()));
}
qDebug() << "MassChroq::validateXmlFile enter >= 4.6";
QXmlSchema schema;
......
Markdown is supported
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