MCPcopy Create free account
hub / github.com/RetroShare/RetroShare / createCollectionFile

Method createCollectionFile

retroshare-gui/src/gui/RemoteDirModel.cpp:1236–1259  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1234}
1235
1236void RetroshareDirModel::createCollectionFile(QWidget *parent, const QModelIndexList &list)
1237{
1238/* if(RemoteMode)
1239 {
1240 std::cerr << "Cannot create a collection file from remote" << std::endl;
1241 return ;
1242 }*/
1243
1244 std::vector <DirDetails> dirVec;
1245 getDirDetailsFromSelect(list, dirVec);
1246
1247 FileSearchFlags f = RemoteMode?RS_FILE_HINTS_REMOTE:RS_FILE_HINTS_LOCAL ;
1248
1249 QString dir_name;
1250 if(!RemoteMode)
1251 {
1252 if(!dirVec.empty())
1253 {
1254 const DirDetails& details = dirVec[0];
1255 dir_name = QDir(QString::fromUtf8(details.name.c_str())).dirName();
1256 }
1257 }
1258 RsCollection(dirVec,f).openNewColl(parent,dir_name);
1259}
1260
1261void RetroshareDirModel::downloadSelected(const QModelIndexList &list,bool interactive)
1262{

Callers 1

collCreateMethod · 0.80

Calls 3

RsCollectionClass · 0.85
emptyMethod · 0.80
openNewCollMethod · 0.80

Tested by

no test coverage detected