kossebau added a comment.

  @mlaurent  Bonne année :) Hm, are we sure that endl is namespaced with Qt:: 
in 5.15 already? Isn't that rather Qt6 only?
  
  For Qt5 `endl` is in the namespace `QTextStreamFunctions` rather, which 
though is also inlined by `using namespace QTextStreamFunctions`, so that 
should still compile, no?
  IMHO this should be rather only ported/touched during Qt6 then. Well, unless 
doing the flush only at the end is an improvement of course.
  
  See 
https://code.qt.io/cgit/qt/qtbase.git/tree/src/corelib/serialization/qtextstream.h:
  
    #if defined(Q_QDOC) || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
    namespace Qt {
    #else
    // This namespace only exists for 'using namespace' declarations.
    namespace QTextStreamFunctions {
    #endif
    // [...]
    Q_CORE_EXPORT QTextStream &endl(QTextStream &s);
    // [...]
    
    } // namespace QTextStreamFunctions
    
    #if QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && !defined(Q_QDOC)
    namespace Qt {
    using namespace QTextStreamFunctions;
    }
    
    QT_WARNING_PUSH
    QT_WARNING_DISABLE_CLANG("-Wheader-hygiene")
    // We use 'using namespace' as that doesn't cause
    // conflicting definitions compiler errors.
    using namespace QTextStreamFunctions;
    QT_WARNING_POP
    #endif // QT_VERSION < QT_VERSION_CHECK(6, 0, 0) && !defined(Q_QDOC)

REPOSITORY
  R269 BluezQt

REVISION DETAIL
  https://phabricator.kde.org/D26320

To: mlaurent, dfaure
Cc: kossebau, apol, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, 
bruns

Reply via email to