MCPcopy Create free account
hub / github.com/Codeya-IDE/deepin-ide / addProject

Method addProject

src/plugins/recent/mainframe/recentdisplaywidget.cpp:172–190  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

170}
171
172void RecentDisplayWidget::addProject(const QString &kitName,
173 const QString &language,
174 const QString &workspace)
175{
176 QVariantMap item;
177 item.insert(kKitName, kitName);
178 item.insert(kLanguage, language);
179 item.insert(kWorkspace, workspace);
180
181 if (d->recentListView->contains(workspace)) {
182 auto itemList = d->recentListView->projectList();
183 itemList.removeOne(item);
184 itemList.prepend(item);
185 d->recentListView->clearProjects();
186 d->recentListView->setItemList(itemList);
187 } else {
188 d->recentListView->prependItem(item);
189 }
190}
191
192void RecentDisplayWidget::addSession(const QString &session)
193{

Callers

nothing calls this directly

Calls 6

insertMethod · 0.80
clearProjectsMethod · 0.80
prependItemMethod · 0.80
containsMethod · 0.45
projectListMethod · 0.45
setItemListMethod · 0.45

Tested by

no test coverage detected