|
|
@ -231,8 +231,8 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata ) |
|
|
|
{ |
|
|
|
{ |
|
|
|
QString previewImageUrl = ":images/libpalette/notFound.png"; |
|
|
|
QString previewImageUrl = ":images/libpalette/notFound.png"; |
|
|
|
|
|
|
|
|
|
|
|
QString widgetsUrl = metadata.value("Url", QString()); |
|
|
|
QString widgetsUrl = QUrl::fromEncoded(metadata["Url"].toAscii()).toString()/*metadata.value("Url", QString())*/; |
|
|
|
QString widgetsThumbsUrl = metadata.value("thumbnailUrl", QString()); |
|
|
|
QString widgetsThumbsUrl = QUrl::fromEncoded(metadata["thumbnailUrl"].toAscii()).toString(); |
|
|
|
|
|
|
|
|
|
|
|
bool isLocal = QFileInfo(widgetsUrl).exists(); |
|
|
|
bool isLocal = QFileInfo(widgetsUrl).exists(); |
|
|
|
|
|
|
|
|
|
|
@ -270,7 +270,10 @@ void UBFeaturesWidget::onDisplayMetadata( QMap<QString,QString> metadata ) |
|
|
|
imageGatherer->get(QUrl(widgetsThumbsUrl), QPoint(0,0), QSize(), false); |
|
|
|
imageGatherer->get(QUrl(widgetsThumbsUrl), QPoint(0,0), QSize(), false); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
UBFeature feature( "/root", QImage(previewImageUrl), QString(), metadata["Url"], FEATURE_ITEM ); |
|
|
|
QString tmp = QUrl::fromEncoded(metadata["Url"].toAscii()).toString(); |
|
|
|
|
|
|
|
qDebug() << tmp; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
UBFeature feature( "/root", QImage(previewImageUrl), QString(), tmp/*metadata["Url"]*/, FEATURE_ITEM ); |
|
|
|
feature.setMetadata( metadata ); |
|
|
|
feature.setMetadata( metadata ); |
|
|
|
|
|
|
|
|
|
|
|
centralWidget->showElement(feature, UBFeaturesCentralWidget::FeaturePropertiesList); |
|
|
|
centralWidget->showElement(feature, UBFeaturesCentralWidget::FeaturePropertiesList); |
|
|
@ -299,8 +302,8 @@ void UBFeaturesWidget::onPreviewLoaded(int id, bool pSuccess, QUrl sourceUrl, QU |
|
|
|
void UBFeaturesWidget::onAddDownloadedFileToLibrary(bool pSuccess, QUrl sourceUrl, QString pContentHeader, QByteArray pData) |
|
|
|
void UBFeaturesWidget::onAddDownloadedFileToLibrary(bool pSuccess, QUrl sourceUrl, QString pContentHeader, QByteArray pData) |
|
|
|
{ |
|
|
|
{ |
|
|
|
Q_UNUSED(pContentHeader) |
|
|
|
Q_UNUSED(pContentHeader) |
|
|
|
|
|
|
|
|
|
|
|
if (pSuccess) { |
|
|
|
if (pSuccess) { |
|
|
|
|
|
|
|
qDebug() << pData.length(); |
|
|
|
controller->addDownloadedFile(sourceUrl, pData); |
|
|
|
controller->addDownloadedFile(sourceUrl, pData); |
|
|
|
controller->refreshModels(); |
|
|
|
controller->refreshModels(); |
|
|
|
} |
|
|
|
} |
|
|
|