Fix for searching the folder 'templates'.
--HG-- branch : develop
This commit is contained in:
parent
bf2db165da
commit
2e344b27b0
|
@ -113,7 +113,8 @@ QString VTapeSettings::StandardTablesPath() const
|
||||||
//---------------------------------------------------------------------------------------------------------------------
|
//---------------------------------------------------------------------------------------------------------------------
|
||||||
QString VTapeSettings::TemplatesPath() const
|
QString VTapeSettings::TemplatesPath() const
|
||||||
{
|
{
|
||||||
const QString stPath = QStringLiteral("/tables/template");
|
const QString stPath = QStringLiteral("/tables/templates");
|
||||||
|
const QString unixFullPath = QStringLiteral("/usr/share/valentina/tables/templates");
|
||||||
#ifdef Q_OS_WIN
|
#ifdef Q_OS_WIN
|
||||||
return QApplication::applicationDirPath() + stPath;
|
return QApplication::applicationDirPath() + stPath;
|
||||||
#elif defined(Q_OS_MAC)
|
#elif defined(Q_OS_MAC)
|
||||||
|
@ -131,11 +132,12 @@ QString VTapeSettings::TemplatesPath() const
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return QStringLiteral("/usr/share/valentina/tables/template");
|
return unixFullPath;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#else // Unix
|
#else // Unix
|
||||||
#ifdef QT_DEBUG
|
#ifdef QT_DEBUG
|
||||||
|
Q_UNUSED(unixFullPath);
|
||||||
return QApplication::applicationDirPath() + stPath;
|
return QApplication::applicationDirPath() + stPath;
|
||||||
#else
|
#else
|
||||||
QDir dir(QApplication::applicationDirPath() + stPath);
|
QDir dir(QApplication::applicationDirPath() + stPath);
|
||||||
|
@ -145,7 +147,7 @@ QString VTapeSettings::TemplatesPath() const
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
return QStringLiteral("/usr/share/valentina/tables/template");
|
return unixFullPath;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
Loading…
Reference in New Issue
Block a user