Changeset 14609


Ignore:
Timestamp:
Dec 6, 2015, 5:39:18 PM (6 years ago)
Author:
jordan
Message:

(trivial) silence a few -Wold-style-cast warnings

Location:
trunk/qt
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/AddData.cc

    r14537 r14609  
    5151      if (raw)
    5252        {
    53           metainfo.append (static_cast<const char*> (raw), (int) len);
     53          metainfo.append (static_cast<const char*> (raw), int(len));
    5454          tr_free (raw);
    5555          type = METAINFO;
     
    7373      size_t len;
    7474      void * b64 = tr_base64_encode (metainfo.constData(), metainfo.size(), &len);
    75       ret = QByteArray (static_cast<const char*> (b64), (int) len);
     75      ret = QByteArray (static_cast<const char*> (b64), int(len));
    7676      tr_free (b64);
    7777    }
  • trunk/qt/DetailsDialog.cc

    r14561 r14609  
    914914          item->setText (COL_UP, peer.rateToPeer.isZero () ? QString () : Formatter::speedToString (peer.rateToPeer));
    915915          item->setText (COL_DOWN, peer.rateToClient.isZero () ? QString () : Formatter::speedToString (peer.rateToClient));
    916           item->setText (COL_PERCENT, peer.progress > 0 ? QString::fromLatin1 ("%1%").arg ( (int) (peer.progress * 100.0)) : QString ());
     916          item->setText (COL_PERCENT, peer.progress > 0 ? QString::fromLatin1 ("%1%").arg(int(peer.progress * 100.0)) : QString ());
    917917          item->setText (COL_STATUS, code);
    918918          item->setToolTip (COL_STATUS, codeTip);
  • trunk/qt/FileTreeDelegate.cc

    r14541 r14609  
    6565      p.textAlignment = Qt::AlignCenter;
    6666      p.textVisible = true;
    67       p.progress = (int)(100.0*index.data().toDouble());
     67      p.progress = int(100.0*index.data().toDouble());
    6868      p.text = QString::fromLatin1 ("%1%").arg (p.progress);
    6969      style->drawControl(QStyle::CE_ProgressBar, &p, painter);
  • trunk/qt/FileTreeItem.cc

    r14559 r14609  
    186186  getSubtreeWantedSize (have, total);
    187187  if (total)
    188     d = have / (double)total;
     188    d = have / double(total);
    189189
    190190  return d;
  • trunk/qt/FileTreeModel.cc

    r14559 r14609  
    168168    i |= Qt::ItemIsUserCheckable | Qt::ItemIsTristate;
    169169
    170   return (Qt::ItemFlags)i;
     170  return Qt::ItemFlags(i);
    171171}
    172172
Note: See TracChangeset for help on using the changeset viewer.