fix deprecated warning QTextStream& QTextStreamFunctions::endl(QTextStream&)

Use Qt::endl instead

QT_DEPRECATED_VERSION_X(5, 15, "Use Qt::endl")
This commit is contained in:
Simon De Backer 2020-06-09 23:07:07 +02:00 committed by Laurent Trinques
parent c97a239c29
commit 2aff40fd52
2 changed files with 8 additions and 0 deletions

View File

@ -67,7 +67,11 @@ bool ConductorNumExport::toCsv()
if (file.open(QIODevice::WriteOnly | QIODevice::Text)) if (file.open(QIODevice::WriteOnly | QIODevice::Text))
{ {
QTextStream stream(&file); QTextStream stream(&file);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // ### Qt 6: remove
stream << wiresNum() << endl; stream << wiresNum() << endl;
#else
stream << wiresNum() << &Qt::endl(stream);
#endif
} }
else { else {
return false; return false;

View File

@ -151,7 +151,11 @@ int BOMExportDialog::exec()
if (file.open(QIODevice::WriteOnly | QIODevice::Text)) if (file.open(QIODevice::WriteOnly | QIODevice::Text))
{ {
QTextStream stream(&file); QTextStream stream(&file);
#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // ### Qt 6: remove
stream << getBom() << endl; stream << getBom() << endl;
#else
stream << getBom() << &Qt::endl(stream);
#endif
} }
} }
} }