I think this code originally intended to call `Qt::flush` but changes in Qt now
make ADL pick the wrong overload. This squashes the warnings below. We cannot
easily switch to the alternative the deprecation warning suggests because it is
unavailable in older versions of Qt.
main.cpp: In function ‘char** parseArgs(int, char**)’:
main.cpp:72:42: warning:
‘QTextStream& QTextStreamFunctions::flush(QTextStream&)’ is deprecated: Use
Qt::flush [-Wdeprecated-declarations]
72 | " unrecognized\n" << flush;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTextStream:1,
from mainwindow.h:19,
from main.cpp:24:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qtextstream.h:294:76: note: declared
here
294 | Q_CORE_EXPORT QT_DEPRECATED_VERSION_X(5, 15, "Use Qt::flush")
QTextStream &flush(QTextStream &s);
|
main.cpp:72:42: warning:
‘QTextStream& QTextStreamFunctions::flush(QTextStream&)’ is deprecated: Use
Qt::flush [-Wdeprecated-declarations]
72 | " unrecognized\n" << flush;
| ^~~~~
In file included from /usr/include/x86_64-linux-gnu/qt5/QtCore/QTextStream:1,
from mainwindow.h:19,
from main.cpp:24:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qtextstream.h:294:76: note: declared
here
294 | Q_CORE_EXPORT QT_DEPRECATED_VERSION_X(5, 15, "Use Qt::flush")
QTextStream &flush(QTextStream &s);
|
csettings.cpp: In function ‘bool loadAttrs(QString, QComboBox*, QComboBox*,
QComboBox*)’:
csettings.cpp:94:35: warning:
‘QTextStream& QTextStreamFunctions::flush(QTextStream&)’ is deprecated: Use
Qt::flush [-Wdeprecated-declarations]
94 | "\" for reading\n" << flush;
| ^~~~~
In file included from qt5/QtCore/qdebug.h:49,
from qt5/QtCore/qcborcommon.h:45,
from qt5/QtCore/qcborvalue.h:45,
from qt5/QtCore/qcborarray.h:43,
from qt5/QtCore/QtCore:38,
from qt5/QtWidgets/QtWidgetsDepends:3,
from qt5/QtWidgets/QtWidgets:3,
from csettings.cpp:16:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qtextstream.h:294:76: note: declared
here
294 | Q_CORE_EXPORT QT_DEPRECATED_VERSION_X(5, 15, "Use Qt::flush")
QTextStream &flush(QTextStream &s);
|
csettings.cpp:94:35: warning:
‘QTextStream& QTextStreamFunctions::flush(QTextStream&)’ is deprecated: Use
Qt::flush [-Wdeprecated-declarations]
94 | "\" for reading\n" << flush;
| ^~~~~
In file included from qt5/QtCore/qdebug.h:49,
from qt5/QtCore/qcborcommon.h:45,
from qt5/QtCore/qcborvalue.h:45,
from qt5/QtCore/qcborarray.h:43,
from qt5/QtCore/QtCore:38,
from qt5/QtWidgets/QtWidgetsDepends:3,
from qt5/QtWidgets/QtWidgets:3,
from csettings.cpp:16:
/usr/include/x86_64-linux-gnu/qt5/QtCore/qtextstream.h:294:76: note: declared
here
294 | Q_CORE_EXPORT QT_DEPRECATED_VERSION_X(5, 15, "Use Qt::flush")
QTextStream &flush(QTextStream &s);
|
file.close();
} else {
errout << "Could not open attribute name file \"" << fileName <<
- "\" for reading\n" << flush;
+ "\" for reading\n";
+ errout.flush();
return true;
}
usage(0);
else {
errout << cmd << " : option -" << ((char) optopt) <<
- " unrecognized\n" << flush;
+ " unrecognized\n";
+ errout.flush();
usage(1);
}
break;