# HG changeset patch # User Hasan Yavuz ÖZDERYA # Date 2019-01-22 09:21:51 # Node ID 23909dc96af6da972271944aad426e611a6d493c # Parent 0267a37438e632b05fea257f5c4b7df9483a1b0e make buildable with Qt version smaller then 5.5 ubuntu 14.04 ships with qt 5.2 and this is a relatively small optimisation diff --git a/src/snapshotmanager.cpp b/src/snapshotmanager.cpp --- a/src/snapshotmanager.cpp +++ b/src/snapshotmanager.cpp @@ -1,5 +1,5 @@ /* - Copyright © 2018 Hasan Yavuz Özderya + Copyright © 2019 Hasan Yavuz Özderya This file is part of serialplot. @@ -157,8 +157,16 @@ void SnapshotManager::loadSnapshotFromFi QTextStream ts(&file); QString line; unsigned lineNum = 1; + +#if QT_VERSION >= QT_VERSION_CHECK(5, 5, 0) while (ts.readLineInto(&line)) { +#else + while (true) + { + line = ts.readLine(); + if (line.isNull()) break; +#endif // parse line auto split = line.split(',');