MCPcopy Create free account
hub / github.com/WarmUpTill/SceneSwitcher / openSettingsDialog

Function openSettingsDialog

lib/queue/action-queue-tab.cpp:109–136  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

107}
108
109static 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
138static void removeQueuesWithNames(const QStringList &queueNames)
139{

Callers

nothing calls this directly

Calls 5

GetSettingsWindowFunction · 0.50
emptyMethod · 0.45
NameMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected