Skip to content

Commit 87d5f82

Browse files
radioactivemanjlindgren90
authored andcommitted
1 parent 2ca2eba commit 87d5f82

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/libaudqt/fileopener.cc

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,15 @@ EXPORT void fileopener_show(FileMode mode)
147147
dialog.data(), &QFileDialog::accepted, [dialog, mode, playlist]() {
148148
Index<PlaylistAddItem> files;
149149
for (const QUrl & url : dialog->selectedUrls())
150-
files.append(String(url.toEncoded().constData()));
150+
{
151+
QByteArray encoded_url = url.toEncoded();
152+
153+
#if QT_VERSION < QT_VERSION_CHECK(6, 8, 3)
154+
// Escape brackets manually to workaround QTBUG-134073
155+
encoded_url.replace("[", "%5B").replace("]", "%5D");
156+
#endif
157+
files.append(String(encoded_url.constData()));
158+
}
151159

152160
switch (mode)
153161
{

0 commit comments

Comments
 (0)