diff options
author | Olivier Goffart <ogoffart@woboq.com> | 2012-02-25 19:23:06 +0100 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-02-25 21:30:45 +0100 |
commit | ffa072655df50ba0f6d21d0696750f06abf20e4c (patch) | |
tree | e14a3f397102660ad9fc2df387b32bb50c3b8f8f /examples/network/torrent/trackerclient.cpp | |
parent | d91add71e79dcae45f9cac02f6d3d542afee899c (diff) |
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 <lars.knoll@nokia.com>
Diffstat (limited to 'examples/network/torrent/trackerclient.cpp')
-rw-r--r-- | examples/network/torrent/trackerclient.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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); |