From 940d1361dfc913e2721994e83939c3b2ce23e24f Mon Sep 17 00:00:00 2001 From: Andrey Astafyev Date: Mon, 13 Apr 2020 09:31:51 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D1=81=D0=BF=D0=BE=D0=BB=D1=8C=D0=B7?= =?UTF-8?q?=D0=BE=D0=B2=D0=B0=D0=BD=D0=B8=D0=B5=20=D1=84=D1=83=D0=BD=D0=BA?= =?UTF-8?q?=D1=86=D0=B8=D0=B9=20Qt=20=D0=B4=D0=BB=D1=8F=20=D0=B2=D1=80?= =?UTF-8?q?=D0=B5=D0=BC=D0=B5=D0=BD=D0=BD=D0=BE=D0=B3=D0=BE=20=D0=B8=20?= =?UTF-8?q?=D0=B4=D0=BE=D0=BC=D0=B0=D1=88=D0=BD=D0=B5=D0=B3=D0=BE=20=D0=BA?= =?UTF-8?q?=D0=B0=D1=82=D0=B0=D0=BB=D0=BE=D0=B3=D0=BE=D0=B2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/myx/filesystem/paths.cpp | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/src/myx/filesystem/paths.cpp b/src/myx/filesystem/paths.cpp index d1fb8b4..98f1819 100644 --- a/src/myx/filesystem/paths.cpp +++ b/src/myx/filesystem/paths.cpp @@ -140,17 +140,13 @@ Paths::HierarchyType Paths::getHierarchyType() bool Paths::init( const QString& projectDir, const QString& configFileExtension ) { m_projectName = projectDir.isEmpty() ? m_currentExecutable.m_canonicalFilePath.fileName() - : projectDir; + : projectDir; m_configFileExtension = configFileExtension.isEmpty() ? QStringLiteral( "conf" ) : 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() )