Переименования
This commit is contained in:
parent
297b04bd56
commit
360b2b41d1
@ -54,56 +54,56 @@ MYXLIB_INLINE bool Paths::init( bool autodetect )
|
||||
} // Paths::init
|
||||
|
||||
|
||||
MYXLIB_INLINE void Paths::setupSystemDirectories( const QString& defaultProjectDirectory,
|
||||
const QString& defaultEtcDirectory,
|
||||
const QString& defaultConstDataDirectory,
|
||||
const QString& defaultVarDataDirectory,
|
||||
const QString& defaultLogDirectory )
|
||||
MYXLIB_INLINE void Paths::setupSystemDirectories( const QString& projectDir,
|
||||
const QString& etcDir,
|
||||
const QString& constDataDir,
|
||||
const QString& varDataDir,
|
||||
const QString& logDir )
|
||||
{
|
||||
QFileInfo prefixDirInfo { defaultProjectDirectory };
|
||||
QFileInfo prefixDirInfo { projectDir };
|
||||
if ( prefixDirInfo.isDir() && prefixDirInfo.isReadable() )
|
||||
{
|
||||
m_projectDirectory = defaultProjectDirectory;
|
||||
m_projectDirectory = projectDir;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_projectDirectory = QStringLiteral( "." );
|
||||
}
|
||||
|
||||
QFileInfo etcDirInfo { defaultEtcDirectory };
|
||||
QFileInfo etcDirInfo { etcDir };
|
||||
if ( etcDirInfo.isDir() && etcDirInfo.isReadable() )
|
||||
{
|
||||
m_systemConfigDirectory = defaultEtcDirectory;
|
||||
m_systemConfigDirectory = etcDir;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_systemConfigDirectory = m_userConfigDirectory;
|
||||
}
|
||||
|
||||
QFileInfo constDataDirInfo { defaultConstDataDirectory };
|
||||
QFileInfo constDataDirInfo { constDataDir };
|
||||
if ( constDataDirInfo.isDir() && constDataDirInfo.isReadable() )
|
||||
{
|
||||
m_systemConstDataDirectory = defaultConstDataDirectory;
|
||||
m_systemConstDataDirectory = constDataDir;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_systemConstDataDirectory = m_userConstDataDirectory;
|
||||
}
|
||||
|
||||
QFileInfo varDataDirInfo { defaultVarDataDirectory };
|
||||
QFileInfo varDataDirInfo { varDataDir };
|
||||
if ( varDataDirInfo.isDir() && varDataDirInfo.isWritable() )
|
||||
{
|
||||
m_systemVarDataDirectory = defaultVarDataDirectory;
|
||||
m_systemVarDataDirectory = varDataDir;
|
||||
}
|
||||
else
|
||||
{
|
||||
m_systemVarDataDirectory = m_userVarDataDirectory;
|
||||
}
|
||||
|
||||
QFileInfo logDirInfo { defaultLogDirectory };
|
||||
QFileInfo logDirInfo { logDir };
|
||||
if ( logDirInfo.isDir() && logDirInfo.isWritable() )
|
||||
{
|
||||
m_systemLogDirectory = defaultLogDirectory;
|
||||
m_systemLogDirectory = logDir;
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -284,10 +284,10 @@ MYXLIB_INLINE bool Paths::makeDefaultSystemDirectories()
|
||||
bool status = true;
|
||||
QDir dir;
|
||||
|
||||
if ( !dir.mkpath( m_systemConfigDirectory ) ) { status = false; }
|
||||
if ( !dir.mkpath( m_systemVarDataDirectory ) ) { status = false; }
|
||||
if ( !dir.mkpath( m_systemConstDataDirectory ) ) { status = false; }
|
||||
if ( !dir.mkpath( m_systemLogDirectory ) ) { status = false; }
|
||||
if ( !dir.mkpath( m_systemConfigDirectory ) ) { status = false; }
|
||||
if ( !dir.mkpath( m_systemVarDataDirectory ) ) { status = false; }
|
||||
|
||||
return( status );
|
||||
}
|
||||
@ -298,10 +298,10 @@ MYXLIB_INLINE bool Paths::makeDefaultUserDirectories()
|
||||
bool status = true;
|
||||
QDir dir;
|
||||
|
||||
if ( !dir.mkpath( m_userConfigDirectory ) ) { status = false; }
|
||||
if ( !dir.mkpath( m_userVarDataDirectory ) ) { status = false; }
|
||||
if ( !dir.mkpath( m_userConstDataDirectory ) ) { status = false; }
|
||||
if ( !dir.mkpath( m_userLogDirectory ) ) { status = false; }
|
||||
if ( !dir.mkpath( m_userConfigDirectory ) ) { status = false; }
|
||||
if ( !dir.mkpath( m_userVarDataDirectory ) ) { status = false; }
|
||||
|
||||
return( status );
|
||||
}
|
||||
|
@ -208,11 +208,11 @@ private:
|
||||
QRegularExpression m_binDirRegex;
|
||||
QRegularExpression m_unityBinDirRegex;
|
||||
|
||||
void setupSystemDirectories( const QString& defaultProjectDirectory,
|
||||
const QString& defaultEtcDirectory,
|
||||
const QString& defaultConstDataDirectory,
|
||||
const QString& defaultVarDataDirectory,
|
||||
const QString& defaultLogDirectory );
|
||||
void setupSystemDirectories( const QString& projectDir,
|
||||
const QString& etcDir,
|
||||
const QString& constDataDir,
|
||||
const QString& varDataDir,
|
||||
const QString& logDir );
|
||||
void setupUserDirectories();
|
||||
|
||||
HierarchyType getHierarchyType();
|
||||
|
Loading…
Reference in New Issue
Block a user