| 39 | } |
| 40 | |
| 41 | void init(const QString& fileName, const QString& contents, TestProject* _project) |
| 42 | { |
| 43 | file = fileName; |
| 44 | |
| 45 | setFileContents(contents); |
| 46 | |
| 47 | QFileInfo info(file); |
| 48 | Q_ASSERT(info.exists()); |
| 49 | Q_ASSERT(info.isFile()); |
| 50 | url = IndexedString(info.absoluteFilePath()); |
| 51 | |
| 52 | project = _project; |
| 53 | if (project) { |
| 54 | fileItem.reset(new ProjectFileItem(_project, Path(file), _project->projectItem())); |
| 55 | } |
| 56 | } |
| 57 | |
| 58 | void setFileContents(const QString& contents) |
| 59 | { |
no test coverage detected