Use QSortFilterProxyModel::filterRegularExpression only with Qt 6

This commit is contained in:
Jonas Kvinge 2020-07-29 21:39:02 +02:00
parent 378251f229
commit d332a6777a
2 changed files with 1 additions and 7 deletions

View File

@ -46,9 +46,6 @@
#include <QUndoStack>
#include <QtEvents>
#include <QSettings>
#if QT_VERSION < QT_VERSION_CHECK(5, 12, 0)
# include <QRegExp>
#endif
#include "core/iconloader.h"
#include "playlist.h"
@ -200,7 +197,7 @@ void PlaylistContainer::SetViewModel(Playlist *playlist) {
emit ViewSelectionModelChanged();
// Update filter
#if QT_VERSION >= QT_VERSION_CHECK(5, 12, 0)
#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
ui_->filter->setText(playlist->proxy()->filterRegularExpression().pattern());
#else
ui_->filter->setText(playlist->proxy()->filterRegExp().pattern());

View File

@ -25,9 +25,6 @@
#include <QRegularExpression>
#include <QAbstractItemModel>
#include <QSortFilterProxyModel>
#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
# include <QRegExp>
#endif
#include "playlist/playlist.h"
#include "playlistfilter.h"