QString ScPaths::getTempFileDir(void) { #if defined(_WIN32) QString tempPath; WCHAR wTempPath[1024]; DWORD result = GetTempPathW(1024, wTempPath); if ( result ) { tempPath = QString::fromUtf16((const unsigned short*) wTempPath); tempPath.replace( '\\', '/' ); tempPath += "/"; // GetTempPath may return Windows directory, better not use this one // for temporary files if (QDir(tempPath).exists() && tempPath != getSpecialDir(CSIDL_WINDOWS)) return tempPath; } #endif return getApplicationDataDir(); }
bool Configurator::setUp() { initializeDirs(); // directories initialization is different in Standalone and VstPlugin. Check the files ConfiguratorStandalone.cpp and VstPlugin.cpp // themes dir is the same for Standalone and Vst plugin themesDir = QDir(getApplicationDataDir().absoluteFilePath(THEMES_FOLDER_NAME)); if (!folderTreeExists()) createFoldersTree(); exportLogIniFile(); //copy log config file from resources to user hard disk if (needExportThemes()) // copy default themes from resources to user hard disk exportThemes(); setupLogConfigFile(); return true; }