| 3861 | filter.append("libwebcamplugin.so"); |
| 3862 | filter.append("libhunspellplugin.so"); |
| 3863 | foreach (QString fileName, pluginsDir.entryList(filter)) { |
| 3864 | QPluginLoader pluginLoader(pluginsDir.absoluteFilePath(fileName)); |
| 3865 | QObject *plugin = pluginLoader.instance(); |
| 3866 | if (fileName == "libwebcamplugin.so") { |
| 3867 | if (plugin) { |
| 3868 | webcamInterface = qobject_cast<WebCamInterface *>(plugin); |
| 3869 | if (webcamInterface) { |
| 3870 | webcamPluginAvailable = true; |
| 3871 | } |
| 3872 | } else { |
| 3873 | QLOG_ERROR() << tr("Error loading Webcam plugin: ") << pluginLoader.errorString(); |
| 3874 | } |
| 3875 | } |
| 3876 | |
| 3877 | // The Hunspell plugin isn't actually used here. We just use this as a |
| 3878 | // check to be sure that the menu should be available. |
| 3879 | if (fileName == "libhunspellplugin.so") { |
| 3880 | if (plugin) { |
| 3881 | HunspellInterface *hunspellInterface; |
| 3882 | hunspellInterface = qobject_cast<HunspellInterface *>(plugin); |
| 3883 | if (hunspellInterface) { |
| 3884 | hunspellPluginAvailable = true; |
| 3885 | } |
| 3886 | delete hunspellInterface; |
| 3887 | } else { |
| 3888 | QLOG_ERROR() << tr("Error loading Hunspell plugin: ") << pluginLoader.errorString(); |
| 3889 | } |
| 3890 | } |
| 3891 | } |
| 3892 | } |
| 3893 | } |
| 3894 |
nothing calls this directly
no outgoing calls
no test coverage detected