From dd6a41fde3ee4922e20335c3c63f44b93ab653b7 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Thu, 16 Oct 2014 18:15:50 +0200 Subject: [PATCH 1/3] fixed duplication issue --- src/core/UBPersistenceManager.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/core/UBPersistenceManager.cpp b/src/core/UBPersistenceManager.cpp index 5600740f..d83b20ee 100644 --- a/src/core/UBPersistenceManager.cpp +++ b/src/core/UBPersistenceManager.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; } From 8b7eb179b788b7190bd93a0dedc733295d0d3e29 Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Thu, 16 Oct 2014 18:16:18 +0200 Subject: [PATCH 2/3] updated version --- OpenBoard.pro | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/OpenBoard.pro b/OpenBoard.pro index df453317..802366b5 100644 --- a/OpenBoard.pro +++ b/OpenBoard.pro @@ -11,7 +11,7 @@ CONFIG += debug_and_release \ VERSION_MAJ = 1 VERSION_MIN = 02 VERSION_TYPE = r # a = alpha, b = beta, rc = release candidate, r = release, other => error -VERSION_PATCH = 05 +VERSION_PATCH = 06 VERSION = "$${VERSION_MAJ}.$${VERSION_MIN}.$${VERSION_TYPE}.$${VERSION_PATCH}" VERSION = $$replace(VERSION, "\\.r", "") From e51a783b742a1dcb10fdd194b909af9c3127c5ed Mon Sep 17 00:00:00 2001 From: Claudio Valerio Date: Thu, 16 Oct 2014 18:24:06 +0200 Subject: [PATCH 3/3] fixed dnd on document mode --- src/gui/UBDocumentTreeWidget.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gui/UBDocumentTreeWidget.cpp b/src/gui/UBDocumentTreeWidget.cpp index 42210db9..7fc34e8f 100644 --- a/src/gui/UBDocumentTreeWidget.cpp +++ b/src/gui/UBDocumentTreeWidget.cpp @@ -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); } }