refs #585, adjusted XP utils

This commit is contained in:
Klaus Basan
2016-06-12 03:04:28 +02:00
parent 80ee210701
commit 1ef1cc0021
2 changed files with 23 additions and 7 deletions

View File

@@ -55,11 +55,11 @@ namespace BlackMisc
{
QString result;
TCHAR szLocalAppDataPath[MAX_PATH];
if(SUCCEEDED(SHGetFolderPath(NULL,
CSIDL_LOCAL_APPDATA,
NULL,
0,
szLocalAppDataPath)))
if (SUCCEEDED(SHGetFolderPath(NULL,
CSIDL_LOCAL_APPDATA,
NULL,
0,
szLocalAppDataPath)))
{
result = QString::fromWCharArray(szLocalAppDataPath);
}
@@ -86,7 +86,7 @@ namespace BlackMisc
QString xplaneInstallFilePath;
QString xplaneInstallFile = QStringLiteral("/x-plane_install_10.txt");
#if defined(Q_OS_WIN)
xplaneInstallFilePath = getWindowsLocalAppDataPath() + xplaneInstallFile;
xplaneInstallFilePath = getWindowsLocalAppDataPath() + xplaneInstallFile;
#elif defined (Q_OS_UNIX)
xplaneInstallFilePath = QDir::homePath() + QStringLiteral("/.x-plane") + xplaneInstallFile;
#elif defined (Q_OS_OSX)
@@ -102,6 +102,16 @@ namespace BlackMisc
else { return {}; }
}
QString CXPlaneUtil::xplaneModelDirectory()
{
return xplaneRootDir();
}
QStringList CXPlaneUtil::xplaneModelExcludeDirectoryPatterns()
{
return QStringList();
}
QString CXPlaneUtil::xbusLegacyDir()
{
QString legacyPath("/Resources/plugins/xbus/LegacyData");

View File

@@ -41,10 +41,16 @@ namespace BlackMisc
//! In case more then one XPlane version is found, the path to the highest version is used
static QString xplaneRootDir();
//! Directory with models
//! \todo needs review
static QString xplaneModelDirectory();
//! Exclude directories for models
static QStringList xplaneModelExcludeDirectoryPatterns();
//! XBus legacy directory
static QString xbusLegacyDir();
};
} // namespace
} // namespace
} // namespace