MCPcopy Create free account
hub / github.com/baldurk/renderdoc / refreshCurrentHelp

Method refreshCurrentHelp

qrenderdoc/Windows/PythonShell.cpp:1360–1383  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1358}
1359
1360void PythonShell::refreshCurrentHelp()
1361{
1362 PythonContext *context = newImportedDummyContext();
1363
1364 ui->helpText->clear();
1365
1366 QObject::connect(
1367 context, &PythonContext::textOutput,
1368 [this](bool isStdError, const QString &output) { appendText(ui->helpText, output); });
1369
1370 context->executeString(lit(R"(
1371try:
1372 import keyword
1373 if keyword.iskeyword("%1"):
1374 help("%1")
1375 else:
1376 help(%1)
1377except ImportError:
1378 help(%1)
1379)")
1380 .arg(ui->helpSearch->text()));
1381
1382 context->Finish();
1383}
1384
1385void PythonShell::interactive_keypress(QKeyEvent *event)
1386{

Callers

nothing calls this directly

Calls 6

connectFunction · 0.85
executeStringMethod · 0.80
clearMethod · 0.45
argMethod · 0.45
textMethod · 0.45
FinishMethod · 0.45

Tested by

no test coverage detected