|
|
|
@ -86,6 +86,7 @@ UBPersistenceManager::UBPersistenceManager(QObject *pParent) |
|
|
|
|
connect(mWorker, SIGNAL(finished()), mWorker, SLOT(deleteLater())); |
|
|
|
|
connect(mThread, SIGNAL(finished()), mThread, SLOT(deleteLater())); |
|
|
|
|
connect(mWorker,SIGNAL(sceneLoaded(QByteArray,UBDocumentProxy*,int)),this,SLOT(onSceneLoaded(QByteArray,UBDocumentProxy*,int))); |
|
|
|
|
connect(mWorker,SIGNAL(scenePersisted(UBGraphicsScene*)),this,SLOT(onScenePersisted(UBGraphicsScene*))); |
|
|
|
|
mThread->start(); |
|
|
|
|
|
|
|
|
|
} |
|
|
|
@ -107,6 +108,12 @@ void UBPersistenceManager::destroy() |
|
|
|
|
sSingleton = NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UBPersistenceManager::onScenePersisted(UBGraphicsScene* scene) |
|
|
|
|
{ |
|
|
|
|
delete scene; |
|
|
|
|
scene = NULL; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void UBPersistenceManager::onWorkerFinished() |
|
|
|
|
{ |
|
|
|
|
mIsWorkerFinished = true; |
|
|
|
|