From d452b2dd2856618e034ab09ab85fad69171e3bf7 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Thu, 11 Jul 2013 14:21:02 +0200 Subject: [PATCH] remove unused methods --- src/core/UBPersistenceManager.cpp | 44 ------------------------------- src/core/UBPersistenceManager.h | 6 ----- 2 files changed, 50 deletions(-) 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();