MCPcopy Create free account
hub / github.com/bumptop/BumpTop / GetDataDirectory

Method GetDataDirectory

trunk/win/Source/BT_WindowsOS.cpp:2026–2070  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2024}
2025
2026QDir WindowsSystem::GetDataDirectory()
2027{
2028 if (scnManager->isInSandboxMode)
2029 {
2030 // path GLOBAL(dataPath);
2031 if (empty(GLOBAL(dataPath))) {
2032 QDir appPath = winOS->GetExecutableDirectory();
2033 QString relDataName("SandboxData");
2034 GLOBAL(dataPath) = appPath / relDataName;
2035 // check parent directory for data dir if not found
2036 if (!exists(make_file(appPath, relDataName))) {
2037 appPath = parent(appPath);
2038 if (exists(make_file(appPath, relDataName))) {
2039 GLOBAL(dataPath) = appPath / relDataName;
2040 }
2041 }
2042 }
2043 return GLOBAL(dataPath);
2044 }
2045 else if (scnManager->runBumpTopTestsOnStartup)
2046 {
2047 // path GLOBAL(dataPath);
2048 if (empty(GLOBAL(dataPath))) {
2049 QDir appPath = winOS->GetExecutableDirectory();
2050 QString relDataName("UnitTestData");
2051 GLOBAL(dataPath) = appPath / relDataName;
2052 // check parent directory for data dir if not found
2053 if (!exists(make_file(appPath, relDataName))) {
2054 appPath = parent(appPath);
2055 if (exists(make_file(appPath, relDataName))) {
2056 GLOBAL(dataPath) = appPath / relDataName;
2057 }
2058 }
2059 }
2060 return GLOBAL(dataPath);
2061 }
2062 else
2063 {
2064 // Data directory should be in the local Application Data folder
2065 // i.e. %AppData%/Bump Technologies, Inc/BumpTop
2066 if (empty(GLOBAL(dataPath)))
2067 GLOBAL(dataPath) = GetUserApplicationDataPath();
2068 return GLOBAL(dataPath);
2069 }
2070}
2071
2072QDir WindowsSystem::GetTrainingDirectory()
2073{

Callers 15

LoggerMethod · 0.80
GUIDLoggerMethod · 0.80
getCacheDirectoryMethod · 0.80
onStateChangedMethod · 0.80
initMethod · 0.80
setCurrentLibraryMethod · 0.80
onCommandMethod · 0.80
EmailCrashReportFunction · 0.80
TopLevelFilterFunction · 0.80
CreateMethod · 0.80
GetGUIDMethod · 0.80

Calls 6

make_fileFunction · 0.85
emptyFunction · 0.70
existsFunction · 0.70
parentFunction · 0.70

Tested by 1

finalizeStateChangedMethod · 0.64