From 1ef1cc0021f088a4ef149ff1f60470e253968040 Mon Sep 17 00:00:00 2001 From: Klaus Basan Date: Sun, 12 Jun 2016 03:04:28 +0200 Subject: [PATCH] refs #585, adjusted XP utils --- .../simulation/xplane/xplaneutil.cpp | 22 ++++++++++++++----- src/blackmisc/simulation/xplane/xplaneutil.h | 8 ++++++- 2 files changed, 23 insertions(+), 7 deletions(-) diff --git a/src/blackmisc/simulation/xplane/xplaneutil.cpp b/src/blackmisc/simulation/xplane/xplaneutil.cpp index df306a539..1d6fa6fd9 100644 --- a/src/blackmisc/simulation/xplane/xplaneutil.cpp +++ b/src/blackmisc/simulation/xplane/xplaneutil.cpp @@ -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"); diff --git a/src/blackmisc/simulation/xplane/xplaneutil.h b/src/blackmisc/simulation/xplane/xplaneutil.h index 6e0195b35..522f715af 100644 --- a/src/blackmisc/simulation/xplane/xplaneutil.h +++ b/src/blackmisc/simulation/xplane/xplaneutil.h @@ -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