Return new path for individual measurements table.
--HG-- branch : feature
This commit is contained in:
parent
e95b886eb4
commit
e3593bf577
|
@ -90,8 +90,8 @@ void DialogIndividualMeasurements::DialogAccepted()
|
||||||
}
|
}
|
||||||
|
|
||||||
//just in case
|
//just in case
|
||||||
VDomDocument::ValidateXML("://schema/individual_measurements.xsd", "://tables/individual/individual.vit");
|
VDomDocument::ValidateXML("://schema/individual_measurements.xsd", qApp->pathToTables());
|
||||||
QFile iMeasur("://tables/individual/individual.vit");
|
QFile iMeasur(qApp->pathToTables());
|
||||||
//TODO maybe make copy save?
|
//TODO maybe make copy save?
|
||||||
if ( iMeasur.copy(_tablePath) == false )
|
if ( iMeasur.copy(_tablePath) == false )
|
||||||
{
|
{
|
||||||
|
|
|
@ -146,23 +146,7 @@ QString VApplication::pathToTables() const
|
||||||
{
|
{
|
||||||
if (_patternType == Pattern::Individual)
|
if (_patternType == Pattern::Individual)
|
||||||
{
|
{
|
||||||
#ifdef Q_OS_WIN
|
return "://tables/individual/individual.vit";
|
||||||
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
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue
Block a user