MCPcopy Create free account
hub / github.com/BehaviorTree/Groot / parseFile

Method parseFile

bt_editor/graveyard/model_repository_dialog.cpp:204–227  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

202}
203
204bool ModelsRepositoryDialog::parseFile(const QString &filename, ModelsByFile &models_by_file)
205{
206 bool parse_success = false;
207 QString error_message;
208 QFileInfo file_info(filename);
209
210 if( !file_info.isReadable() )
211 {
212 error_message = "File not readable";
213 }
214 else if( file_info.suffix() == "xml" )
215 {
216 parse_success = parseXML(filename, models_by_file, &error_message);
217 }
218 else{
219 error_message = "Can't be parsed";
220 }
221
222 if( !parse_success )
223 {
224 QMessageBox::warning(nullptr, "Error parsing file", error_message);
225 }
226 return parse_success;
227}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected