MCPcopy Create free account
hub / github.com/altairwei/WizNotePlus / validateEditorTypeModule

Method validateEditorTypeModule

src/jsplugin/JSPluginSpec.cpp:213–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

211}
212
213bool JSPluginModuleSpec::validateEditorTypeModule()
214{
215 if (m_moduleType != "Editor")
216 return false;
217
218 bool isAllScriptValid = std::all_of(m_scriptFiles.begin(), m_scriptFiles.end(),
219 [this](const QString &scriptFile) {
220 QFileInfo script(scriptFile);
221 if (!script.exists()) {
222 warn(QString("Script file '%1' does not exist.").arg(scriptFile));
223 return false;
224 } else {
225 return true;
226 }
227 });
228
229 bool isAllStyleValid = std::all_of(m_styleFiles.begin(), m_styleFiles.end(),
230 [this](const QString &styleFile){
231 QFileInfo style(styleFile);
232 if (!style.exists()) {
233 warn(QString("Style file '%1' does not exist.").arg(styleFile));
234 return false;
235 } else {
236 return false;
237 }
238 });
239
240 return isAllScriptValid && isAllScriptValid;
241}
242
243bool JSPluginModuleSpec::validateMenuTypeModule()
244{

Callers

nothing calls this directly

Calls 3

beginMethod · 0.80
endMethod · 0.80
QStringClass · 0.50

Tested by

no test coverage detected