Commit 05676074 authored by Claudio Valerio's avatar Claudio Valerio

Merge branch 'SEM-WithoutDocumentMode' of...

Merge branch 'SEM-WithoutDocumentMode' of 62.2.114.190:/home/git/git/OpenBoardPrivate into SEM-WithoutDocumentMode
parents 2ac76bd3 e51a783b
...@@ -565,7 +565,7 @@ void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int in ...@@ -565,7 +565,7 @@ void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int in
QUuid newUuid = QUuid::createUuid(); QUuid newUuid = QUuid::createUuid();
QString fileName = QFileInfo(source).completeBaseName(); QString fileName = QFileInfo(source).completeBaseName();
destination = destination.replace(fileName,newUuid.toString()); destination = destination.replace(fileName,newUuid.toString());
Q_ASSERT(QFile::copy(source,destination)); QFile::copy(source,destination);
mediaItem->mediaFileUrl(QUrl::fromLocalFile(destination)); mediaItem->mediaFileUrl(QUrl::fromLocalFile(destination));
continue; continue;
} }
...@@ -584,8 +584,8 @@ void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int in ...@@ -584,8 +584,8 @@ void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int in
QString screenshotDestinationPath = screenshotSourcePath; QString screenshotDestinationPath = screenshotSourcePath;
screenshotDestinationPath = screenshotDestinationPath.replace(actualUuidString,newUUidString); screenshotDestinationPath = screenshotDestinationPath.replace(actualUuidString,newUUidString);
Q_ASSERT(UBFileSystemUtils::copyDir(widgetSourcePath,widgetDestinationPath)); UBFileSystemUtils::copyDir(widgetSourcePath,widgetDestinationPath);
Q_ASSERT(QFile::copy(screenshotSourcePath,screenshotDestinationPath)); QFile::copy(screenshotSourcePath,screenshotDestinationPath);
widget->setUuid(newUUid); widget->setUuid(newUUid);
...@@ -601,7 +601,7 @@ void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int in ...@@ -601,7 +601,7 @@ void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int in
QUuid newUuid = QUuid::createUuid(); QUuid newUuid = QUuid::createUuid();
QString fileName = QFileInfo(source).completeBaseName(); QString fileName = QFileInfo(source).completeBaseName();
destination = destination.replace(fileName,newUuid.toString()); destination = destination.replace(fileName,newUuid.toString());
Q_ASSERT(QFile::copy(source,destination)); QFile::copy(source,destination);
pixmapItem->setUuid(newUuid); pixmapItem->setUuid(newUuid);
continue; continue;
} }
...@@ -613,7 +613,7 @@ void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int in ...@@ -613,7 +613,7 @@ void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int in
QUuid newUuid = QUuid::createUuid(); QUuid newUuid = QUuid::createUuid();
QString fileName = QFileInfo(source).completeBaseName(); QString fileName = QFileInfo(source).completeBaseName();
destination = destination.replace(fileName,newUuid.toString()); destination = destination.replace(fileName,newUuid.toString());
Q_ASSERT(QFile::copy(source,destination)); QFile::copy(source,destination);
svgItem->setUuid(newUuid); svgItem->setUuid(newUuid);
continue; continue;
} }
......
...@@ -324,12 +324,12 @@ void UBDocumentTreeWidget::dropEvent(QDropEvent *event) ...@@ -324,12 +324,12 @@ void UBDocumentTreeWidget::dropEvent(QDropEvent *event)
QString target = targetDocProxy->persistencePath() + "/" + relativeFile.toString(); QString target = targetDocProxy->persistencePath() + "/" + relativeFile.toString();
if(QFileInfo(source).isDir()) if(QFileInfo(source).isDir())
Q_ASSERT(UBFileSystemUtils::copyDir(source,target)); UBFileSystemUtils::copyDir(source,target);
else{ else{
QFileInfo fi(target); QFileInfo fi(target);
QDir d = fi.dir(); QDir d = fi.dir();
d.mkpath(d.absolutePath()); d.mkpath(d.absolutePath());
Q_ASSERT(QFile::copy(source, target)); QFile::copy(source, target);
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment