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

Method notifyToInstall

src/plugins/python/python/pythondebug.cpp:144–163  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

142}
143
144void PythonDebug::notifyToInstall()
145{
146 auto winSrv = dpfGetService(WindowService);
147 if (!winSrv)
148 return;
149
150 auto handleInstall = [this](const QString &id) {
151 if (id == kInstallActId) {
152 PIPInstaller installer;
153 InstallInfo info { "", "python", { "debugpy" } };
154 installer.install(d->interpreterPath, info);
155 }
156 };
157
158 QStringList acts { kCancelActId, tr("Cancel"),
159 kInstallActId, tr("Install") };
160 winSrv->notifyWithCallback(2, "Python",
161 tr("You need the corresponding version of the debugger. Please install it and try again."),
162 acts, handleInstall);
163}

Callers

nothing calls this directly

Calls 1

installMethod · 0.45

Tested by

no test coverage detected