mirror of
https://github.com/Nheko-Reborn/nheko.git
synced 2024-11-22 03:00:46 +03:00
Allow picking multiple files to upload
This commit is contained in:
parent
409f42b5f1
commit
b0e4841caf
2 changed files with 7 additions and 6 deletions
|
@ -1395,8 +1395,8 @@ You may optionally provide a reason for others to accept your knock:</translatio
|
||||||
<name>InputBar</name>
|
<name>InputBar</name>
|
||||||
<message>
|
<message>
|
||||||
<location filename="../../src/timeline/InputBar.cpp" line="+372"/>
|
<location filename="../../src/timeline/InputBar.cpp" line="+372"/>
|
||||||
<source>Select a file</source>
|
<source>Select file(s)</source>
|
||||||
<translation>Select a file</translation>
|
<translation>Select file(s)</translation>
|
||||||
</message>
|
</message>
|
||||||
<message>
|
<message>
|
||||||
<location line="+0"/>
|
<location line="+0"/>
|
||||||
|
|
|
@ -417,13 +417,14 @@ void
|
||||||
InputBar::openFileSelection()
|
InputBar::openFileSelection()
|
||||||
{
|
{
|
||||||
const QString homeFolder = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
|
const QString homeFolder = QStandardPaths::writableLocation(QStandardPaths::HomeLocation);
|
||||||
const auto fileName =
|
const QStringList fileNames =
|
||||||
QFileDialog::getOpenFileName(nullptr, tr("Select a file"), homeFolder, tr("All Files (*)"));
|
QFileDialog::getOpenFileNames(nullptr, tr("Select file(s)"), homeFolder, tr("All Files (*)"));
|
||||||
|
|
||||||
if (fileName.isEmpty())
|
if (fileNames.isEmpty())
|
||||||
return;
|
return;
|
||||||
|
|
||||||
startUploadFromPath(fileName);
|
for (const auto &fileName : fileNames)
|
||||||
|
startUploadFromPath(fileName);
|
||||||
}
|
}
|
||||||
|
|
||||||
QString
|
QString
|
||||||
|
|
Loading…
Reference in a new issue