mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
fixed extension stuff for rscollection
git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4666 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
parent
f77bb8136f
commit
072c6c7e12
@ -916,11 +916,14 @@ void RetroshareDirModel::createCollectionFile(const QModelIndexList &list)
|
|||||||
return ;
|
return ;
|
||||||
}
|
}
|
||||||
|
|
||||||
QString filename = QFileDialog::getSaveFileName(NULL,tr("Create selection file"),".",tr("Collection files")+" (*.rscollection)") ;
|
QString filename ;
|
||||||
|
|
||||||
if(filename.isNull())
|
if(!misc::getSaveFileName(NULL,RshareSettings::LASTDIR_EXTRAFILE,tr("Create selection file"),tr("Collection files")+" (*."+RsCollectionFile::ExtensionString+")",filename))
|
||||||
return ;
|
return ;
|
||||||
|
|
||||||
|
if(!filename.endsWith("."+RsCollectionFile::ExtensionString))
|
||||||
|
filename += "."+RsCollectionFile::ExtensionString ;
|
||||||
|
|
||||||
std::cerr << "Got file name: "<< filename.toStdString() << std::endl;
|
std::cerr << "Got file name: "<< filename.toStdString() << std::endl;
|
||||||
std::vector <DirDetails> dirVec;
|
std::vector <DirDetails> dirVec;
|
||||||
getDirDetailsFromSelect(list, dirVec);
|
getDirDetailsFromSelect(list, dirVec);
|
||||||
|
@ -34,7 +34,7 @@
|
|||||||
#include <QDomElement>
|
#include <QDomElement>
|
||||||
#include <QDomDocument>
|
#include <QDomDocument>
|
||||||
|
|
||||||
const QString RsCollectionFile::ExtensionString = QString(".rscollection") ;
|
const QString RsCollectionFile::ExtensionString = QString("rscollection") ;
|
||||||
|
|
||||||
RsCollectionFile::RsCollectionFile(const QString& filename)
|
RsCollectionFile::RsCollectionFile(const QString& filename)
|
||||||
: _xml_doc("RsCollection")
|
: _xml_doc("RsCollection")
|
||||||
|
@ -28,7 +28,7 @@
|
|||||||
|
|
||||||
bool RsUrlHandler::openUrl(const QUrl& url)
|
bool RsUrlHandler::openUrl(const QUrl& url)
|
||||||
{
|
{
|
||||||
if(url.scheme() == QString("file") && url.toLocalFile().endsWith(RsCollectionFile::ExtensionString))
|
if(url.scheme() == QString("file") && url.toLocalFile().endsWith("."+RsCollectionFile::ExtensionString))
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user