examples: avoid int -> QChar conversions
They're being made explicit/deprecated/removed. Change-Id: I61d8c40dc86035813b85724beb21a65b6f8dffef Reviewed-by: Paul Wicking <paul.wicking@qt.io>
This commit is contained in:
parent
0fda43cf33
commit
693c28b9fb
@ -632,7 +632,7 @@ void decode_pos(const QString &pos, int *row, int *col)
|
||||
|
||||
QString encode_pos(int row, int col)
|
||||
{
|
||||
return QString(col + 'A') + QString::number(row + 1);
|
||||
return QString(char16_t(col + 'A')) + QString::number(row + 1);
|
||||
}
|
||||
|
||||
|
||||
|
@ -204,7 +204,7 @@ void XbelTree::parseFolderElement(const QDomElement &element,
|
||||
} else if (child.tagName() == QLatin1String("separator")) {
|
||||
QTreeWidgetItem *childItem = createItem(child, item);
|
||||
childItem->setFlags(item->flags() & ~(Qt::ItemIsSelectable | Qt::ItemIsEditable));
|
||||
childItem->setText(0, QString(30, 0xB7));
|
||||
childItem->setText(0, QString(30, u'\xB7'));
|
||||
}
|
||||
child = child.nextSiblingElement();
|
||||
}
|
||||
|
@ -129,7 +129,7 @@ void XbelReader::readSeparator(QTreeWidgetItem *item)
|
||||
|
||||
QTreeWidgetItem *separator = createChildItem(item);
|
||||
separator->setFlags(item->flags() & ~Qt::ItemIsSelectable);
|
||||
separator->setText(0, QString(30, 0xB7));
|
||||
separator->setText(0, QString(30, u'\xB7'));
|
||||
xml.skipCurrentElement();
|
||||
}
|
||||
//! [5]
|
||||
|
Loading…
x
Reference in New Issue
Block a user