Check known names after conversion.
--HG-- branch : develop
This commit is contained in:
parent
96f1f63fa4
commit
25561858f0
|
@ -194,12 +194,6 @@ void TMainWindow::LoadFile(const QString &path)
|
|||
m = new VMeasurements(data);
|
||||
m->setXMLContent(path);
|
||||
|
||||
if (not m->IsDefinedKnownNamesValid())
|
||||
{
|
||||
VException e(tr("File contains invalid known measurement(s)."));
|
||||
throw e;
|
||||
}
|
||||
|
||||
mType = m->Type();
|
||||
|
||||
if (mType == MeasurementsType::Unknown)
|
||||
|
@ -224,6 +218,13 @@ void TMainWindow::LoadFile(const QString &path)
|
|||
}
|
||||
|
||||
m->setXMLContent(path);// Read again after conversion
|
||||
|
||||
if (not m->IsDefinedKnownNamesValid())
|
||||
{
|
||||
VException e(tr("File contains invalid known measurement(s)."));
|
||||
throw e;
|
||||
}
|
||||
|
||||
mUnit = m->MUnit();
|
||||
pUnit = mUnit;
|
||||
|
||||
|
|
|
@ -245,12 +245,6 @@ bool MainWindow::LoadMeasurements(const QString &path)
|
|||
m = new VMeasurements(pattern);
|
||||
m->setXMLContent(path);
|
||||
|
||||
if (not m->IsDefinedKnownNamesValid())
|
||||
{
|
||||
VException e(tr("Measurement file contains invalid known measurement(s)."));
|
||||
throw e;
|
||||
}
|
||||
|
||||
if (m->Type() == MeasurementsType::Unknown)
|
||||
{
|
||||
VException e(tr("Measurement file has unknown format."));
|
||||
|
@ -274,6 +268,12 @@ bool MainWindow::LoadMeasurements(const QString &path)
|
|||
|
||||
m->setXMLContent(path);// Read again after conversion
|
||||
|
||||
if (not m->IsDefinedKnownNamesValid())
|
||||
{
|
||||
VException e(tr("Measurement file contains invalid known measurement(s)."));
|
||||
throw e;
|
||||
}
|
||||
|
||||
const QStringList mList = m->ListAll();
|
||||
const QStringList pList = doc->ListMeasurements();
|
||||
|
||||
|
@ -3440,12 +3440,6 @@ QString MainWindow::CheckPathToMeasurements(const QString &patternPath, const QS
|
|||
VMeasurements *m = new VMeasurements(pattern);
|
||||
m->setXMLContent(mPath);
|
||||
|
||||
if (not m->IsDefinedKnownNamesValid())
|
||||
{
|
||||
VException e(tr("Measurement file contains invalid known measurement(s)."));
|
||||
throw e;
|
||||
}
|
||||
|
||||
patternType = m->Type();
|
||||
|
||||
if (patternType == MeasurementsType::Unknown)
|
||||
|
@ -3471,6 +3465,12 @@ QString MainWindow::CheckPathToMeasurements(const QString &patternPath, const QS
|
|||
|
||||
m->setXMLContent(mPath);// Read again after conversion
|
||||
|
||||
if (not m->IsDefinedKnownNamesValid())
|
||||
{
|
||||
VException e(tr("Measurement file contains invalid known measurement(s)."));
|
||||
throw e;
|
||||
}
|
||||
|
||||
const QStringList mList = m->ListAll();
|
||||
const QStringList pList = doc->ListMeasurements();
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user