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

View File

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