MCPcopy Create free account
hub / github.com/baumgarr/nixnote2 / create

Method create

gui/plugins/pluginfactory.cpp:47–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

45
46
47QObject *PluginFactory::create(const QString &mimeType, const QUrl &url,
48 const QStringList &argumentNames,
49 const QStringList &argumentValues) const
50{
51 Q_UNUSED(url); // suppress unused variable warning
52 if (mimeType == "application/pdf") {
53 PopplerViewer *view;
54 view = new PopplerViewer(argumentValues[argumentNames.indexOf("type")],
55 argumentValues[argumentNames.indexOf("lid")]);
56
57 if (view->doc == NULL || view->doc->isLocked())
58 return 0;
59 return (QObject*)view;
60 }
61 return 0;
62}

Callers 1

createTableOfContentsMethod · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected