🐛 Fix building with Qt 5.9 (closes #528)

This commit is contained in:
Yen Chi Hsuan 2017-06-02 01:28:39 +08:00 committed by Jonathan White
parent 79ba3a28e6
commit 2b6059dee3

View File

@ -448,7 +448,8 @@ void ModelTest::data()
QVariant textAlignmentVariant = model->data ( model->index ( 0, 0 ), Qt::TextAlignmentRole );
if ( textAlignmentVariant.isValid() ) {
int alignment = textAlignmentVariant.toInt();
QCOMPARE( alignment, ( alignment & ( Qt::AlignHorizontal_Mask | Qt::AlignVertical_Mask ) ) );
QCOMPARE( alignment, static_cast<int>( alignment & ( Qt::AlignHorizontal_Mask
| Qt::AlignVertical_Mask ) ) );
}
// General Purpose roles that should return a QColor