Added to select and attach multiple files at once

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@3877 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
defnax 2010-11-29 15:21:00 +00:00
parent daef5382c1
commit 313d3eac6a

View File

@ -294,13 +294,10 @@ void CreateChannelMsg::addExtraFile()
std::cerr << std::endl;
// select a file
QString qfile = QFileDialog::getOpenFileName(this, tr("Add Extra File"), "", "", 0,
QFileDialog::DontResolveSymlinks);
std::string filePath = qfile.toUtf8().constData();
if (filePath != "")
{
addAttachment(filePath);
}
QStringList files = QFileDialog::getOpenFileNames(this, tr("Add Extra File"), "", "", 0, QFileDialog::DontResolveSymlinks);
for (QStringList::iterator fileIt = files.begin(); fileIt != files.end(); fileIt++) {
addAttachment((*fileIt).toUtf8().constData());
}
}