From 49c4e4ac349e5b5696b4f002ffde4cb7158b5f00 Mon Sep 17 00:00:00 2001 From: Aleksei Kanash Date: Wed, 23 May 2012 13:48:14 +0300 Subject: [PATCH 1/3] Fixed copying of video items. --- src/domain/UBGraphicsAudioItem.cpp | 1 + src/domain/UBGraphicsVideoItem.cpp | 2 ++ 2 files changed, 3 insertions(+) diff --git a/src/domain/UBGraphicsAudioItem.cpp b/src/domain/UBGraphicsAudioItem.cpp index d38e27b7..7325a852 100644 --- a/src/domain/UBGraphicsAudioItem.cpp +++ b/src/domain/UBGraphicsAudioItem.cpp @@ -93,6 +93,7 @@ UBItem* UBGraphicsAudioItem::deepCopy() const QUrl audioUrl = this->mediaFileUrl(); UBGraphicsAudioItem *copy = new UBGraphicsAudioItem(audioUrl, parentItem()); + connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), copy, SLOT(activeSceneChanged())); copy->setPos(this->pos()); // copy->setZValue(this->zValue()); diff --git a/src/domain/UBGraphicsVideoItem.cpp b/src/domain/UBGraphicsVideoItem.cpp index 2a87a455..a1b99d29 100644 --- a/src/domain/UBGraphicsVideoItem.cpp +++ b/src/domain/UBGraphicsVideoItem.cpp @@ -67,6 +67,8 @@ UBItem* UBGraphicsVideoItem::deepCopy() const UBGraphicsVideoItem *copy = new UBGraphicsVideoItem(videoUrl, parentItem()); + connect(UBApplication::boardController, SIGNAL(activeSceneChanged()), copy, SLOT(activeSceneChanged())); + copy->setPos(this->pos()); // copy->setZValue(this->zValue()); UBGraphicsItem::assignZValue(copy, this->zValue()); From ceca63c42e8f90f32409eeb068364d207422c3a2 Mon Sep 17 00:00:00 2001 From: Aleksei Kanash Date: Thu, 24 May 2012 17:04:45 +0300 Subject: [PATCH 2/3] SANKORE-519 Runtime error on D'n'D process. Now sankore copy locally stored files correctly. --- src/board/UBLibraryController.cpp | 2 +- src/gui/UBLibraryWidget.cpp | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/src/board/UBLibraryController.cpp b/src/board/UBLibraryController.cpp index addf65cc..5ba57bbb 100644 --- a/src/board/UBLibraryController.cpp +++ b/src/board/UBLibraryController.cpp @@ -155,7 +155,7 @@ void UBLibraryController::routeItem(QString& pItem, QString pMiddleDirectory) } destination = UBFileSystemUtils::normalizeFilePath(destination + "/" + itemToRoute.fileName()); - QFile::copy(pItem, destination); + UBFileSystemUtils::copyFile(QUrl(pItem).toLocalFile(), destination, false); } } diff --git a/src/gui/UBLibraryWidget.cpp b/src/gui/UBLibraryWidget.cpp index f321680d..8b71e022 100644 --- a/src/gui/UBLibraryWidget.cpp +++ b/src/gui/UBLibraryWidget.cpp @@ -362,16 +362,8 @@ void UBLibraryWidget::dropEvent(QDropEvent *event) if (pMimeData->hasUrls()){ QList urlList = pMimeData->urls(); for (int i = 0; i < urlList.size() && i < 32; ++i){ - QString filePath; QString crntPath = urlList.at(i).toString(); - - if(crntPath.startsWith("file:") || crntPath.startsWith("/")){ - filePath = QUrl(crntPath).toLocalFile(); - }else{ - filePath = crntPath; - } - - mLibraryController->importItemOnLibrary(filePath); + mLibraryController->importItemOnLibrary(crntPath); bDropAccepted = true; } } From 1f9ac9680acecf62fc1672c9cd8d7480b7163e41 Mon Sep 17 00:00:00 2001 From: unknown Date: Fri, 25 May 2012 10:43:33 +0200 Subject: [PATCH 3/3] fixed return value --- src/board/UBBoardController.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/board/UBBoardController.cpp b/src/board/UBBoardController.cpp index 5ac4af43..a14330c1 100644 --- a/src/board/UBBoardController.cpp +++ b/src/board/UBBoardController.cpp @@ -1823,8 +1823,7 @@ UBGraphicsWidgetItem *UBBoardController::addW3cWidget(const QUrl &pUrl, const QP tmpItem->widgetWebView()->takeSnapshot().save(snapshotPath, "PNG"); } - - return 0; + return w3cWidgetItem; } void UBBoardController::cut()