Commit 350bd8f9 authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh
Browse files

Debugger: Fix compilation of modeltest



Change-Id: I43d77b0708de2625bf7e5e74b61fea9aa6578576
Reviewed-by: default avatarhjk <hjk121@nokiamail.com>
parent 9c152fce
...@@ -410,29 +410,24 @@ void ModelTest::data() ...@@ -410,29 +410,24 @@ void ModelTest::data()
// General Purpose roles that should return a QString // General Purpose roles that should return a QString
QVariant variant = model->data(model->index(0, 0), Qt::ToolTipRole); QVariant variant = model->data(model->index(0, 0), Qt::ToolTipRole);
if (variant.isValid()) { if (variant.isValid())
Q_ASSERT(qVariantCanConvert<QString>(variant)); Q_ASSERT(variant.canConvert(QVariant::String));
}
variant = model->data(model->index(0, 0), Qt::StatusTipRole); variant = model->data(model->index(0, 0), Qt::StatusTipRole);
if (variant.isValid()) { if (variant.isValid())
Q_ASSERT(qVariantCanConvert<QString>(variant)); Q_ASSERT(variant.canConvert(QVariant::String));
}
variant = model->data(model->index(0, 0), Qt::WhatsThisRole); variant = model->data(model->index(0, 0), Qt::WhatsThisRole);
if (variant.isValid()) { if (variant.isValid())
Q_ASSERT(qVariantCanConvert<QString>(variant)); Q_ASSERT(variant.canConvert(QVariant::String));
}
// General Purpose roles that should return a QSize // General Purpose roles that should return a QSize
variant = model->data(model->index(0, 0), Qt::SizeHintRole); variant = model->data(model->index(0, 0), Qt::SizeHintRole);
if (variant.isValid()) { if (variant.isValid())
Q_ASSERT(qVariantCanConvert<QSize>(variant)); Q_ASSERT(variant.canConvert(QVariant::Size));
}
// General Purpose roles that should return a QFont // General Purpose roles that should return a QFont
QVariant fontVariant = model->data(model->index(0, 0), Qt::FontRole); QVariant fontVariant = model->data(model->index(0, 0), Qt::FontRole);
if (fontVariant.isValid()) { if (fontVariant.isValid())
Q_ASSERT(qVariantCanConvert<QFont>(fontVariant)); Q_ASSERT(fontVariant.canConvert(QVariant::Font));
}
// Check that the alignment is one we know about // Check that the alignment is one we know about
QVariant textAlignmentVariant = model->data(model->index(0, 0), Qt::TextAlignmentRole); QVariant textAlignmentVariant = model->data(model->index(0, 0), Qt::TextAlignmentRole);
...@@ -443,14 +438,12 @@ void ModelTest::data() ...@@ -443,14 +438,12 @@ void ModelTest::data()
// General Purpose roles that should return a QColor // General Purpose roles that should return a QColor
QVariant colorVariant = model->data(model->index(0, 0), Qt::BackgroundColorRole); QVariant colorVariant = model->data(model->index(0, 0), Qt::BackgroundColorRole);
if (colorVariant.isValid()) { if (colorVariant.isValid())
Q_ASSERT(qVariantCanConvert<QColor>(colorVariant)); Q_ASSERT(colorVariant.canConvert(QVariant::Color));
}
colorVariant = model->data(model->index(0, 0), Qt::TextColorRole); colorVariant = model->data(model->index(0, 0), Qt::TextColorRole);
if (colorVariant.isValid()) { if (colorVariant.isValid())
Q_ASSERT(qVariantCanConvert<QColor>(colorVariant)); Q_ASSERT(colorVariant.canConvert(QVariant::Color));
}
// Check that the "check state" is one we know about. // Check that the "check state" is one we know about.
QVariant checkStateVariant = model->data(model->index(0, 0), Qt::CheckStateRole); QVariant checkStateVariant = model->data(model->index(0, 0), Qt::CheckStateRole);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment