diff --git a/src/core/UBPersistenceManager.cpp b/src/core/UBPersistenceManager.cpp index 2f040867..b191f012 100644 --- a/src/core/UBPersistenceManager.cpp +++ b/src/core/UBPersistenceManager.cpp @@ -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; -} diff --git a/src/core/UBPersistenceManager.h b/src/core/UBPersistenceManager.h index 77dd0bb9..6319e57f 100644 --- a/src/core/UBPersistenceManager.h +++ b/src/core/UBPersistenceManager.h @@ -109,12 +109,6 @@ class UBPersistenceManager : public QObject bool addGraphicsWidgteToDocument(UBDocumentProxy *mDocumentProxy, QString path, QUuid objectUuid, QString& destinationPath); bool addFileToDocument(UBDocumentProxy* pDocumentProxy, QString path, const QString& subdir, QUuid objectUuid, QString& destinationPath, QByteArray* data = NULL); - bool mayHaveVideo(UBDocumentProxy* pDocumentProxy); - bool mayHaveAudio(UBDocumentProxy* pDocumentProxy); - bool mayHavePDF(UBDocumentProxy* pDocumentProxy); - bool mayHaveSVGImages(UBDocumentProxy* pDocumentProxy); - bool mayHaveWidget(UBDocumentProxy* pDocumentProxy); - signals: void proxyListChanged();