From 2aff40fd522eee1b8d65dec3f42d8afe80c3f7cf Mon Sep 17 00:00:00 2001 From: Simon De Backer Date: Tue, 9 Jun 2020 23:07:07 +0200 Subject: [PATCH] fix deprecated warning QTextStream& QTextStreamFunctions::endl(QTextStream&) Use Qt::endl instead QT_DEPRECATED_VERSION_X(5, 15, "Use Qt::endl") --- sources/conductornumexport.cpp | 4 ++++ sources/ui/bomexportdialog.cpp | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/sources/conductornumexport.cpp b/sources/conductornumexport.cpp index fd5abeb04..14a9b3aba 100644 --- a/sources/conductornumexport.cpp +++ b/sources/conductornumexport.cpp @@ -67,7 +67,11 @@ bool ConductorNumExport::toCsv() if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { QTextStream stream(&file); +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // ### Qt 6: remove stream << wiresNum() << endl; +#else + stream << wiresNum() << &Qt::endl(stream); +#endif } else { return false; diff --git a/sources/ui/bomexportdialog.cpp b/sources/ui/bomexportdialog.cpp index 410cd32d8..a73829290 100644 --- a/sources/ui/bomexportdialog.cpp +++ b/sources/ui/bomexportdialog.cpp @@ -151,7 +151,11 @@ int BOMExportDialog::exec() if (file.open(QIODevice::WriteOnly | QIODevice::Text)) { QTextStream stream(&file); +#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) // ### Qt 6: remove stream << getBom() << endl; +#else + stream << getBom() << &Qt::endl(stream); +#endif } } }