| 107 | } |
| 108 | |
| 109 | static void openSettingsDialog() |
| 110 | { |
| 111 | auto selectedRows = |
| 112 | tabWidget->Table()->selectionModel()->selectedRows(); |
| 113 | if (selectedRows.empty()) { |
| 114 | return; |
| 115 | } |
| 116 | |
| 117 | auto cell = tabWidget->Table()->item(selectedRows.last().row(), 0); |
| 118 | if (!cell) { |
| 119 | return; |
| 120 | } |
| 121 | |
| 122 | auto weakQueue = GetWeakActionQueueByQString(cell->text()); |
| 123 | auto queue = weakQueue.lock(); |
| 124 | if (!queue) { |
| 125 | return; |
| 126 | } |
| 127 | |
| 128 | auto oldName = queue->Name(); |
| 129 | bool accepted = ActionQueueSettingsDialog::AskForSettings( |
| 130 | GetSettingsWindow(), *queue.get()); |
| 131 | if (accepted && oldName != queue->Name()) { |
| 132 | ActionQueueSignalManager::Instance()->Rename( |
| 133 | QString::fromStdString(oldName), |
| 134 | QString::fromStdString(queue->Name())); |
| 135 | } |
| 136 | } |
| 137 | |
| 138 | static void removeQueuesWithNames(const QStringList &queueNames) |
| 139 | { |
nothing calls this directly
no test coverage detected