| 175 | } |
| 176 | |
| 177 | void TruncateStringFromEnd(QString &name) |
| 178 | { |
| 179 | if(name.length() > 64) |
| 180 | { |
| 181 | QTextBoundaryFinder boundaries(QTextBoundaryFinder::Grapheme, name.data(), name.length()); |
| 182 | boundaries.setPosition(64); |
| 183 | if(!boundaries.isAtBoundary()) |
| 184 | boundaries.toPreviousBoundary(); |
| 185 | int pos = boundaries.position(); |
| 186 | name.resize(pos); |
| 187 | name += lit("..."); |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | QString GetTruncatedResourceName(const ICaptureContext &ctx, ResourceId id) |
| 192 | { |
no test coverage detected