mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-07-22 22:21:09 -04:00
simplified usage of RsCollectionDialog in shared files (removed duplicate functionality)
This commit is contained in:
parent
2ed72a146b
commit
31c390aa27
4 changed files with 86 additions and 43 deletions
|
@ -21,16 +21,13 @@
|
|||
#include <stdexcept>
|
||||
#include <QDesktopServices>
|
||||
#include <QUrl>
|
||||
#include "RsCollection.h"
|
||||
#include "RsCollectionDialog.h"
|
||||
#include "RsUrlHandler.h"
|
||||
|
||||
bool RsUrlHandler::openUrl(const QUrl& url)
|
||||
{
|
||||
if(url.scheme() == QString("file") && url.toLocalFile().endsWith("."+RsCollection::ExtensionString))
|
||||
{
|
||||
RsCollection::RsCollectionErrorCode err;
|
||||
RsCollection(url.toLocalFile(),err).downloadFiles() ;
|
||||
return true;
|
||||
}
|
||||
return RsCollectionDialog::openExistingCollection(url.toLocalFile());
|
||||
|
||||
return QDesktopServices::openUrl(url) ;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue