Allow picking multiple files to upload

This commit is contained in:
Sateallia 2023-04-25 17:50:00 +00:00 committed by Nicolas Werner
parent 409f42b5f1
commit b0e4841caf
No known key found for this signature in database
GPG key ID: C8D75E610773F2D9
2 changed files with 7 additions and 6 deletions

View file

@ -1395,8 +1395,8 @@ You may optionally provide a reason for others to accept your knock:</translatio
<name>InputBar</name>
<message>
<location filename="../../src/timeline/InputBar.cpp" line="+372"/>
<source>Select a file</source>
<translation>Select a file</translation>
<source>Select file(s)</source>
<translation>Select file(s)</translation>
</message>
<message>
<location line="+0"/>

View file

@ -417,13 +417,14 @@ void
InputBar::openFileSelection()
{
const QString homeFolder = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
const auto fileName =
QFileDialog::getOpenFileName(nullptr, tr("Select a file"), homeFolder, tr("All Files (*)"));
const QStringList fileNames =
QFileDialog::getOpenFileNames(nullptr, tr("Select file(s)"), homeFolder, tr("All Files (*)"));
if (fileName.isEmpty())
if (fileNames.isEmpty())
return;
startUploadFromPath(fileName);
for (const auto &fileName : fileNames)
startUploadFromPath(fileName);
}
QString