mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-07 16:45:11 -04:00
Added new button "Open Collection" in TransfersDialog.
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4691 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
031629d528
commit
bab7ebaa5b
10 changed files with 993 additions and 905 deletions
|
@ -21,7 +21,6 @@
|
|||
|
||||
#include <stdexcept>
|
||||
#include <QDesktopServices>
|
||||
#include <QMessageBox>
|
||||
#include <QUrl>
|
||||
#include "RsCollectionFile.h"
|
||||
#include "RsUrlHandler.h"
|
||||
|
@ -30,14 +29,9 @@ bool RsUrlHandler::openUrl(const QUrl& url)
|
|||
{
|
||||
if(url.scheme() == QString("file") && url.toLocalFile().endsWith("."+RsCollectionFile::ExtensionString))
|
||||
{
|
||||
try
|
||||
{
|
||||
RsCollectionFile(url.toLocalFile().toUtf8().constData()).downloadFiles() ;
|
||||
}
|
||||
catch(std::runtime_error& e)
|
||||
{
|
||||
QMessageBox::warning(NULL,QObject::tr("Treatment of collection file has failed."),QObject::tr("The collection file ") + url.toLocalFile() + QObject::tr(" could not be openned. Reported error is: ") + QString::fromStdString(e.what())) ;
|
||||
return false ;
|
||||
RsCollectionFile Collection;
|
||||
if (Collection.load(url.toLocalFile().toUtf8().constData())) {
|
||||
Collection.downloadFiles() ;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue