Subversion Repositories Scribus

Compare Revisions

Ignore whitespace Rev 19822 → Rev 19823

/trunk/Scribus/scribus/downloadmanager/scdlmgr.cpp
30,7 → 30,7
delete thread;
}
 
void ScDLManager::addURL(const QUrl &url, bool overwrite, const QString& downloadLocation, const QString& destinationLocation)
void ScDLManager::addURL(const QUrl &url, bool overwrite, const QString& downloadLocation, const QString& destinationLocation, const QString& destinationName)
{
DownloadData d;
d.id=dlID++;
38,6 → 38,7
d.url=url;
d.downloadLocation=downloadLocation;
d.destinationLocation=destinationLocation;
d.destinationName=destinationName;
d.state=DownloadData::New;
fileList.append(d);
 
44,7 → 45,7
thread->addURL(url, overwrite, downloadLocation, destinationLocation);
}
 
void ScDLManager::addURL(const QString &url, bool overwrite, const QString &downloadLocation, const QString& destinationLocation)
void ScDLManager::addURL(const QString &url, bool overwrite, const QString &downloadLocation, const QString& destinationLocation, const QString& destinationName)
{
DownloadData d;
d.id=dlID++;
52,6 → 53,7
d.url=url;
d.downloadLocation=downloadLocation;
d.destinationLocation=destinationLocation;
d.destinationName=destinationName;
d.state=DownloadData::New;
fileList.append(d);
 
68,6 → 70,7
d.url=s;
d.downloadLocation=downloadLocation;
d.destinationLocation=destinationLocation;
d.destinationName="";
d.state=DownloadData::New;
fileList.append(d);
}
146,7 → 149,10
else
{
//qDebug()<<"Need to move"<<i.value().name<<"from"<<i.value().downloadLocation<<"to"<<i.value().destinationLocation;
moveFile(i.value().downloadLocation+i.value().name, i.value().destinationLocation+i.value().name);
QString newName=i.value().name;
if (!i.value().destinationName.isEmpty())
newName=i.value().destinationName;
moveFile(i.value().downloadLocation+i.value().name, i.value().destinationLocation+newName);
}
}
break;
/trunk/Scribus/scribus/downloadmanager/scdlmgr.h
23,8 → 23,8
~ScDLManager();
//TODO: Add download groups so different parts of Scribus can be downloading at the same time
 
void addURL(const QUrl &url, bool overwrite, const QString &downloadLocation, const QString& destinationLocation);
void addURL(const QString &url, bool overwrite, const QString &downloadLocation, const QString& destinationLocation);
void addURL(const QUrl &url, bool overwrite, const QString &downloadLocation, const QString& destinationLocation, const QString& destinationName="");
void addURL(const QString &url, bool overwrite, const QString &downloadLocation, const QString& destinationLocation, const QString& destinationName="");
void addURLs(const QStringList &urlList, bool overwrite, const QString &downloadLocation, const QString& destinationLocation);
void startDownloads();
 
/trunk/Scribus/scribus/ui/resourcemanager.cpp
244,6 → 244,7
d.lang=e.attribute("language");
d.license=e.attribute("license");
d.filetype=e.attribute("filetype");
d.movetofile=e.attribute("movetofilename");
d.type=e.attribute("type").toUpper();
QUrl url(d.url);
if (url.isValid() && !url.isEmpty() && !url.host().isEmpty())
611,7 → 612,7
}
if (filesToDownload.isEmpty())
return;
qDebug()<<filesToDownload;
//qDebug()<<filesToDownload;
downloadButton->setEnabled(false);
downloadList.clear();
downloadProgressBar->setValue(0);
650,7 → 651,7
foreach (QString s, plainURLs)
{
//qDebug()<<"Requesting:"<<d.url+"/"+s;
ScQApp->dlManager()->addURL(d.url+"/"+s, true, ScPaths::downloadDir(), destinationFolder);
ScQApp->dlManager()->addURL(d.url+"/"+s, true, ScPaths::downloadDir(), destinationFolder, d.files);
++dlCount;
}
downloadList.append(d);