Skip to content

Commit

Permalink
Fix file dropping sometimes not working
Browse files Browse the repository at this point in the history
  • Loading branch information
cg2121 committed Jan 16, 2025
1 parent 9ac5662 commit 5ac8822
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/soundboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -578,14 +578,14 @@ void Soundboard::dragMoveEvent(QDragMoveEvent *event)
void Soundboard::dropEvent(QDropEvent *event)
{
QStringList supportedExt;
supportedExt << ".mp3" << ".aac" << ".ogg" << ".wav" << ".flac";
supportedExt << "mp3" << "aac" << "ogg" << "wav" << "flac";

foreach(const QUrl &url, event->mimeData()->urls())
{
QString path = url.toLocalFile();
QFileInfo fi(path);
QString name = fi.fileName();
QString ext = QString(".") + fi.completeSuffix();
QString ext = fi.suffix();

if (!supportedExt.contains(ext))
continue;
Expand Down

0 comments on commit 5ac8822

Please sign in to comment.