MCPcopy Create free account
hub / github.com/MiniZinc/MiniZincIDE / Path

Method Path

MiniZincIDE/profilecompilation.cpp:4–25  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2#include <QFileInfo>
3
4Path::Path(const QString& path)
5{
6 auto items = path.split(';');
7 for (auto& it : items) {
8 auto parts = it.split('|');
9 if (parts.size() < 5) {
10 continue;
11 }
12 Path::Segment segment;
13 QFileInfo fi(parts[0]);
14 segment.filename = fi.canonicalFilePath();
15 segment.firstLine = parts[1].toInt();
16 segment.firstColumn = parts[2].toInt();
17 segment.lastLine = parts[3].toInt();
18 segment.lastColumn = parts[4].toInt();
19 QStringList rest;
20 for (auto i = 5; i < parts.size(); i++) {
21 segment.parts << parts[i];
22 }
23 _segments << segment;
24 }
25}
26
27PathEntry::PathEntry(const QJsonObject& obj) : _path(obj["path"].toString())
28{

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.45

Tested by

no test coverage detected