diff options
-rw-r--r-- | examples/animation/sub-attaq/pixmapitem.cpp | 4 | ||||
-rw-r--r-- | examples/itemviews/interview/model.cpp | 2 | ||||
-rw-r--r-- | examples/network/torrent/trackerclient.cpp | 4 |
3 files changed, 5 insertions, 5 deletions
diff --git a/examples/animation/sub-attaq/pixmapitem.cpp b/examples/animation/sub-attaq/pixmapitem.cpp index b2061dc06c..077151d708 100644 --- a/examples/animation/sub-attaq/pixmapitem.cpp +++ b/examples/animation/sub-attaq/pixmapitem.cpp @@ -48,9 +48,9 @@ PixmapItem::PixmapItem(const QString &fileName,GraphicsScene::Mode mode, QGraphicsItem * parent) : QGraphicsObject(parent) { if (mode == GraphicsScene::Big) - pix = ":/big/" + fileName; + pix = QPixmap(QStringLiteral(":/big/") + fileName); else - pix = ":/small/" + fileName; + pix = QPixmap(QStringLiteral(":/small/") + fileName); } PixmapItem::PixmapItem(const QString &fileName, QGraphicsScene *scene) : QGraphicsObject(), pix(fileName) 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); diff --git a/examples/network/torrent/trackerclient.cpp b/examples/network/torrent/trackerclient.cpp index 38f9eaf9fd..12f9504b7b 100644 --- a/examples/network/torrent/trackerclient.cpp +++ b/examples/network/torrent/trackerclient.cpp @@ -108,10 +108,10 @@ void TrackerClient::fetchPeerList() // Percent encode the hash QByteArray infoHash = torrentDownloader->infoHash(); - QString encodedSum; + QByteArray encodedSum; for (int i = 0; i < infoHash.size(); ++i) { encodedSum += '%'; - encodedSum += QString::number(infoHash[i], 16).right(2).rightJustified(2, '0'); + encodedSum += QByteArray::number(infoHash[i], 16).right(2).rightJustified(2, '0'); } bool seeding = (torrentDownloader->state() == TorrentClient::Seeding); |