Allow compile with Qt 5.5 again

This commit is contained in:
Jonas Kvinge
2019-01-07 19:04:53 +01:00
parent 89e0524f90
commit aeb7e3914e
2 changed files with 9 additions and 1 deletions

View File

@@ -247,7 +247,11 @@ bool StretchHeaderView::RestoreState(const QByteArray& data) {
QDataStream s(data);
#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
s.setVersion(QDataStream::Qt_5_5);
#else
s.setVersion(QDataStream::Qt_5_6);
#endif
int magic_number = 0;
s >> magic_number;
@@ -311,7 +315,11 @@ QByteArray StretchHeaderView::SaveState() const {
visual_indices << logicalIndex(i);
}
#if QT_VERSION < QT_VERSION_CHECK(5, 6, 0)
s.setVersion(QDataStream::Qt_5_5);
#else
s.setVersion(QDataStream::Qt_5_6);
#endif
s << kMagicNumber;