- Big code cleanup

- Added a Qwrapper for torrent_handle to make code more readable
This commit is contained in:
Christophe Dumez
2007-08-20 06:29:18 +00:00
parent 5946f20783
commit c9925eddb6
24 changed files with 1560 additions and 1201 deletions

View File

@@ -71,7 +71,7 @@ class PropListDelegate: public QItemDelegate {
float progress = index.data().toDouble()*100.;
snprintf(tmp, MAX_CHAR_TMP, "%.1f", progress);
newopt.rect = opt.rect;
newopt.text = QString(tmp)+"%";
newopt.text = QString::fromUtf8(tmp)+QString::fromUtf8("%");
newopt.progress = (int)progress;
newopt.maximum = 100;
newopt.minimum = 0;
@@ -106,7 +106,7 @@ class PropListDelegate: public QItemDelegate {
painter);
opt.palette.setColor(QPalette::Text, QColor("black"));
painter->setPen(opt.palette.color(cg, QPalette::Text));
painter->drawText(option.rect, Qt::AlignLeft, " "+newopt.currentText);
painter->drawText(option.rect, Qt::AlignLeft, QString::fromUtf8(" ")+newopt.currentText);
break;
}
default:
@@ -175,9 +175,9 @@ class PropListDelegate: public QItemDelegate {
qDebug("Setting combobox value in index: %d", value);
QString color;
if(value) {
color = "green";
color = QString::fromUtf8("green");
} else {
color = "red";
color = QString::fromUtf8("red");
}
unsigned short old_val = index.model()->data(index, Qt::DisplayRole).toInt();
switch(value){