Commit b0d72f59 authored by Laurent Montel's avatar Laurent Montel 😁

Remove some deprecated method

parent 703484d6
......@@ -384,27 +384,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()) {
Q_ASSERT(qVariantCanConvert<QString>(variant));
Q_ASSERT(variant.canConvert<QString>());
}
variant = model->data(model->index(0, 0), Qt::StatusTipRole);
if (variant.isValid()) {
Q_ASSERT(qVariantCanConvert<QString>(variant));
Q_ASSERT(variant.canConvert<QString>());
}
variant = model->data(model->index(0, 0), Qt::WhatsThisRole);
if (variant.isValid()) {
Q_ASSERT(qVariantCanConvert<QString>(variant));
Q_ASSERT(variant.canConvert<QString>());
}
// General Purpose roles that should return a QSize
variant = model->data(model->index(0, 0), Qt::SizeHintRole);
if (variant.isValid()) {
Q_ASSERT(qVariantCanConvert<QSize>(variant));
Q_ASSERT(variant.canConvert<QSize>());
}
// General Purpose roles that should return a QFont
QVariant fontVariant = model->data(model->index(0, 0), Qt::FontRole);
if (fontVariant.isValid()) {
Q_ASSERT(qVariantCanConvert<QFont>(fontVariant));
Q_ASSERT(fontVariant.canConvert<QFont>());
}
// Check that the alignment is one we know about
......@@ -427,12 +427,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()) {
Q_ASSERT(qVariantCanConvert<QColor>(colorVariant));
Q_ASSERT(colorVariant.canConvert<QColor>());
}
colorVariant = model->data(model->index(0, 0), Qt::TextColorRole);
if (colorVariant.isValid()) {
Q_ASSERT(qVariantCanConvert<QColor>(colorVariant));
Q_ASSERT(colorVariant.canConvert<QColor>());
}
// Check that the "check state" is one we know about.
......
......@@ -171,7 +171,7 @@ void KDHorizontalLine::paintEvent(QPaintEvent *e)
}
style()->drawItemText(&paint, r, Qt::TextShowMnemonic | Qt::AlignHCenter | va, palette(),
isEnabled(), mTitle);
paint.setClipRegion(e->region().subtract(r)); // clip everything but title
paint.setClipRegion(e->region().subtracted(r)); // clip everything but title
}
drawFrame(&paint);
}
......
......@@ -102,7 +102,7 @@ Kleo::KeyListView::KeyListView(const ColumnStrategy *columnStrategy, const Displ
for (int col = 0; !columnStrategy->title(col).isEmpty(); ++col) {
headerItem()->setText(col, columnStrategy->title(col));
header()->resizeSection(col, columnStrategy->width(col, fm));
header()->setResizeMode(col, columnStrategy->resizeMode(col));
header()->setSectionResizeMode(col, columnStrategy->resizeMode(col));
}
setAllColumnsShowFocus(true);
......
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