Fix compilation warnings in smtp.h (cgreco)

This commit is contained in:
Christophe Dumez 2011-06-05 16:08:30 +00:00
parent 53900c386b
commit 02fbd6a135
87 changed files with 11700 additions and 9106 deletions

View file

@ -670,8 +670,9 @@ QString misc::magnetUriToHash(QString magnet_uri) {
int pos = regHex.indexIn(magnet_uri);
if(pos > -1) {
const QString found = regHex.cap(1);
qDebug() << Q_FUNC_INFO << "regex found: " << found;
if(found.length() == 40) {
const sha1_hash sha1(QString(QByteArray::fromHex(regHex.cap(1).toLocal8Bit())).toStdString());
const sha1_hash sha1(QByteArray::fromHex(found.toAscii()).constData());
qDebug("magnetUriToHash (Hex): hash: %s", qPrintable(misc::toQString(sha1)));
return misc::toQString(sha1);
}