| 1085 | } // loadOFXPlugins |
| 1086 | |
| 1087 | void |
| 1088 | OfxHost::writeOFXCache() |
| 1089 | { |
| 1090 | /// and write a new cache, long version with everything in there |
| 1091 | QString ofxCachePath = getOFXCacheDirPath(); |
| 1092 | QDir().mkpath(ofxCachePath); |
| 1093 | QString ofxCacheFilePath = getCacheFilePath(); |
| 1094 | |
| 1095 | QTemporaryFile tmpf; |
| 1096 | tmpf.open(); |
| 1097 | QString tmpFileName = tmpf.fileName(); |
| 1098 | tmpf.remove(); |
| 1099 | |
| 1100 | FStreamsSupport::ofstream ofile; |
| 1101 | FStreamsSupport::open( &ofile, tmpFileName.toStdString() ); |
| 1102 | if (!ofile) { |
| 1103 | return; |
| 1104 | } |
| 1105 | OFX::Host::PluginCache* pluginCache = OFX::Host::PluginCache::getPluginCache(); |
| 1106 | assert(pluginCache); |
| 1107 | pluginCache->writePluginCache(ofile); |
| 1108 | |
| 1109 | ofile.close(); |
| 1110 | if (QFile::exists(ofxCacheFilePath)) { |
| 1111 | QFile::remove(ofxCacheFilePath); |
| 1112 | } |
| 1113 | QFile::copy(tmpFileName, ofxCacheFilePath); |
| 1114 | QFile::remove(tmpFileName); |
| 1115 | } |
| 1116 | |
| 1117 | void |
| 1118 | OfxHost::clearPluginsLoadedCache() |
nothing calls this directly
no test coverage detected