Skip to content

Commit

Permalink
Fix parent compilation issue with Qt4.8
Browse files Browse the repository at this point in the history
  • Loading branch information
jmigual committed Feb 27, 2017
1 parent b165107 commit 0504ffa
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/dialog/savedqueries/savedqueriestablemodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ class SavedQueriesTableModel : public QAbstractTableModel
int columnCount(const QModelIndex& parent = QModelIndex()) const;
bool removeRows(int row, int count, const QModelIndex& parent = QModelIndex());

#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
// Added to avoid compilation error when using Qt4
using QObject::parent;
#endif

public slots:

bool submit() override;
Expand Down
4 changes: 4 additions & 0 deletions src/library/features/maintenance/hiddentablemodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ class HiddenTableModel : public BaseSqlTableModel {
void unhideTracks(const QModelIndexList& indices) final;
Qt::ItemFlags flags(const QModelIndex &index) const final;
CapabilitiesFlags getCapabilities() const final;

#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
using QObject::parent;
#endif
};

#endif
4 changes: 4 additions & 0 deletions src/library/features/maintenance/missingtablemodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,10 @@ class MissingTableModel : public BaseSqlTableModel {
void purgeTracks(const QModelIndexList& indices) final;
Qt::ItemFlags flags(const QModelIndex &index) const final;
CapabilitiesFlags getCapabilities() const final;

#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
using QObject::parent;
#endif
};

#endif
4 changes: 4 additions & 0 deletions src/library/features/playlist/playlisttablemodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ class PlaylistTableModel : public BaseSqlTableModel {
int addTracks(const QModelIndex& index, const QList<QString>& locations) final;
bool isLocked() final;
CapabilitiesFlags getCapabilities() const final;

#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
using QObject::parent;
#endif

private slots:
void playlistChanged(int playlistId);
Expand Down
4 changes: 4 additions & 0 deletions src/library/librarytablemodel.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@ class LibraryTableModel : public BaseSqlTableModel {
// number of successful additions.
int addTracks(const QModelIndex& index, const QList<QString>& locations) final;
TrackModel::CapabilitiesFlags getCapabilities() const final;

#if (QT_VERSION < QT_VERSION_CHECK(5, 0, 0))
using QObject::parent;
#endif
};

#endif

0 comments on commit 0504ffa

Please sign in to comment.