MCPcopy Create free account
hub / github.com/Nitrux/maui-shell / unPinTask

Method unPinTask

src/code/controllers/task.cpp:219–239  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

217}
218
219void Task::unPinTask()
220{
221 auto tasks = m_modelRoot->pinnedTasks();
222 if(!tasks.contains(m_id))
223 {
224 return;
225 }
226
227 tasks.removeOne(m_id);
228
229 QSettings settings;
230 settings.beginGroup("TaskBar");
231 settings.setValue("Pinned", tasks);
232 settings.endGroup();
233
234 //now chekc if it has a window, if it has then leave it there, otherwise remove it
235 if(m_window == nullptr)
236 {
237 emit this->closed();
238 }
239}

Callers 1

TaskMethod · 0.95

Calls 1

pinnedTasksMethod · 0.80

Tested by

no test coverage detected