From 313d3eac6a1bb4db57ef9686b8e78c01c46fb54b Mon Sep 17 00:00:00 2001 From: defnax Date: Mon, 29 Nov 2010 15:21:00 +0000 Subject: [PATCH] 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 --- retroshare-gui/src/gui/channels/CreateChannelMsg.cpp | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/retroshare-gui/src/gui/channels/CreateChannelMsg.cpp b/retroshare-gui/src/gui/channels/CreateChannelMsg.cpp index bdb7e9193..7879d3f61 100644 --- a/retroshare-gui/src/gui/channels/CreateChannelMsg.cpp +++ b/retroshare-gui/src/gui/channels/CreateChannelMsg.cpp @@ -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()); + } }