MCPcopy Create free account
hub / github.com/commontk/CTK / readFile

Function readFile

Libs/Widgets/Testing/Cpp/ctkErrorLogModelTestHelper.cpp:172–187  ·  view source on GitHub ↗

-----------------------------------------------------------------------------

Source from the content-addressed store, hash-verified

170
171//-----------------------------------------------------------------------------
172QStringList readFile(const QString& filePath)
173{
174 QStringList lines;
175 QFile file(filePath);
176 if (!file.open(QIODevice::ReadOnly | QIODevice::Text))
177 {
178 return lines;
179 }
180 QTextStream in(&file);
181 while(!in.atEnd())
182 {
183 lines << in.readLine();
184 }
185 file.close();
186 return lines;
187}
188
189//-----------------------------------------------------------------------------
190class LogMessageThread : public QThread

Calls 3

atEndMethod · 0.80
openMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected