mirror of
https://github.com/keepassxreboot/keepassxc.git
synced 2024-12-26 15:59:50 -05:00
Don't use deprecated Qt methods.
This commit is contained in:
parent
ddd5e8a209
commit
5d46ecdbe6
@ -418,27 +418,27 @@ void ModelTest::data()
|
||||
// General Purpose roles that should return a QString
|
||||
QVariant variant = model->data ( model->index ( 0, 0 ), Qt::ToolTipRole );
|
||||
if ( variant.isValid() ) {
|
||||
QVERIFY( qVariantCanConvert<QString> ( variant ) );
|
||||
QVERIFY( variant.canConvert<QString>() );
|
||||
}
|
||||
variant = model->data ( model->index ( 0, 0 ), Qt::StatusTipRole );
|
||||
if ( variant.isValid() ) {
|
||||
QVERIFY( qVariantCanConvert<QString> ( variant ) );
|
||||
QVERIFY( variant.canConvert<QString>() );
|
||||
}
|
||||
variant = model->data ( model->index ( 0, 0 ), Qt::WhatsThisRole );
|
||||
if ( variant.isValid() ) {
|
||||
QVERIFY( qVariantCanConvert<QString> ( variant ) );
|
||||
QVERIFY( variant.canConvert<QString>() );
|
||||
}
|
||||
|
||||
// General Purpose roles that should return a QSize
|
||||
variant = model->data ( model->index ( 0, 0 ), Qt::SizeHintRole );
|
||||
if ( variant.isValid() ) {
|
||||
QVERIFY( qVariantCanConvert<QSize> ( variant ) );
|
||||
QVERIFY( variant.canConvert<QSize>() );
|
||||
}
|
||||
|
||||
// General Purpose roles that should return a QFont
|
||||
QVariant fontVariant = model->data ( model->index ( 0, 0 ), Qt::FontRole );
|
||||
if ( fontVariant.isValid() ) {
|
||||
QVERIFY( qVariantCanConvert<QFont> ( fontVariant ) );
|
||||
QVERIFY( fontVariant.canConvert<QFont>() );
|
||||
}
|
||||
|
||||
// Check that the alignment is one we know about
|
||||
@ -451,12 +451,12 @@ void ModelTest::data()
|
||||
// General Purpose roles that should return a QColor
|
||||
QVariant colorVariant = model->data ( model->index ( 0, 0 ), Qt::BackgroundColorRole );
|
||||
if ( colorVariant.isValid() ) {
|
||||
QVERIFY( qVariantCanConvert<QColor> ( colorVariant ) );
|
||||
QVERIFY( colorVariant.canConvert<QColor>() );
|
||||
}
|
||||
|
||||
colorVariant = model->data ( model->index ( 0, 0 ), Qt::TextColorRole );
|
||||
if ( colorVariant.isValid() ) {
|
||||
QVERIFY( qVariantCanConvert<QColor> ( colorVariant ) );
|
||||
QVERIFY( colorVariant.canConvert<QColor>() );
|
||||
}
|
||||
|
||||
// Check that the "check state" is one we know about.
|
||||
|
Loading…
Reference in New Issue
Block a user