| 1107 | |
| 1108 | template<typename BitsType> |
| 1109 | QTreeWidgetItem *addTreeItemFlags(QTreeWidgetItem *parent, const std::string& flagsName, const VkFlags flags, std::string(*const flagToString)(BitsType) ) |
| 1110 | { |
| 1111 | auto flagsItem = addTreeItem(parent, flagsName, flags ? vulkanResources::toHexString(flags) : std::string("none")); |
| 1112 | |
| 1113 | for (typename std::underlying_type<BitsType>::type bit = 0x1; bit != 0; bit <<= 1){ |
| 1114 | const QString bitName = QString::fromStdString(flagToString(static_cast<BitsType>(bit))); |
| 1115 | addTreeItemFlag(flagsItem, bitName, flags & bit); |
| 1116 | } |
| 1117 | |
| 1118 | return flagsItem; |
| 1119 | } |
| 1120 | |
| 1121 | void addVkBool32Item(QStandardItem* parent, const QVariantMap::const_iterator& iterator) |
| 1122 | { |
no test coverage detected