1
0
mirror of https://github.com/strawberrymusicplayer/strawberry synced 2024-12-15 18:19:33 +01:00

Use QString::SkipEmptyParts for older Qt versions

This commit is contained in:
Jonas Kvinge 2021-03-29 22:45:01 +02:00
parent 84b7fa02bb
commit f63e05b7d4

View File

@ -369,7 +369,11 @@ void OpenInFileManager(const QString path, const QUrl &url) {
QString cmd = setting.value("Exec").toString(); QString cmd = setting.value("Exec").toString();
if (cmd.isEmpty()) break; if (cmd.isEmpty()) break;
cmd = cmd.remove(QRegularExpression("[%][a-z]*( |$)")); cmd = cmd.remove(QRegularExpression("[%][a-z]*( |$)"));
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
command_params = cmd.split(' ', Qt::SkipEmptyParts); command_params = cmd.split(' ', Qt::SkipEmptyParts);
#else
command_params = cmd.split(' ', QString::SkipEmptyParts);
#endif
command = command_params.first(); command = command_params.first();
command_params.removeFirst(); command_params.removeFirst();
} }