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

Function foreach

nixnote.cpp:3863–3891  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected