Return new path for individual measurements table.

--HG--
branch : feature
This commit is contained in:
dismine 2014-05-15 12:35:36 +03:00
parent e95b886eb4
commit e3593bf577
2 changed files with 3 additions and 19 deletions

View File

@ -90,8 +90,8 @@ void DialogIndividualMeasurements::DialogAccepted()
}
//just in case
VDomDocument::ValidateXML("://schema/individual_measurements.xsd", "://tables/individual/individual.vit");
QFile iMeasur("://tables/individual/individual.vit");
VDomDocument::ValidateXML("://schema/individual_measurements.xsd", qApp->pathToTables());
QFile iMeasur(qApp->pathToTables());
//TODO maybe make copy save?
if ( iMeasur.copy(_tablePath) == false )
{

View File

@ -146,23 +146,7 @@ QString VApplication::pathToTables() const
{
if (_patternType == Pattern::Individual)
{
#ifdef Q_OS_WIN
return QApplication::applicationDirPath() + QStringLiteral("/tables/individual");
#else
#ifdef QT_DEBUG
return QApplication::applicationDirPath() + QStringLiteral("/tables/individual");
#else
QDir dir(QApplication::applicationDirPath() + QStringLiteral("/tables/individual"));
if(dir.exist())
{
return dir.absolutePath();
}
else
{
return QStringLiteral("/usr/share/valentina/tables/individual");
}
#endif
#endif
return "://tables/individual/individual.vit";
}
else
{