fixed permission of drap+dropped files. all attached files get added to extra list, but with different permission flags depending on the client. From that, we compute sharing permissions : turtle, or direct transfer only

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@5808 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2012-11-11 21:17:00 +00:00
parent 9000cf9034
commit f61a50c5a6
12 changed files with 57 additions and 25 deletions

View file

@ -45,6 +45,7 @@ HashBox::HashBox(QWidget *parent) :
{
dropWidget = NULL;
mAutoHide = false;
mDefaultTransferFlags = TransferRequestFlags(0u) ;
ui->setupUi(this);
}
@ -136,7 +137,7 @@ bool HashBox::eventFilter(QObject* object, QEvent* event)
}
}
addAttachments(files);
addAttachments(files,mDefaultTransferFlags);
dropEvent->setDropAction(Qt::CopyAction);
dropEvent->accept();
@ -150,7 +151,7 @@ bool HashBox::eventFilter(QObject* object, QEvent* event)
return QScrollArea::eventFilter(object, event);
}
void HashBox::addAttachments(const QStringList& files, HashedFile::Flags flag)
void HashBox::addAttachments(const QStringList& files,TransferRequestFlags tfl, HashedFile::Flags flag)
{
/* add a AttachFileItem to the attachment section */
std::cerr << "HashBox::addExtraFile() hashing file." << std::endl;
@ -166,7 +167,7 @@ void HashBox::addAttachments(const QStringList& files, HashedFile::Flags flag)
QStringList::ConstIterator it;
for (it = files.constBegin(); it != files.constEnd(); ++it) {
/* add widget in for new destination */
AttachFileItem* file = new AttachFileItem(*it);
AttachFileItem* file = new AttachFileItem(*it,tfl);
QObject::connect(file, SIGNAL(fileFinished(AttachFileItem*)), this, SLOT(fileFinished(AttachFileItem*)));
HashingInfo hashingInfo;