| 45 | |
| 46 | |
| 47 | QObject *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 | } |
no outgoing calls
no test coverage detected