equal
deleted
inserted
replaced
96 sl << stream.readLine(); |
96 sl << stream.readLine(); |
97 } |
97 } |
98 xy->rects.clear(); |
98 xy->rects.clear(); |
99 for (int i = 0; i < sl.size(); ++i) |
99 for (int i = 0; i < sl.size(); ++i) |
100 { |
100 { |
101 QRegExp re("x:\\s+(\\d+);\\sy:\\s+(\\d+);\\sw:\\s+(\\d+);\\sh:\\s+(\\d+)"); |
101 QRegExp re("x:\\s*(\\d+);\\sy:\\s*(\\d+);\\sw:\\s*(\\d+);\\sh:\\s*(\\d+)"); |
102 re.indexIn(sl.at(i)); |
102 re.indexIn(sl.at(i)); |
103 QStringList coords = re.capturedTexts(); |
103 QStringList coords = re.capturedTexts(); |
104 qDebug() << sl.at(i) << coords; |
104 qDebug() << sl.at(i) << coords; |
105 if ((coords.size() == 5) && (coords[0].size())) |
105 if ((coords.size() == 5) && (coords[0].size())) |
106 xy->rects.push_back(QRect(coords[1].toInt() / 4, coords[2].toInt() / 4, coords[3].toInt() / 4, coords[4].toInt() / 4)); |
106 xy->rects.push_back(QRect(coords[1].toInt() / 4, coords[2].toInt() / 4, coords[3].toInt() / 4, coords[4].toInt() / 4)); |