| 191 | } |
| 192 | |
| 193 | static void updateVariableStatus(QTableWidget *table) |
| 194 | { |
| 195 | for (int row = 0; row < table->rowCount(); row++) { |
| 196 | auto item = table->item(row, 0); |
| 197 | if (!item) { |
| 198 | continue; |
| 199 | } |
| 200 | |
| 201 | auto weakVariable = GetWeakVariableByQString(item->text()); |
| 202 | auto variable = weakVariable.lock(); |
| 203 | if (!variable) { |
| 204 | continue; |
| 205 | } |
| 206 | |
| 207 | UpdateItemTableRow(table, row, |
| 208 | getCellLabels(variable.get(), false)); |
| 209 | |
| 210 | // Special tooltip handling for the "last used" cell |
| 211 | const auto lastUsedItem = table->item(row, 4); |
| 212 | if (!lastUsedItem) { |
| 213 | continue; |
| 214 | } |
| 215 | const auto lastUsedTooltip = |
| 216 | formatLastChangedTooltip(variable.get()); |
| 217 | lastUsedItem->setToolTip(lastUsedTooltip); |
| 218 | } |
| 219 | } |
| 220 | |
| 221 | static void openSettingsDialog(VariableTable *table) |
| 222 | { |
no test coverage detected