void * raw = tr_base64_decode (key.toUtf8().constData(), key.toUtf8().size(), &len);
if (raw)
{
- metainfo.append (static_cast<const char*> (raw), (int) len);
+ metainfo.append (static_cast<const char*> (raw), int(len));
tr_free (raw);
type = METAINFO;
}
{
size_t len;
void * b64 = tr_base64_encode (metainfo.constData(), metainfo.size(), &len);
- ret = QByteArray (static_cast<const char*> (b64), (int) len);
+ ret = QByteArray (static_cast<const char*> (b64), int(len));
tr_free (b64);
}
item->setText (COL_UP, peer.rateToPeer.isZero () ? QString () : Formatter::speedToString (peer.rateToPeer));
item->setText (COL_DOWN, peer.rateToClient.isZero () ? QString () : Formatter::speedToString (peer.rateToClient));
- item->setText (COL_PERCENT, peer.progress > 0 ? QString::fromLatin1 ("%1%").arg ( (int) (peer.progress * 100.0)) : QString ());
+ item->setText (COL_PERCENT, peer.progress > 0 ? QString::fromLatin1 ("%1%").arg(int(peer.progress * 100.0)) : QString ());
item->setText (COL_STATUS, code);
item->setToolTip (COL_STATUS, codeTip);
p.maximum = 100;
p.textAlignment = Qt::AlignCenter;
p.textVisible = true;
- p.progress = (int)(100.0*index.data().toDouble());
+ p.progress = int(100.0*index.data().toDouble());
p.text = QString::fromLatin1 ("%1%").arg (p.progress);
style->drawControl(QStyle::CE_ProgressBar, &p, painter);
}
getSubtreeWantedSize (have, total);
if (total)
- d = have / (double)total;
+ d = have / double(total);
return d;
}
if(index.column() == COL_WANTED)
i |= Qt::ItemIsUserCheckable | Qt::ItemIsTristate;
- return (Qt::ItemFlags)i;
+ return Qt::ItemFlags(i);
}
bool