MCPcopy Create free account
hub / github.com/OpenBoard-org/OpenBoard / prepareLoading

Method prepareLoading

src/core/UBSceneCache.cpp:64–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64std::shared_ptr<UBGraphicsScene> UBSceneCache::prepareLoading(std::shared_ptr<UBDocumentProxy> proxy, int pageIndex)
65{
66 if (mSceneCache.contains({proxy, pageIndex}))
67 {
68 return value(proxy, pageIndex);
69 }
70
71 // no entry in cache; create a cache entry to load scene
72 qDebug() << "Preparing to load scene" << pageIndex;
73 auto cacheEntry = std::make_shared<SceneCacheEntry>(proxy, pageIndex);
74
75 insertEntry({proxy, pageIndex}, cacheEntry);
76 cacheEntry->startLoading();
77 return nullptr;
78}
79
80
81void UBSceneCache::insert (std::shared_ptr<UBDocumentProxy> proxy, int pageIndex, std::shared_ptr<UBGraphicsScene> scene)

Callers 1

loadDocumentSceneMethod · 0.80

Calls 2

startLoadingMethod · 0.80
containsMethod · 0.45

Tested by

no test coverage detected