MCPcopy Create free account
hub / github.com/KDE/kdevelop / executeOnRemoteDevice

Method executeOnRemoteDevice

plugins/flatpak/flatpakplugin.cpp:260–283  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

258}
259
260void FlatpakPlugin::executeOnRemoteDevice()
261{
262 const auto runtime = qobject_cast<FlatpakRuntime*>(ICore::self()->runtimeController()->currentRuntime());
263 Q_ASSERT(runtime);
264
265 KConfigGroup group(KSharedConfig::openConfig(), QStringLiteral("Flatpak"));
266 const QString lastDeviceAddress = group.readEntry("DeviceAddress");
267 const QString host = QInputDialog::getText(
268 ICore::self()->uiController()->activeMainWindow(), i18nc("@title:window", "Choose Tag Name"),
269 i18nc("@label:textbox", "Device hostname:"),
270 QLineEdit::Normal, lastDeviceAddress
271 );
272 if (host.isEmpty())
273 return;
274 group.writeEntry("DeviceAddress", host);
275
276 auto* file = new QTemporaryFile(QStandardPaths::writableLocation(QStandardPaths::CacheLocation) + QLatin1Char('/') + runtime->name() + QLatin1String("XXXXXX.flatpak"));
277 file->open();
278 file->close();
279 auto job = runtime->executeOnDevice(host, file->fileName());
280 file->setParent(file);
281
282 ICore::self()->runController()->registerJob(job);
283}
284
285#include "flatpakplugin.moc"
286#include "moc_flatpakplugin.cpp"

Callers

nothing calls this directly

Calls 15

currentRuntimeMethod · 0.80
runtimeControllerMethod · 0.80
readEntryMethod · 0.80
uiControllerMethod · 0.80
writeEntryMethod · 0.80
executeOnDeviceMethod · 0.80
registerJobMethod · 0.80
runControllerMethod · 0.80
activeMainWindowMethod · 0.45
isEmptyMethod · 0.45
nameMethod · 0.45
openMethod · 0.45

Tested by

no test coverage detected