Qt: Fix build with Qt version < 5.14

This commit is contained in:
João Valverde 2023-01-21 12:13:00 +00:00
parent c84a54c82f
commit 133bebb18b
1 changed files with 6 additions and 2 deletions

View File

@ -79,8 +79,12 @@ AStringListListModel(parent)
#endif
while (!ReadFile_authors.atEnd()) {
QStringList entry = ReadFile_authors.readLine().split(",", Qt::SkipEmptyParts);
QString line = ReadFile_authors.readLine();
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
QStringList entry = line.split(",", Qt::SkipEmptyParts);
#else
QStringList entry = QStringList() << line.section(',', 0, 0) << line.section(',', 1, 1);
#endif
if (entry.size() == 2) {
appendRow(entry);
}