From ffa072655df50ba0f6d21d0696750f06abf20e4c Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Sat, 25 Feb 2012 19:23:06 +0100 Subject: Fix compilation of examples with QStringBuilder In sub-attack an interview, one can't make two implicit conversions at once, so explicitly convert to the right type. The change in the torrent example is required because of https://codereview.qt-project.org/16168 (commit 9491272) But in that case, using a QByteArray is better anyway. Change-Id: Ieed22ac7f0d700d5ba5d1e70af3db4dd6c139c8f Reviewed-by: Lars Knoll --- examples/itemviews/interview/model.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples/itemviews/interview') diff --git a/examples/itemviews/interview/model.cpp b/examples/itemviews/interview/model.cpp index 966dc7bfba..3b20f91ed6 100644 --- a/examples/itemviews/interview/model.cpp +++ b/examples/itemviews/interview/model.cpp @@ -95,7 +95,7 @@ QVariant Model::data(const QModelIndex &index, int role) const if (!index.isValid()) return QVariant(); if (role == Qt::DisplayRole) - return "Item " + QString::number(index.row()) + ":" + QString::number(index.column()); + return QVariant("Item " + QString::number(index.row()) + ":" + QString::number(index.column())); if (role == Qt::DecorationRole) { if (index.column() == 0) return iconProvider.icon(QFileIconProvider::Folder); -- cgit v1.2.3