Port away from deprecated ::flush

GIT_SILENT
parent 929a7a06
......@@ -36,8 +36,10 @@ namespace KDevelop {
using TextStreamFunction = QTextStream& (*)(QTextStream&);
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
constexpr TextStreamFunction flush = Qt::flush;
constexpr TextStreamFunction endl = Qt::endl;
#else
constexpr TextStreamFunction flush = ::flush;
constexpr TextStreamFunction endl = ::endl;
#endif
......
......@@ -104,7 +104,7 @@ void TestQMakeFile::varResolution()
tmpfile.open();
QTextStream stream(&tmpfile);
stream << fileContents;
stream << flush;
stream.flush();
tmpfile.close();
QMakeFile file(tmpfile.fileName());
......@@ -184,7 +184,7 @@ void TestQMakeFile::libTarget()
tmpfile.open();
QTextStream stream(&tmpfile);
stream << "TARGET = " << target << "\nTEMPLATE = lib\n";
stream << flush;
stream.flush();
tmpfile.close();
QMakeProjectFile file(tmpfile.fileName());
......@@ -220,7 +220,7 @@ void TestQMakeFile::defines()
tmpfile.open();
QTextStream stream(&tmpfile);
stream << fileContents;
stream << flush;
stream.flush();
tmpfile.close();
QMakeProjectFile file(tmpfile.fileName());
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment