|
|
|
@ -935,47 +935,3 @@ void UBPersistenceManager::checkIfDocumentRepositoryExists() |
|
|
|
|
UBApplication::quit(); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool UBPersistenceManager::mayHaveVideo(UBDocumentProxy* pDocumentProxy) |
|
|
|
|
{ |
|
|
|
|
QDir videoDir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::videoDirectory); |
|
|
|
|
|
|
|
|
|
return videoDir.exists() && videoDir.entryInfoList().length() > 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool UBPersistenceManager::mayHaveAudio(UBDocumentProxy* pDocumentProxy) |
|
|
|
|
{ |
|
|
|
|
QDir audioDir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::audioDirectory); |
|
|
|
|
|
|
|
|
|
return audioDir.exists() && audioDir.entryInfoList().length() > 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
bool UBPersistenceManager::mayHavePDF(UBDocumentProxy* pDocumentProxy) |
|
|
|
|
{ |
|
|
|
|
QDir objectDir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::objectDirectory); |
|
|
|
|
|
|
|
|
|
QStringList filters; |
|
|
|
|
filters << "*.pdf"; |
|
|
|
|
|
|
|
|
|
return objectDir.exists() && objectDir.entryInfoList(filters).length() > 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool UBPersistenceManager::mayHaveSVGImages(UBDocumentProxy* pDocumentProxy) |
|
|
|
|
{ |
|
|
|
|
QDir imageDir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::imageDirectory); |
|
|
|
|
|
|
|
|
|
QStringList filters; |
|
|
|
|
filters << "*.svg"; |
|
|
|
|
|
|
|
|
|
return imageDir.exists() && imageDir.entryInfoList(filters).length() > 0; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool UBPersistenceManager::mayHaveWidget(UBDocumentProxy* pDocumentProxy) |
|
|
|
|
{ |
|
|
|
|
QDir widgetDir(pDocumentProxy->persistencePath() + "/" + UBPersistenceManager::widgetDirectory); |
|
|
|
|
|
|
|
|
|
return widgetDir.exists() && widgetDir.entryInfoList(QDir::Dirs).length() > 0; |
|
|
|
|
} |
|
|
|
|