Skip to content

Commit 8da973b

Browse files
committed
Compatibility with Qt 5.6
1 parent 7c2c99c commit 8da973b

3 files changed

Lines changed: 4 additions & 4 deletions

File tree

src/hpglparser.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ bool HpglParser::parse(QFile& file)
6666
continue;
6767
}
6868

69-
if (line.back() != ';')
69+
if (line.at(line.size() - 1) != ';')
7070
{
7171
warning(tr("Unknown command: '%1'.")
7272
.arg((line.size() > 20) ? (line.left(20) + "...") : line));

src/src.rc

-800 Bytes
Binary file not shown.

src/utilities.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ QString Utilities::coordinateToString(qint64 coordinate, bool trim)
3636
while (result.size() < 3)
3737
result.prepend('0');
3838

39-
while (trim && !result.isEmpty() && result.back() == '0')
39+
while (trim && !result.isEmpty() && result.at(result.size() - 1) == '0')
4040
result.chop(1);
4141

4242
if (result.isEmpty())
@@ -60,10 +60,10 @@ QString Utilities::doubleToString(double value, int precision, bool trim)
6060

6161
if (trim && result.indexOf('.') > -1)
6262
{
63-
while (result.back() == '0')
63+
while (result.at(result.size() - 1) == '0')
6464
result.chop(1);
6565

66-
if (result.back() == '.')
66+
if (result.at(result.size() - 1) == '.')
6767
result.chop(1);
6868
}
6969

0 commit comments

Comments
 (0)