| 144 | } |
| 145 | |
| 146 | void BreakpointView::contextPasteCSV() |
| 147 | { |
| 148 | QString csv = QGuiApplication::clipboard()->text(); |
| 149 | // Skip header |
| 150 | csv = csv.mid(csv.indexOf('\n') + 1); |
| 151 | |
| 152 | for (const QString& line : csv.split('\n')) |
| 153 | { |
| 154 | QStringList fields; |
| 155 | // In order to handle text with commas in them we must wrap values in quotes to mark |
| 156 | // where a value starts and end so that text commas aren't identified as delimiters. |
| 157 | // So matches each quote pair, parse it out, and removes the quotes to get the value. |
| 158 | QRegularExpression eachQuotePair(R"("([^"]|\\.)*")"); |
| 159 | QRegularExpressionMatchIterator it = eachQuotePair.globalMatch(line); |
| 160 | while (it.hasNext()) |
| 161 | { |
| 162 | QRegularExpressionMatch match = it.next(); |
| 163 | QString matchedValue = match.captured(0); |
| 164 | fields << matchedValue.mid(1, matchedValue.length() - 2); |
| 165 | } |
| 166 | m_model->loadBreakpointFromFieldList(fields); |
| 167 | } |
| 168 | } |
| 169 | |
| 170 | void BreakpointView::saveBreakpointsToDebuggerSettings() |
| 171 | { |
nothing calls this directly
no test coverage detected