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 ;
|
||||
}
|
||||
|
||||
QString filename = QFileDialog::getSaveFileName(NULL,tr("Create selection file"),".",tr("Collection files")+" (*.rscollection)") ;
|
||||
|
||||
if(filename.isNull())
|
||||
QString filename ;
|
||||
|
||||
if(!misc::getSaveFileName(NULL,RshareSettings::LASTDIR_EXTRAFILE,tr("Create selection file"),tr("Collection files")+" (*."+RsCollectionFile::ExtensionString+")",filename))
|
||||
return ;
|
||||
|
||||
if(!filename.endsWith("."+RsCollectionFile::ExtensionString))
|
||||
filename += "."+RsCollectionFile::ExtensionString ;
|
||||
|
||||
std::cerr << "Got file name: "<< filename.toStdString() << std::endl;
|
||||
std::vector <DirDetails> dirVec;
|
||||
getDirDetailsFromSelect(list, dirVec);
|
||||
|
@ -34,7 +34,7 @@
|
||||
#include <QDomElement>
|
||||
#include <QDomDocument>
|
||||
|
||||
const QString RsCollectionFile::ExtensionString = QString(".rscollection") ;
|
||||
const QString RsCollectionFile::ExtensionString = QString("rscollection") ;
|
||||
|
||||
RsCollectionFile::RsCollectionFile(const QString& filename)
|
||||
: _xml_doc("RsCollection")
|
||||
|
@ -28,7 +28,7 @@
|
||||
|
||||
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
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user