if (KIO::NetAccess::download(img, m_tmpThumbFile, this)) {
slotSetImage(m_tmpThumbFile);
/*QPixmap pix(tmpFile);
if (KIO::NetAccess::download(img, m_tmpThumbFile, this)) {
slotSetImage(m_tmpThumbFile);
/*QPixmap pix(tmpFile);
int newHeight = pix.height() * item_image->width() / pix.width();
if (newHeight > 200) {
item_image->setScaledContents(false);
int newHeight = pix.height() * item_image->width() / pix.width();
if (newHeight > 200) {
item_image->setScaledContents(false);
if (saveUrl.isEmpty() || !KIO::NetAccess::stat(srcUrl, entry, this)) return;
KIO::FileCopyJob * getJob = KIO::file_copy(srcUrl, KUrl(saveUrl), -1, KIO::Overwrite);
if (saveUrl.isEmpty() || !KIO::NetAccess::stat(srcUrl, entry, this)) return;
KIO::FileCopyJob * getJob = KIO::file_copy(srcUrl, KUrl(saveUrl), -1, KIO::Overwrite);
getJob->setSourceSize(info.size());
getJob->setProperty("license", item_license->text());
getJob->setProperty("licenseurl", item_license->url());
getJob->setSourceSize(info.size());
getJob->setProperty("license", item_license->text());
getJob->setProperty("licenseurl", item_license->url());
const KUrl filePath = copyJob->destUrl();
#ifdef USE_NEPOMUK
#if KDE_IS_VERSION(4,6,0)
const KUrl filePath = copyJob->destUrl();
#ifdef USE_NEPOMUK
#if KDE_IS_VERSION(4,6,0)
- Nepomuk::Resource res( filePath );
- res.setProperty( Nepomuk::Vocabulary::NIE::license(), (Nepomuk::Variant) job->property("license") );
- res.setProperty( Nepomuk::Vocabulary::NIE::licenseType(), (Nepomuk::Variant) job->property("licenseurl") );
- res.setProperty( Nepomuk::Vocabulary::NDO::copiedFrom(), (Nepomuk::Variant) job->property("originurl") );
- res.setProperty( Nepomuk::Vocabulary::NCO::creator(), (Nepomuk::Variant) job->property("author") );
- //res.setDescription(item_description->toPlainText());
- //res.setProperty( Soprano::Vocabulary::NAO::description(),
+ Nepomuk::Resource res( filePath );
+ res.setProperty( Nepomuk::Vocabulary::NIE::license(), (Nepomuk::Variant) job->property("license") );
+ res.setProperty( Nepomuk::Vocabulary::NIE::licenseType(), (Nepomuk::Variant) job->property("licenseurl") );
+ res.setProperty( Nepomuk::Vocabulary::NDO::copiedFrom(), (Nepomuk::Variant) job->property("originurl") );
+ res.setProperty( Nepomuk::Vocabulary::NCO::creator(), (Nepomuk::Variant) job->property("author") );
+ //res.setDescription(item_description->toPlainText());
+ //res.setProperty( Soprano::Vocabulary::NAO::description(),
- Nepomuk2::Resource res( filePath );
- res.setProperty( Nepomuk2::Vocabulary::NIE::license(), (Nepomuk2::Variant) job->property("license") );
- res.setProperty( Nepomuk2::Vocabulary::NIE::licenseType(), (Nepomuk2::Variant) job->property("licenseurl") );
- res.setProperty( Nepomuk2::Vocabulary::NDO::copiedFrom(), (Nepomuk2::Variant) job->property("originurl") );
- res.setProperty( Nepomuk2::Vocabulary::NCO::creator(), (Nepomuk2::Variant) job->property("author") );
- //res.setDescription(item_description->toPlainText());
- //res.setProperty( Soprano::Vocabulary::NAO::description(),
+ Nepomuk2::Resource res( filePath );
+ res.setProperty( Nepomuk2::Vocabulary::NIE::license(), (Nepomuk2::Variant) job->property("license") );
+ res.setProperty( Nepomuk2::Vocabulary::NIE::licenseType(), (Nepomuk2::Variant) job->property("licenseurl") );
+ res.setProperty( Nepomuk2::Vocabulary::NDO::copiedFrom(), (Nepomuk2::Variant) job->property("originurl") );
+ res.setProperty( Nepomuk2::Vocabulary::NCO::creator(), (Nepomuk2::Variant) job->property("author") );
+ //res.setDescription(item_description->toPlainText());
+ //res.setProperty( Soprano::Vocabulary::NAO::description(),