| 175 | } |
| 176 | |
| 177 | QString catalogKeyForItem(const QTreeWidgetItem* item) { |
| 178 | if (item == nullptr) { |
| 179 | return {}; |
| 180 | } |
| 181 | QString key = item->data(kNameColumn, kCatalogItemRole).toString(); |
| 182 | if (!key.isEmpty()) { |
| 183 | return key; |
| 184 | } |
| 185 | key = item->data(kNameColumn, Qt::UserRole).toString(); |
| 186 | if (!key.isEmpty()) { |
| 187 | return key; |
| 188 | } |
| 189 | return item->data(kNameColumn, kObjectTopicRole).toString(); |
| 190 | } |
| 191 | |
| 192 | void setTopicIconDecoration(QTreeWidgetItem* item, bool is_image_topic, bool is_3d_object_topic, const QString& theme) { |
| 193 | if (item == nullptr) { |
no test coverage detected