|
|
@ -18,15 +18,24 @@ |
|
|
|
#include "domain/UBGraphicsVideoItem.h" |
|
|
|
#include "domain/UBGraphicsVideoItem.h" |
|
|
|
#include "domain/UBGraphicsWidgetItem.h" |
|
|
|
#include "domain/UBGraphicsWidgetItem.h" |
|
|
|
|
|
|
|
|
|
|
|
UBFeature::UBFeature(const QString &url, const QPixmap &icon, const QString &name, const QString &realPath, UBFeatureElementType type) |
|
|
|
UBFeature::UBFeature(const QString &url, const QPixmap &icon, const QString &name, const QUrl &realPath, UBFeatureElementType type) |
|
|
|
: virtualPath(url), mThumbnail(icon), mName(name), mPath(realPath), elementType(type) |
|
|
|
: virtualPath(url), mThumbnail(icon), mName(name), mPath(realPath), elementType(type) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
QString UBFeature::getUrl() const |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if ( elementType == FEATURE_INTERNAL ) |
|
|
|
|
|
|
|
return getFullPath().toString(); |
|
|
|
|
|
|
|
/*if ( UBApplication::isFromWeb( getFullPath() ) )
|
|
|
|
|
|
|
|
return QUrl( getFullPath() );*/ |
|
|
|
|
|
|
|
return getFullPath().toLocalFile(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool UBFeature::operator ==( const UBFeature &f )const |
|
|
|
bool UBFeature::operator ==( const UBFeature &f )const |
|
|
|
{ |
|
|
|
{ |
|
|
|
return virtualPath == f.getUrl() && mName == f.getName() && mPath == f.getFullPath() && elementType == f.getType(); |
|
|
|
return virtualPath == f.getVirtualPath() && mName == f.getName() && mPath == f.getFullPath() && elementType == f.getType(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
bool UBFeature::operator !=( const UBFeature &f )const |
|
|
|
bool UBFeature::operator !=( const UBFeature &f )const |
|
|
@ -55,24 +64,24 @@ UBFeaturesController::UBFeaturesController(QWidget *pParentWidget) : |
|
|
|
|
|
|
|
|
|
|
|
void UBFeaturesController::initDirectoryTree() |
|
|
|
void UBFeaturesController::initDirectoryTree() |
|
|
|
{ |
|
|
|
{ |
|
|
|
mUserAudioDirectoryPath = UBSettings::settings()->userAudioDirectory(); |
|
|
|
mUserAudioDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->userAudioDirectory() ); |
|
|
|
mUserVideoDirectoryPath = UBSettings::settings()->userVideoDirectory(); |
|
|
|
mUserVideoDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->userVideoDirectory() ); |
|
|
|
mUserPicturesDirectoryPath = UBSettings::settings()->userImageDirectory(); |
|
|
|
mUserPicturesDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->userImageDirectory() ); |
|
|
|
mUserInteractiveDirectoryPath = UBSettings::settings()->userInteractiveDirectory(); |
|
|
|
mUserInteractiveDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->userInteractiveDirectory() ); |
|
|
|
mUserAnimationDirectoryPath = UBSettings::settings()->userAnimationDirectory(); |
|
|
|
mUserAnimationDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->userAnimationDirectory() ); |
|
|
|
|
|
|
|
|
|
|
|
mLibPicturesDirectoryPath = UBSettings::settings()->applicationImageLibraryDirectory(); |
|
|
|
mLibPicturesDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->applicationImageLibraryDirectory() ); |
|
|
|
mLibInteractiveDirectoryPath = UBSettings::settings()->applicationInteractivesDirectory(); |
|
|
|
mLibInteractiveDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->applicationInteractivesDirectory() ); |
|
|
|
mLibApplicationsDirectoryPath = UBSettings::settings()->applicationApplicationsLibraryDirectory(); |
|
|
|
mLibApplicationsDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->applicationApplicationsLibraryDirectory() ); |
|
|
|
mLibShapesDirectoryPath = UBSettings::settings()->applicationShapeLibraryDirectory() ; |
|
|
|
mLibShapesDirectoryPath = QUrl::fromLocalFile( UBSettings::settings()->applicationShapeLibraryDirectory() ); |
|
|
|
mLibSearchDirectoryPath = UBSettings::settings()->userSearchDirectory(); |
|
|
|
mLibSearchDirectoryPath =QUrl::fromLocalFile( UBSettings::settings()->userSearchDirectory() ); |
|
|
|
trashDirectoryPath = UBSettings::userTrashDirPath(); |
|
|
|
trashDirectoryPath = QUrl::fromLocalFile( UBSettings::userTrashDirPath() ); |
|
|
|
|
|
|
|
|
|
|
|
featuresList = new QList <UBFeature>(); |
|
|
|
featuresList = new QList <UBFeature>(); |
|
|
|
|
|
|
|
|
|
|
|
QList <UBToolsManager::UBToolDescriptor> tools = UBToolsManager::manager()->allTools(); |
|
|
|
QList <UBToolsManager::UBToolDescriptor> tools = UBToolsManager::manager()->allTools(); |
|
|
|
|
|
|
|
|
|
|
|
featuresList->append( UBFeature( QString(), QPixmap( ":images/libpalette/home.png" ), "root", QString() ) ); |
|
|
|
featuresList->append( UBFeature( QString(), QPixmap( ":images/libpalette/home.png" ), "root", QUrl() ) ); |
|
|
|
currentElement = featuresList->at(0); |
|
|
|
currentElement = featuresList->at(0); |
|
|
|
|
|
|
|
|
|
|
|
appPath = rootPath + "/Applications"; |
|
|
|
appPath = rootPath + "/Applications"; |
|
|
@ -99,7 +108,7 @@ void UBFeaturesController::initDirectoryTree() |
|
|
|
featuresList->append( UBFeature( rootPath, QPixmap(":images/libpalette/ShapesCategory.svg"), "Shapes" , mLibShapesDirectoryPath ) ); |
|
|
|
featuresList->append( UBFeature( rootPath, QPixmap(":images/libpalette/ShapesCategory.svg"), "Shapes" , mLibShapesDirectoryPath ) ); |
|
|
|
trashElement = UBFeature( rootPath, QPixmap(":images/libpalette/TrashCategory.svg"), "Trash", trashDirectoryPath, FEATURE_TRASH ); |
|
|
|
trashElement = UBFeature( rootPath, QPixmap(":images/libpalette/TrashCategory.svg"), "Trash", trashDirectoryPath, FEATURE_TRASH ); |
|
|
|
featuresList->append( trashElement ); |
|
|
|
featuresList->append( trashElement ); |
|
|
|
favoriteElement = UBFeature( rootPath, QPixmap(":images/libpalette/FavoritesCategory.svg"), "Favorites", "favorites", FEATURE_FAVORITE ); |
|
|
|
favoriteElement = UBFeature( rootPath, QPixmap(":images/libpalette/FavoritesCategory.svg"), "Favorites", QUrl("favorites"), FEATURE_FAVORITE ); |
|
|
|
featuresList->append( favoriteElement ); |
|
|
|
featuresList->append( favoriteElement ); |
|
|
|
webSearchElement = UBFeature( rootPath, QPixmap(":images/libpalette/WebSearchCategory.svg"), "Web search", mLibSearchDirectoryPath ); |
|
|
|
webSearchElement = UBFeature( rootPath, QPixmap(":images/libpalette/WebSearchCategory.svg"), "Web search", mLibSearchDirectoryPath ); |
|
|
|
featuresList->append( webSearchElement ); |
|
|
|
featuresList->append( webSearchElement ); |
|
|
@ -107,10 +116,10 @@ void UBFeaturesController::initDirectoryTree() |
|
|
|
|
|
|
|
|
|
|
|
foreach (UBToolsManager::UBToolDescriptor tool, tools) |
|
|
|
foreach (UBToolsManager::UBToolDescriptor tool, tools) |
|
|
|
{ |
|
|
|
{ |
|
|
|
featuresList->append( UBFeature( appPath, tool.icon, tool.label, tool.id, FEATURE_INTERNAL ) ); |
|
|
|
featuresList->append( UBFeature( appPath, tool.icon, tool.label, QUrl( tool.id ), FEATURE_INTERNAL ) ); |
|
|
|
if ( favoriteSet->find( tool.id ) != favoriteSet->end() ) |
|
|
|
if ( favoriteSet->find( QUrl( tool.id ) ) != favoriteSet->end() ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
featuresList->append( UBFeature( favoritePath, tool.icon, tool.label, tool.id, FEATURE_INTERNAL ) ); |
|
|
|
featuresList->append( UBFeature( favoritePath, tool.icon, tool.label, QUrl( tool.id ), FEATURE_INTERNAL ) ); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
fileSystemScan( mUserInteractiveDirectoryPath, appPath ); |
|
|
|
fileSystemScan( mUserInteractiveDirectoryPath, appPath ); |
|
|
@ -129,9 +138,9 @@ void UBFeaturesController::initDirectoryTree() |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBFeaturesController::fileSystemScan(const QString & currentPath, const QString & currVirtualPath) |
|
|
|
void UBFeaturesController::fileSystemScan(const QUrl & currentPath, const QString & currVirtualPath) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QFileInfoList fileInfoList = UBFileSystemUtils::allElementsInDirectory(currentPath); |
|
|
|
QFileInfoList fileInfoList = UBFileSystemUtils::allElementsInDirectory(currentPath.toLocalFile()); |
|
|
|
|
|
|
|
|
|
|
|
QFileInfoList::iterator fileInfo; |
|
|
|
QFileInfoList::iterator fileInfo; |
|
|
|
for ( fileInfo = fileInfoList.begin(); fileInfo != fileInfoList.end(); fileInfo += 1) |
|
|
|
for ( fileInfo = fileInfoList.begin(); fileInfo != fileInfoList.end(); fileInfo += 1) |
|
|
@ -152,6 +161,7 @@ void UBFeaturesController::fileSystemScan(const QString & currentPath, const QSt |
|
|
|
QPixmap icon = QPixmap(":images/libpalette/soundIcon.svg"); |
|
|
|
QPixmap icon = QPixmap(":images/libpalette/soundIcon.svg"); |
|
|
|
QString fullFileName = fileInfo->filePath(); |
|
|
|
QString fullFileName = fileInfo->filePath(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if ( fileType == FEATURE_FOLDER )
|
|
|
|
if ( fileType == FEATURE_FOLDER )
|
|
|
|
{ |
|
|
|
{ |
|
|
|
icon = QPixmap(":images/libpalette/folder.svg"); |
|
|
|
icon = QPixmap(":images/libpalette/folder.svg"); |
|
|
@ -171,15 +181,15 @@ void UBFeaturesController::fileSystemScan(const QString & currentPath, const QSt |
|
|
|
icon = QPixmap( thumbnailPath ); |
|
|
|
icon = QPixmap( thumbnailPath ); |
|
|
|
else icon = createThumbnail( fullFileName );*/ |
|
|
|
else icon = createThumbnail( fullFileName );*/ |
|
|
|
} |
|
|
|
} |
|
|
|
featuresList->append( UBFeature( currVirtualPath, icon, fileName, fullFileName, fileType ) ); |
|
|
|
featuresList->append( UBFeature( currVirtualPath, icon, fileName, QUrl::fromLocalFile( fullFileName ), fileType ) ); |
|
|
|
if ( favoriteSet->find( fullFileName ) != favoriteSet->end() ) |
|
|
|
if ( favoriteSet->find( QUrl::fromLocalFile( fullFileName ) ) != favoriteSet->end() ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
featuresList->append( UBFeature( favoritePath, icon, fileName, fullFileName, fileType ) ); |
|
|
|
featuresList->append( UBFeature( favoritePath, icon, fileName, QUrl::fromLocalFile( fullFileName ), fileType ) ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if ( fileType == FEATURE_FOLDER ) |
|
|
|
if ( fileType == FEATURE_FOLDER ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
fileSystemScan( fullFileName, currVirtualPath + "/" + fileName ); |
|
|
|
fileSystemScan( QUrl::fromLocalFile( fullFileName ), currVirtualPath + "/" + fileName ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
@ -187,7 +197,7 @@ void UBFeaturesController::fileSystemScan(const QString & currentPath, const QSt |
|
|
|
|
|
|
|
|
|
|
|
void UBFeaturesController::loadFavoriteList() |
|
|
|
void UBFeaturesController::loadFavoriteList() |
|
|
|
{ |
|
|
|
{ |
|
|
|
favoriteSet = new QSet<QString>(); |
|
|
|
favoriteSet = new QSet<QUrl>(); |
|
|
|
QFile file( UBSettings::userDataDirectory() + "/favorites.dat" ); |
|
|
|
QFile file( UBSettings::userDataDirectory() + "/favorites.dat" ); |
|
|
|
if ( file.exists() ) |
|
|
|
if ( file.exists() ) |
|
|
|
{ |
|
|
|
{ |
|
|
@ -197,7 +207,7 @@ void UBFeaturesController::loadFavoriteList() |
|
|
|
in >> elementsNumber; |
|
|
|
in >> elementsNumber; |
|
|
|
for ( int i = 0; i < elementsNumber; ++i) |
|
|
|
for ( int i = 0; i < elementsNumber; ++i) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QString path; |
|
|
|
QUrl path; |
|
|
|
in >> path; |
|
|
|
in >> path; |
|
|
|
/*QFileInfo fileInfo( path );
|
|
|
|
/*QFileInfo fileInfo( path );
|
|
|
|
QString fileName = fileInfo.fileName(); |
|
|
|
QString fileName = fileInfo.fileName(); |
|
|
@ -216,7 +226,7 @@ void UBFeaturesController::saveFavoriteList() |
|
|
|
file.open(QIODevice::WriteOnly); |
|
|
|
file.open(QIODevice::WriteOnly); |
|
|
|
QDataStream out(&file); |
|
|
|
QDataStream out(&file); |
|
|
|
out << favoriteSet->size(); |
|
|
|
out << favoriteSet->size(); |
|
|
|
for ( QSet<QString>::iterator it = favoriteSet->begin(); it != favoriteSet->end(); ++it ) |
|
|
|
for ( QSet<QUrl>::iterator it = favoriteSet->begin(); it != favoriteSet->end(); ++it ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
out << (*it); |
|
|
|
out << (*it); |
|
|
|
} |
|
|
|
} |
|
|
@ -226,12 +236,12 @@ void UBFeaturesController::saveFavoriteList() |
|
|
|
UBFeature UBFeaturesController::addToFavorite( const QUrl &path ) |
|
|
|
UBFeature UBFeaturesController::addToFavorite( const QUrl &path ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QString filePath = fileNameFromUrl( path ); |
|
|
|
QString filePath = fileNameFromUrl( path ); |
|
|
|
if ( favoriteSet->find( filePath ) == favoriteSet->end() ) |
|
|
|
if ( favoriteSet->find( path ) == favoriteSet->end() ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QFileInfo fileInfo( filePath ); |
|
|
|
QFileInfo fileInfo( filePath ); |
|
|
|
QString fileName = fileInfo.fileName(); |
|
|
|
QString fileName = fileInfo.fileName(); |
|
|
|
UBFeature elem( favoritePath, thumbnailForFile( filePath ), fileName, filePath, fileTypeFromUrl(filePath) ); |
|
|
|
UBFeature elem( favoritePath, thumbnailForFile( filePath ), fileName, path, fileTypeFromUrl(filePath) ); |
|
|
|
favoriteSet->insert( filePath ); |
|
|
|
favoriteSet->insert( path ); |
|
|
|
saveFavoriteList(); |
|
|
|
saveFavoriteList(); |
|
|
|
return elem; |
|
|
|
return elem; |
|
|
|
} |
|
|
|
} |
|
|
@ -241,9 +251,9 @@ UBFeature UBFeaturesController::addToFavorite( const QUrl &path ) |
|
|
|
void UBFeaturesController::removeFromFavorite( const QUrl &path ) |
|
|
|
void UBFeaturesController::removeFromFavorite( const QUrl &path ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QString filePath = fileNameFromUrl( path ); |
|
|
|
QString filePath = fileNameFromUrl( path ); |
|
|
|
if ( favoriteSet->find( filePath ) != favoriteSet->end() ) |
|
|
|
if ( favoriteSet->find( path ) != favoriteSet->end() ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
favoriteSet->erase( favoriteSet->find( filePath ) ); |
|
|
|
favoriteSet->erase( favoriteSet->find( path ) ); |
|
|
|
saveFavoriteList(); |
|
|
|
saveFavoriteList(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
@ -256,6 +266,7 @@ QString UBFeaturesController::fileNameFromUrl( const QUrl &url ) |
|
|
|
return url.toLocalFile(); |
|
|
|
return url.toLocalFile(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UBFeatureElementType UBFeaturesController::fileTypeFromUrl( const QString &path ) |
|
|
|
UBFeatureElementType UBFeaturesController::fileTypeFromUrl( const QString &path ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QFileInfo fileInfo( path ); |
|
|
|
QFileInfo fileInfo( path ); |
|
|
@ -336,24 +347,26 @@ QPixmap UBFeaturesController::createThumbnail(const QString &path) |
|
|
|
|
|
|
|
|
|
|
|
UBFeature UBFeaturesController::newFolder( const QString &name ) |
|
|
|
UBFeature UBFeaturesController::newFolder( const QString &name ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QString path = currentElement.getFullPath() + "/" + name; |
|
|
|
QString path = currentElement.getFullPath().toLocalFile() + "/" + name; |
|
|
|
if(!QFileInfo(path).exists()) |
|
|
|
if(!QFileInfo(path).exists()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QDir().mkpath(path); |
|
|
|
QDir().mkpath(path); |
|
|
|
} |
|
|
|
} |
|
|
|
return UBFeature( currentElement.getUrl() + "/" + currentElement.getName(), QPixmap(":images/libpalette/folder.svg"), name, path, FEATURE_FOLDER ); |
|
|
|
return UBFeature( currentElement.getFullVirtualPath(), QPixmap(":images/libpalette/folder.svg"),
|
|
|
|
|
|
|
|
name, QUrl::fromLocalFile( path ), FEATURE_FOLDER ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
void UBFeaturesController::addItemToPage(const UBFeature &item) |
|
|
|
void UBFeaturesController::addItemToPage(const UBFeature &item) |
|
|
|
{ |
|
|
|
{ |
|
|
|
if ( item.getType() == FEATURE_INTERNAL ) |
|
|
|
UBApplication::boardController->downloadURL( item.getFullPath() ); |
|
|
|
|
|
|
|
/*if ( item.getType() == FEATURE_INTERNAL )
|
|
|
|
{ |
|
|
|
{ |
|
|
|
UBApplication::boardController->downloadURL( QUrl( item.getFullPath() ) ); |
|
|
|
UBApplication::boardController->downloadURL( QUrl( item.getFullPath() ) ); |
|
|
|
} |
|
|
|
} |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
UBApplication::boardController->downloadURL( QUrl::fromLocalFile( item.getFullPath() ) ); |
|
|
|
UBApplication::boardController->downloadURL( QUrl::fromLocalFile( item.getFullPath() ) ); |
|
|
|
} |
|
|
|
}*/ |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UBFeature UBFeaturesController::getDestinationForItem( const QUrl &url ) |
|
|
|
UBFeature UBFeaturesController::getDestinationForItem( const QUrl &url ) |
|
|
@ -394,14 +407,14 @@ UBFeature UBFeaturesController::copyItemToFolder( const QUrl &url, const UBFeatu |
|
|
|
UBFeature dest = destination; |
|
|
|
UBFeature dest = destination; |
|
|
|
|
|
|
|
|
|
|
|
if ( destination != trashElement &&
|
|
|
|
if ( destination != trashElement &&
|
|
|
|
!destination.getVirtualPath().startsWith( possibleDest.getVirtualPath(), Qt::CaseInsensitive ) ) |
|
|
|
!destination.getFullVirtualPath().startsWith( possibleDest.getFullVirtualPath(), Qt::CaseInsensitive ) ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
dest = possibleDest; |
|
|
|
dest = possibleDest; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
QString name = QFileInfo( sourcePath ).fileName(); |
|
|
|
QString name = QFileInfo( sourcePath ).fileName(); |
|
|
|
QString destPath = dest.getFullPath(); |
|
|
|
QString destPath = dest.getFullPath().toLocalFile(); |
|
|
|
QString destVirtualPath = dest.getVirtualPath(); |
|
|
|
QString destVirtualPath = dest.getFullVirtualPath(); |
|
|
|
QString newFullPath = destPath + "/" + name; |
|
|
|
QString newFullPath = destPath + "/" + name; |
|
|
|
QFile( sourcePath ).copy( newFullPath ); |
|
|
|
QFile( sourcePath ).copy( newFullPath ); |
|
|
|
|
|
|
|
|
|
|
@ -410,7 +423,7 @@ UBFeature UBFeaturesController::copyItemToFolder( const QUrl &url, const UBFeatu |
|
|
|
UBFeatureElementType type = FEATURE_ITEM; |
|
|
|
UBFeatureElementType type = FEATURE_ITEM; |
|
|
|
if ( UBFileSystemUtils::mimeTypeFromFileName( newFullPath ).contains("application") )
|
|
|
|
if ( UBFileSystemUtils::mimeTypeFromFileName( newFullPath ).contains("application") )
|
|
|
|
type = FEATURE_INTERACTIVE; |
|
|
|
type = FEATURE_INTERACTIVE; |
|
|
|
UBFeature newElement( destVirtualPath, thumb, name, newFullPath, type ); |
|
|
|
UBFeature newElement( destVirtualPath, thumb, name, QUrl::fromLocalFile( newFullPath ), type ); |
|
|
|
return newElement; |
|
|
|
return newElement; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -429,7 +442,7 @@ void UBFeaturesController::deleteItem( const QUrl &url ) |
|
|
|
|
|
|
|
|
|
|
|
bool UBFeaturesController::isTrash( const QUrl &url ) |
|
|
|
bool UBFeaturesController::isTrash( const QUrl &url ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
return url.toLocalFile().startsWith( trashDirectoryPath ); |
|
|
|
return url.toLocalFile().startsWith( trashDirectoryPath.toLocalFile() ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UBFeaturesController::~UBFeaturesController() |
|
|
|
UBFeaturesController::~UBFeaturesController() |
|
|
|