forked from qt-creator/qt-creator
Tests: Fix parsing of gcc version on SuSE
Change-Id: Ieb8b5a1ea998abbd2d3baf13829f81f9d4cc43e5 Reviewed-by: hjk <hjk@theqtcompany.com>
This commit is contained in:
@@ -1067,8 +1067,15 @@ void tst_Dumpers::dumper()
|
||||
if (pos != -1)
|
||||
output = output.left(pos);
|
||||
qDebug() << "Extracting GCC version from: " << output;
|
||||
pos = output.lastIndexOf(' ');
|
||||
output = output.mid(pos + 1);
|
||||
if (output.contains(QByteArray("SUSE Linux"))) {
|
||||
pos = output.indexOf(')');
|
||||
output = output.mid(pos + 1).trimmed();
|
||||
pos = output.indexOf(' ');
|
||||
output = output.left(pos);
|
||||
} else {
|
||||
pos = output.lastIndexOf(' ');
|
||||
output = output.mid(pos + 1);
|
||||
}
|
||||
int pos1 = output.indexOf('.');
|
||||
int major = output.left(pos1++).toInt();
|
||||
int pos2 = output.indexOf('.', pos1 + 1);
|
||||
|
Reference in New Issue
Block a user