MCPcopy Create free account
hub / github.com/KDE/kdevelop / init

Method init

kdevplatform/tests/testfile.cpp:41–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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 {

Callers 1

TestFileMethod · 0.45

Calls 5

existsMethod · 0.80
IndexedStringClass · 0.50
PathClass · 0.50
resetMethod · 0.45
projectItemMethod · 0.45

Tested by

no test coverage detected