mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-05 04:44:19 -04:00
fixed compilation
This commit is contained in:
parent
5071656209
commit
5bc071b03c
6 changed files with 28 additions and 42 deletions
|
@ -497,25 +497,23 @@ void SearchDialog::collCreate()
|
|||
int selectedCount = selectedItems.size() ;
|
||||
QTreeWidgetItem * item ;
|
||||
|
||||
for (int i = 0; i < selectedCount; ++i) {
|
||||
RsFileTree tree;
|
||||
|
||||
for (int i = 0; i < selectedCount; ++i)
|
||||
{
|
||||
item = selectedItems.at(i) ;
|
||||
|
||||
if (!item->text(SR_HASH_COL).isEmpty()) {
|
||||
if (!item->text(SR_HASH_COL).isEmpty())
|
||||
{
|
||||
std::string name = item->text(SR_NAME_COL).toUtf8().constData();
|
||||
RsFileHash hash( item->text(SR_HASH_COL).toStdString() );
|
||||
uint64_t count = item->text(SR_SIZE_COL).toULongLong();
|
||||
|
||||
DirDetails details;
|
||||
details.name = name;
|
||||
details.hash = hash;
|
||||
details.size = count;
|
||||
details.type = DIR_TYPE_FILE;
|
||||
|
||||
dirVec.push_back(details);
|
||||
tree.addFile(tree.root(),name,hash,count);
|
||||
}
|
||||
}
|
||||
|
||||
RsCollection(dirVec,RS_FILE_HINTS_LOCAL).openNewColl(this);
|
||||
RsCollectionDialog::openNewCollection(tree);
|
||||
}
|
||||
|
||||
void SearchDialog::collModif()
|
||||
|
|
|
@ -733,8 +733,25 @@ void SharedFilesDialog::sendLinkTo()
|
|||
|
||||
void SharedFilesDialog::collCreate()
|
||||
{
|
||||
#ifdef TODO
|
||||
QModelIndexList lst = getSelected();
|
||||
model->createCollectionFile(this, lst);
|
||||
|
||||
std::vector <DirDetails> dirVec;
|
||||
model->getDirDetailsFromSelect(lst, dirVec);
|
||||
|
||||
FileSearchFlags f = RemoteMode?RS_FILE_HINTS_REMOTE:RS_FILE_HINTS_LOCAL ;
|
||||
|
||||
QString dir_name;
|
||||
if(!RemoteMode)
|
||||
{
|
||||
if(!dirVec.empty())
|
||||
{
|
||||
const DirDetails& details = dirVec[0];
|
||||
dir_name = QDir(QString::fromUtf8(details.name.c_str())).dirName();
|
||||
}
|
||||
}
|
||||
RsCollection(dirVec,f).openNewColl(parent,dir_name);
|
||||
#endif
|
||||
}
|
||||
|
||||
void SharedFilesDialog::collModif()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue