# # # patch "guitone/src/model/InventoryItem.cpp" # from [819aee2fa9a5649212d1ceef90be12760c5a2230] # to [b76305f5557db8c5c251b2fdca465caf4cd43f72] # ============================================================ --- guitone/src/model/InventoryItem.cpp 819aee2fa9a5649212d1ceef90be12760c5a2230 +++ guitone/src/model/InventoryItem.cpp b76305f5557db8c5c251b2fdca465caf4cd43f72 @@ -21,6 +21,7 @@ #include "InventoryItem.h" #include +#include const int InventoryItem::RenamedFrom = 1; const int InventoryItem::RenamedTo = 2; @@ -72,18 +73,6 @@ QString InventoryItem::getLabel() const labelString = label; } - if (!isDirectory()) return labelString; - - int rStatus = getStatusRecursive(); - - if ((rStatus & Added) == Added || - (rStatus & Dropped) == Dropped || - (rStatus & Patched) == Patched || - (rStatus & RenamedFrom) == RenamedFrom || - (rStatus & RenamedTo) == RenamedTo) - { - labelString = labelString.prepend(">"); - } return labelString; } @@ -175,13 +164,9 @@ int InventoryItem::columnCount() const return 2; } -// FIXME: create separate classes for the root item, the -// "cdUp" item and so on... QVariant InventoryItem::data(int column, int role) const { - // we currently only handle the display role - // TODO: what to do here for Qt::DecorationRole? - if(role == Qt::DisplayRole) + if (role == Qt::DisplayRole) { // return column headers for root item if (parentItem == this) @@ -201,9 +186,15 @@ QVariant InventoryItem::data(int column, default: return QVariant(); } } - else if (role == Qt::DecorationRole) + else if (role == Qt::FontRole && column == 0) { - return QVariant(); + QFont font; + font.setBold(false); + if (hasChangedRecursive()) + { + font.setBold(true); + } + return QVariant(font); } else {