MCPcopy Create free account
hub / github.com/KDAB/KDChart / splitLine

Function splitLine

examples/tools/TableModel.cpp:110–126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

108}
109
110static QStringList splitLine(const QString &line)
111{
112 QStringList sl = line.split(QLatin1Char(','));
113 QStringList ret;
114 for (int i = 0; i < sl.size(); i++) {
115 // get rid of leading and trailing whitespace and quotes
116 QString s = sl.at(i).simplified();
117 if (s.startsWith(QLatin1Char('\"'))) {
118 s.remove(0, 1);
119 }
120 if (s.endsWith(QLatin1Char('\"'))) {
121 s.remove(s.length() - 1, 1);
122 }
123 ret.append(s);
124 }
125 return ret;
126}
127
128bool TableModel::loadFromCSV(const QString &filename)
129{

Callers 1

loadFromCSVMethod · 0.85

Calls 2

sizeMethod · 0.80
lengthMethod · 0.80

Tested by

no test coverage detected