| 211 | } |
| 212 | |
| 213 | bool 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 | |
| 243 | bool JSPluginModuleSpec::validateMenuTypeModule() |
| 244 | { |