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

Method startLoading

src/core/UBSceneCache.cpp:321–348  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321void UBSceneCache::SceneCacheEntry::startLoading()
322{
323 mTimer = new QTimer;
324 QObject::connect(mTimer, &QTimer::timeout, mTimer, [this](){
325 if (UBApplication::isClosing)
326 {
327 mTimer->stop();
328 delete mTimer;
329 return;
330 }
331
332 if (mContext)
333 {
334 mContext->step();
335
336 if (mContext->isFinished())
337 {
338 mScene = mContext->scene();
339 mContext = nullptr;
340 mTimer->stop();
341 delete mTimer;
342 mTimer = nullptr;
343 }
344 }
345 });
346
347 mTimer->start();
348}
349
350bool UBSceneCache::SceneCacheEntry::isSceneAvailable() const
351{

Callers 1

prepareLoadingMethod · 0.80

Calls 5

stepMethod · 0.80
isFinishedMethod · 0.80
stopMethod · 0.45
sceneMethod · 0.45
startMethod · 0.45

Tested by

no test coverage detected