diff options
author | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-04 18:29:09 +0200 |
---|---|---|
committer | Olivier Goffart <olivier.goffart@nokia.com> | 2010-08-06 11:06:17 +0200 |
commit | 633f3f45e5420663cf4ceadea79e62fea44cd2eb (patch) | |
tree | 1b2c0d8b5dc0746a51c2ea4bf542845273cf7006 /examples/network/torrent/bencodeparser.cpp | |
parent | 7b5e37cab738804d47b78582aa3d0f3bb6933e70 (diff) | |
download | qt4-tools-633f3f45e5420663cf4ceadea79e62fea44cd2eb.tar.gz |
Remove the use of deprecated qVariant*
Test directory untouched.
This just apply those regexp:
git grep -O"sed -i 's/qVariantValue</qvariant_cast</'" qVariantValue
git grep -O"sed -i 's/qVariantSetValue(\([^&*\(),]*\), */\\1.setValue(/'" qVariantSetValue
git grep -O"sed -i 's/qVariantSetValue *<\([^>]*\)> *(\([^&*\(),]*\), */\\2.setValue<\\1>(/'" qVariantSetValue
git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert
git grep -O"sed -i 's/qVariantCanConvert *<\([^>]*\)> *(\([^&*\(),]*([^&*\(),]*)\))/\\2.canConvert<\\1>()/g'" qVariantCanConvert
git grep -O"sed -i 's/qVariantFromValue\( *[(<]\)/QVariant::fromValue\\1/'" qVariantFromValue
git checkout src/corelib/kernal/qvariant*
Rev-by: dev mailing list
Diffstat (limited to 'examples/network/torrent/bencodeparser.cpp')
-rw-r--r-- | examples/network/torrent/bencodeparser.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/network/torrent/bencodeparser.cpp b/examples/network/torrent/bencodeparser.cpp index d6b6078b0e..aa498d6049 100644 --- a/examples/network/torrent/bencodeparser.cpp +++ b/examples/network/torrent/bencodeparser.cpp @@ -171,7 +171,7 @@ bool BencodeParser::getList(QList<QVariant> *list) else if (getList(&tmpList)) tmp << tmpList; else if (getDictionary(&dictionary)) - tmp << qVariantFromValue<QMap<QByteArray, QVariant> >(dictionary); + tmp << QVariant::fromValue<QMap<QByteArray, QVariant> >(dictionary); else { errString = QString("error at index %1").arg(index); return false; @@ -217,7 +217,7 @@ bool BencodeParser::getDictionary(QMap<QByteArray, QVariant> *dictionary) else if (getList(&tmpList)) tmp.insert(key, tmpList); else if (getDictionary(&dictionary)) - tmp.insert(key, qVariantFromValue<QMap<QByteArray, QVariant> >(dictionary)); + tmp.insert(key, QVariant::fromValue<QMap<QByteArray, QVariant> >(dictionary)); else { errString = QString("error at index %1").arg(index); return false; |