Merge branch 'SEM-WithoutDocumentMode' of 62.2.114.190:/home/git/git/OpenBoardPrivate into SEM-WithoutDocumentMode

preferencesAboutTextFull
Claudio Valerio 10 years ago
commit 05676074f0
  1. 10
      src/core/UBPersistenceManager.cpp
  2. 4
      src/gui/UBDocumentTreeWidget.cpp

@ -565,7 +565,7 @@ void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int in
QUuid newUuid = QUuid::createUuid();
QString fileName = QFileInfo(source).completeBaseName();
destination = destination.replace(fileName,newUuid.toString());
Q_ASSERT(QFile::copy(source,destination));
QFile::copy(source,destination);
mediaItem->mediaFileUrl(QUrl::fromLocalFile(destination));
continue;
}
@ -584,8 +584,8 @@ void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int in
QString screenshotDestinationPath = screenshotSourcePath;
screenshotDestinationPath = screenshotDestinationPath.replace(actualUuidString,newUUidString);
Q_ASSERT(UBFileSystemUtils::copyDir(widgetSourcePath,widgetDestinationPath));
Q_ASSERT(QFile::copy(screenshotSourcePath,screenshotDestinationPath));
UBFileSystemUtils::copyDir(widgetSourcePath,widgetDestinationPath);
QFile::copy(screenshotSourcePath,screenshotDestinationPath);
widget->setUuid(newUUid);
@ -601,7 +601,7 @@ void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int in
QUuid newUuid = QUuid::createUuid();
QString fileName = QFileInfo(source).completeBaseName();
destination = destination.replace(fileName,newUuid.toString());
Q_ASSERT(QFile::copy(source,destination));
QFile::copy(source,destination);
pixmapItem->setUuid(newUuid);
continue;
}
@ -613,7 +613,7 @@ void UBPersistenceManager::duplicateDocumentScene(UBDocumentProxy* proxy, int in
QUuid newUuid = QUuid::createUuid();
QString fileName = QFileInfo(source).completeBaseName();
destination = destination.replace(fileName,newUuid.toString());
Q_ASSERT(QFile::copy(source,destination));
QFile::copy(source,destination);
svgItem->setUuid(newUuid);
continue;
}

@ -324,12 +324,12 @@ void UBDocumentTreeWidget::dropEvent(QDropEvent *event)
QString target = targetDocProxy->persistencePath() + "/" + relativeFile.toString();
if(QFileInfo(source).isDir())
Q_ASSERT(UBFileSystemUtils::copyDir(source,target));
UBFileSystemUtils::copyDir(source,target);
else{
QFileInfo fi(target);
QDir d = fi.dir();
d.mkpath(d.absolutePath());
Q_ASSERT(QFile::copy(source, target));
QFile::copy(source, target);
}
}

Loading…
Cancel
Save