Avoid duplicated code by reworking #if-ery around an if/else
Change-Id: I08376d2dfd071989fab9ee18dbb90ab8670ed20f Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>bb10
parent
8d0b5270fa
commit
8d120174e9
|
|
@ -207,18 +207,13 @@ void QTapTestLogger::addIncident(IncidentTypes type, const char *description,
|
|||
);
|
||||
|
||||
outputString(diagnosticsYamlish.data());
|
||||
} else {
|
||||
} else
|
||||
#endif
|
||||
{
|
||||
QTestCharBuffer unparsableDescription;
|
||||
QTest::qt_asprintf(&unparsableDescription,
|
||||
YAML_INDENT "# %s\n", description);
|
||||
QTest::qt_asprintf(&unparsableDescription, YAML_INDENT "# %s\n", description);
|
||||
outputString(unparsableDescription.data());
|
||||
}
|
||||
#else
|
||||
QTestCharBuffer unparsableDescription;
|
||||
QTest::qt_asprintf(&unparsableDescription,
|
||||
YAML_INDENT "# %s\n", description);
|
||||
outputString(unparsableDescription.data());
|
||||
#endif
|
||||
}
|
||||
|
||||
if (file) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue