Commit 112d1dc9 authored by Aleksei Kanash's avatar Aleksei Kanash

Add to library action works fine.

Added items has icons.
parent 9ae7c579
...@@ -750,7 +750,7 @@ void UBFeaturesController::addDownloadedFile(const QUrl &sourceUrl, const QByteA ...@@ -750,7 +750,7 @@ void UBFeaturesController::addDownloadedFile(const QUrl &sourceUrl, const QByteA
file.write(pData); file.write(pData);
file.close(); 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); fileName, QUrl::fromLocalFile(filePath), FEATURE_ITEM);
if (downloadedFeature != UBFeature()) { if (downloadedFeature != UBFeature()) {
featuresModel->addItem(downloadedFeature); featuresModel->addItem(downloadedFeature);
......
...@@ -1044,6 +1044,7 @@ void UBFeatureProperties::onAddToLib() ...@@ -1044,6 +1044,7 @@ void UBFeatureProperties::onAddToLib()
sDownloadFileDesc desc; sDownloadFileDesc desc;
desc.isBackground = false; desc.isBackground = false;
desc.modal = false; desc.modal = false;
desc.dest = sDownloadFileDesc::library;
desc.name = QFileInfo( mpElement->getFullPath().toString()).fileName(); desc.name = QFileInfo( mpElement->getFullPath().toString()).fileName();
qDebug() << desc.name; qDebug() << desc.name;
desc.srcUrl = mpElement->getFullPath().toString(); desc.srcUrl = mpElement->getFullPath().toString();
......
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