MCPcopy Create free account
hub / github.com/TeXworks/texworks / treeItemActivated

Method treeItemActivated

src/ScriptManagerWidget.cpp:166–173  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

164}
165
166void ScriptManagerWidget::treeItemActivated(QTreeWidgetItem * item, int /*column*/)
167{
168 if (item->type() == kScriptType) {
169 Tw::Scripting::ScriptObject * so = static_cast<Tw::Scripting::ScriptObject*>(item->data(0, Qt::UserRole).value<void*>());
170 if (so)
171 QDesktopServices::openUrl(QUrl::fromLocalFile(so->getFilename()));
172 }
173}
174
175void ScriptManagerWidget::treeSelectionChanged()
176{

Callers

nothing calls this directly

Calls 3

typeMethod · 0.45
dataMethod · 0.45
getFilenameMethod · 0.45

Tested by

no test coverage detected