| 1326 | } |
| 1327 | |
| 1328 | void MergeResultWindow::slotJoinDiffs(qint32 firstD3lLineIdx, qint32 lastD3lLineIdx) |
| 1329 | { |
| 1330 | MergeBlockList::iterator i; |
| 1331 | MergeBlockList::iterator iMBLStart = m_mergeBlockList.end(); |
| 1332 | MergeBlockList::iterator iMBLEnd = m_mergeBlockList.end(); |
| 1333 | |
| 1334 | mUndoRec.reset(); |
| 1335 | for(i = m_mergeBlockList.begin(); i != m_mergeBlockList.end(); ++i) |
| 1336 | { |
| 1337 | const MergeBlock& mb = *i; |
| 1338 | if(firstD3lLineIdx >= mb.getIndex() && firstD3lLineIdx < mb.getIndex() + mb.sourceRangeLength()) |
| 1339 | { |
| 1340 | iMBLStart = i; |
| 1341 | } |
| 1342 | if(lastD3lLineIdx >= mb.getIndex() && lastD3lLineIdx < mb.getIndex() + mb.sourceRangeLength()) |
| 1343 | { |
| 1344 | iMBLEnd = i; |
| 1345 | ++iMBLEnd; |
| 1346 | break; |
| 1347 | } |
| 1348 | } |
| 1349 | |
| 1350 | bool bJoined = false; |
| 1351 | for(i = iMBLStart; i != iMBLEnd && i != m_mergeBlockList.end();) |
| 1352 | { |
| 1353 | if(i == iMBLStart) |
| 1354 | { |
| 1355 | ++i; |
| 1356 | } |
| 1357 | else |
| 1358 | { |
| 1359 | iMBLStart->join(*i); |
| 1360 | i = m_mergeBlockList.erase(i); |
| 1361 | bJoined = true; |
| 1362 | } |
| 1363 | } |
| 1364 | if(bJoined) |
| 1365 | { |
| 1366 | iMBLStart->list().clear(); |
| 1367 | // Insert a conflict line as placeholder |
| 1368 | iMBLStart->list().push_back(MergeEditLine(iMBLStart->id3l())); |
| 1369 | } |
| 1370 | setFastSelector(iMBLStart); |
| 1371 | } |
| 1372 | |
| 1373 | void MergeResultWindow::myUpdate(qint32 afterMilliSecs) |
| 1374 | { |
nothing calls this directly
no test coverage detected