fixed compilation

This commit is contained in:
csoler 2024-02-24 20:27:18 +01:00
parent 5071656209
commit 5bc071b03c
6 changed files with 28 additions and 42 deletions

View file

@ -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()

View file

@ -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()