From 112d1dc9d7cf969085a7deadf21b6228d958cc26 Mon Sep 17 00:00:00 2001 From: Aleksei Kanash Date: Mon, 1 Oct 2012 11:37:03 +0300 Subject: [PATCH] Add to library action works fine. Added items has icons. --- src/board/UBFeaturesController.cpp | 2 +- src/gui/UBFeaturesWidget.cpp | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/src/board/UBFeaturesController.cpp b/src/board/UBFeaturesController.cpp index 049ee301..afc6026e 100644 --- a/src/board/UBFeaturesController.cpp +++ b/src/board/UBFeaturesController.cpp @@ -750,7 +750,7 @@ void UBFeaturesController::addDownloadedFile(const QUrl &sourceUrl, const QByteA file.write(pData); file.close(); - UBFeature downloadedFeature = UBFeature(dest.getFullVirtualPath() + "/" + fileName, getIcon( filePath ), + UBFeature downloadedFeature = UBFeature(dest.getFullVirtualPath() + "/" + fileName, getIcon( filePath, fileTypeFromUrl(filePath)), fileName, QUrl::fromLocalFile(filePath), FEATURE_ITEM); if (downloadedFeature != UBFeature()) { featuresModel->addItem(downloadedFeature); diff --git a/src/gui/UBFeaturesWidget.cpp b/src/gui/UBFeaturesWidget.cpp index e5e6ab69..c0728127 100644 --- a/src/gui/UBFeaturesWidget.cpp +++ b/src/gui/UBFeaturesWidget.cpp @@ -1044,6 +1044,7 @@ void UBFeatureProperties::onAddToLib() sDownloadFileDesc desc; desc.isBackground = false; desc.modal = false; + desc.dest = sDownloadFileDesc::library; desc.name = QFileInfo( mpElement->getFullPath().toString()).fileName(); qDebug() << desc.name; desc.srcUrl = mpElement->getFullPath().toString();