Replace QString::SkipEmptyParts with Qt::SkipEmptyParts on Qt 5.14.0 or higher
This commit is contained in:
parent
5d5723ad58
commit
c35235371a
@ -292,7 +292,11 @@ QString DarwinDemangle(const QString &symbol);
|
||||
|
||||
QString DarwinDemangle(const QString &symbol) {
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList split = symbol.split(' ', Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList split = symbol.split(' ', QString::SkipEmptyParts);
|
||||
#endif
|
||||
QString mangled_function = split[3];
|
||||
return CXXDemangle(mangled_function);
|
||||
|
||||
|
@ -45,7 +45,11 @@ CollectionQuery::CollectionQuery(const QueryOptions &options)
|
||||
// 3) Remove colons which don't correspond to column names.
|
||||
|
||||
// Split on whitespace
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList tokens(options.filter().split(QRegExp("\\s+"), Qt::SkipEmptyParts));
|
||||
#else
|
||||
QStringList tokens(options.filter().split(QRegExp("\\s+"), QString::SkipEmptyParts));
|
||||
#endif
|
||||
QString query;
|
||||
for (QString token : tokens) {
|
||||
token.remove('(');
|
||||
|
@ -156,7 +156,12 @@ QStandardItem *PlaylistListModel::FolderByPath(const QString &path) {
|
||||
// inefficient but maintaining a path -> item map is difficult.
|
||||
QStandardItem *parent = invisibleRootItem();
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
const QStringList parts = path.split('/', Qt::SkipEmptyParts);
|
||||
#else
|
||||
const QStringList parts = path.split('/', QString::SkipEmptyParts);
|
||||
#endif
|
||||
|
||||
for (const QString &part : parts) {
|
||||
QStandardItem *matching_child = nullptr;
|
||||
|
||||
|
@ -202,7 +202,13 @@ void CollectionSettingsPage::Save() {
|
||||
s.setValue("live_scanning", ui_->live_scanning->isChecked());
|
||||
|
||||
QString filter_text = ui_->cover_art_patterns->text();
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList filters = filter_text.split(',', Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList filters = filter_text.split(',', QString::SkipEmptyParts);
|
||||
#endif
|
||||
|
||||
s.setValue("cover_art_patterns", filters);
|
||||
|
||||
s.setValue("cover_album_dir", ui_->checkbox_cover_album_dir->isChecked());
|
||||
|
@ -346,7 +346,13 @@ void TranscodeDialog::Import() {
|
||||
if (path.isEmpty()) return;
|
||||
|
||||
QStringList filenames;
|
||||
|
||||
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
|
||||
QStringList audioTypes = QString(FileView::kFileFilter).split(" ", Qt::SkipEmptyParts);
|
||||
#else
|
||||
QStringList audioTypes = QString(FileView::kFileFilter).split(" ", QString::SkipEmptyParts);
|
||||
#endif
|
||||
|
||||
QDirIterator files(path, audioTypes, QDir::Files | QDir::Readable, QDirIterator::Subdirectories);
|
||||
|
||||
while (files.hasNext()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user