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

Method loadPhotosFromCache

trunk/win/Source/BT_RSSPhotoFrameSource.cpp:403–434  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

401}
402
403bool RSSPhotoFrameSource::loadPhotosFromCache()
404{
405 QDir cacheDir = _localCacheDirectory;
406 if (exists(cacheDir))
407 {
408 if (_items.empty())
409 {
410 StrList cacheDirListing = fsManager->getDirectoryContents(native(cacheDir));
411 StrList::iterator iter = cacheDirListing.begin();
412 while (iter != cacheDirListing.end())
413 {
414 const QString& filename = *iter;
415
416 // remove it if it's an xml file
417 QString ext = fsManager->getFileExtension(filename);
418 if (ext == ".xml" ||
419 ext == ".tmp")
420 {
421 iter = cacheDirListing.erase(iter);
422 continue;
423 }
424
425 PhotoFrameSourceItem item(*iter);
426 item.setTexturePath(*iter);
427 _items.push_back(item);
428 ++_sourceUpdateCount;
429 iter++;
430 }
431 }
432 }
433 return true;
434}
435
436bool RSSPhotoFrameSource::isFlickrPhotoFrame()
437{

Callers

nothing calls this directly

Calls 10

getDirectoryContentsMethod · 0.80
getFileExtensionMethod · 0.80
setTexturePathMethod · 0.80
existsFunction · 0.70
nativeFunction · 0.70
emptyMethod · 0.45
beginMethod · 0.45
endMethod · 0.45
eraseMethod · 0.45
push_backMethod · 0.45

Tested by

no test coverage detected