| 401 | } |
| 402 | |
| 403 | bool 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 | |
| 436 | bool RSSPhotoFrameSource::isFlickrPhotoFrame() |
| 437 | { |
nothing calls this directly
no test coverage detected