| 62 | } |
| 63 | |
| 64 | Widget* WidgetLoader::loadWidget(const char* fileName, const char* widgetId, ui::Widget* widget) |
| 65 | { |
| 66 | std::string buf; |
| 67 | |
| 68 | ResourceFinder rf; |
| 69 | rf.addPath(fileName); |
| 70 | |
| 71 | buf = "widgets/"; |
| 72 | buf += fileName; |
| 73 | rf.includeDataDir(buf.c_str()); |
| 74 | |
| 75 | if (!rf.findFirst()) |
| 76 | throw WidgetNotFound(widgetId); |
| 77 | |
| 78 | widget = loadWidgetFromXmlFile(rf.filename(), widgetId, widget); |
| 79 | if (!widget) |
| 80 | throw WidgetNotFound(widgetId); |
| 81 | |
| 82 | return widget; |
| 83 | } |
| 84 | |
| 85 | Widget* WidgetLoader::loadWidgetFromXmlFile( |
| 86 | const std::string& xmlFilename, |
nothing calls this directly
no test coverage detected