| 1234 | } |
| 1235 | |
| 1236 | void 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 | |
| 1261 | void RetroshareDirModel::downloadSelected(const QModelIndexList &list,bool interactive) |
| 1262 | { |
no test coverage detected