Использование функций Qt для временного и домашнего каталогов
This commit is contained in:
parent
7c2e583cb7
commit
940d1361df
@ -145,12 +145,8 @@ bool Paths::init( const QString& projectDir, const QString& configFileExtension
|
||||
: configFileExtension;
|
||||
m_configFileName = m_projectName + "." + m_configFileExtension;
|
||||
|
||||
m_homeDirectory = QString::fromLocal8Bit( qgetenv( "HOME" ) );
|
||||
m_tempDirectory = QString::fromLocal8Bit( qgetenv( "TMPDIR" ) );
|
||||
if ( !m_tempDirectory.exists() || ( m_tempDirectory.path() == QStringLiteral( "." ) ) )
|
||||
{
|
||||
m_tempDirectory = QStringLiteral( _PATH_TMP );
|
||||
}
|
||||
m_homeDirectory = QDir::homePath();
|
||||
m_tempDirectory = QDir::tempPath();
|
||||
|
||||
auto configHome = QString::fromLocal8Bit( qgetenv( "XDG_CONFIG_HOME" ) );
|
||||
if ( configHome.isEmpty() )
|
||||
|
Loading…
x
Reference in New Issue
Block a user