MCPcopy Create free account
hub / github.com/PlotJuggler/PlotJuggler / makeParserDialogProvider

Function makeParserDialogProvider

pj_app/src/DialogPresenter.cpp:30–39  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

28// exist or doesn't expose a dialog. Captures the catalog by reference —
29// callers must keep the catalog alive for the duration of the dialog.
30QueryParserDialogFn makeParserDialogProvider(const ExtensionCatalogService& catalog) {
31 return [&catalog](const std::string& encoding) -> const PJ_dialog_vtable_t* {
32 const auto* parser = catalog.findParserByEncoding(QString::fromStdString(encoding));
33 if (parser == nullptr) {
34 return nullptr;
35 }
36 auto vtable = parser->library.resolveDialogVtable();
37 return vtable ? *vtable : nullptr;
38 };
39}
40
41DataSourceResult contractViolation(const std::string& plugin_name, const std::string& reason) {
42 qCWarning(lcDialogPresenter).noquote() << "Plugin" << QString::fromStdString(plugin_name)

Callers 1

showDataSourceDialogFunction · 0.85

Calls 1

findParserByEncodingMethod · 0.80

Tested by

no test coverage detected