| 1373 | } |
| 1374 | |
| 1375 | QString DiffTextWindowData::getString(const LineType d3lIdx) const |
| 1376 | { |
| 1377 | assert(!(m_pLineData != nullptr && m_pLineData->empty() && m_size != 0)); |
| 1378 | //Qt sends resize events pre-init under certian conditions. No good way to avoid this. |
| 1379 | if(mDiff3LineVector == nullptr) |
| 1380 | return QString(); |
| 1381 | |
| 1382 | if(m_pLineData == nullptr || m_pLineData->empty() || d3lIdx < 0 || (size_t)d3lIdx >= mDiff3LineVector->size()) |
| 1383 | return QString(); |
| 1384 | |
| 1385 | const Diff3Line* d3l = (*mDiff3LineVector)[d3lIdx]; |
| 1386 | const LineType lineIdx = d3l->getLineIndex(getWindowIndex()); |
| 1387 | |
| 1388 | if(lineIdx == LineRef::invalid) |
| 1389 | return QString(); |
| 1390 | |
| 1391 | return (*m_pLineData)[lineIdx].getLine(); |
| 1392 | } |
| 1393 | |
| 1394 | QString DiffTextWindowData::getLineString(const LineType line) const |
| 1395 | { |
no test coverage detected