<table><tr><td style="">kossebau added a comment.
</td><a style="text-decoration: none; padding: 4px 8px; margin: 0 8px 8px; float: right; color: #464C5C; font-weight: bold; border-radius: 3px; background-color: #F7F7F9; background-image: linear-gradient(to bottom,#fff,#f1f0f1); display: inline-block; border: 1px solid rgba(71,87,120,.2);" href="https://phabricator.kde.org/D26320">View Revision</a></tr></table><br /><div><div><p>Thanks. Okay, so the old symbol is still there, and with that info I looked some more, and indeed the ::endl symbol is not declared in the header qtextstream.h, but only defined (and exported) in the source file qtextstream.cpp. Having 3 variants now not make sense to me on first look, but perhaps a result of some incomplete approach in Qt 5.14... oh well...</p>

<p>For Okteta I now went for this approach, which I find more elegant:</p>

<div class="remarkup-code-block" style="margin: 12px 0;" data-code-lang="text" data-sigil="remarkup-code-block"><pre class="remarkup-code" style="font: 11px/15px "Menlo", "Consolas", "Monaco", monospace; padding: 12px; margin: 0; background: rgba(71, 87, 120, 0.08);">using TextStreamFunction = QTextStream& (*)(QTextStream&);
#if QT_VERSION >= QT_VERSION_CHECK(5, 15, 0)
constexpr TextStreamFunction endl = Qt::endl;
#else
constexpr TextStreamFunction endl = ::endl;
#endif</pre></div>

<p>No extra namespace here, as all code is already in some Okteta namespace, so the lines with the <tt style="background: #ebebeb; font-size: 13px;">endl</tt> do not even have to be touched :)</p>

<p>Whether <tt style="background: #ebebeb; font-size: 13px;">endl</tt> is a proper call in such places is left for another investigation on its own.</p>

<blockquote style="border-left: 3px solid #8C98B8;
          color: #6B748C;
          font-style: italic;
          margin: 4px 0 12px 0;
          padding: 8px 12px;
          background-color: #F8F9FC;">
<div style="font-style: normal;
          padding-bottom: 4px;">In <a href="https://phabricator.kde.org/D26320#585916" style="background-color: #e7e7e7;
          border-color: #e7e7e7;
          border-radius: 3px;
          padding: 0 4px;
          font-weight: bold;
          color: black;text-decoration: none;">D26320#585916</a>, <a href="https://phabricator.kde.org/p/dfaure/" style="
              border-color: #f1f7ff;
              color: #19558d;
              background-color: #f1f7ff;
                border: 1px solid transparent;
                border-radius: 3px;
                font-weight: bold;
                padding: 0 4px;">@dfaure</a> wrote:</div>
<div style="margin: 0;
          padding: 0;
          border: 0;
          color: rgb(107, 116, 140);"><p>I don't think a code generator needs to flush() many times along the way anyway. \n actually sounds more efficient.</p></div>
</blockquote>

<p>Do Qt experts have some numbers on the sizes before which flush() makes sense in general? I guess it varies on the actual QIODevice, and then with QFile perhaps on the actual filesystem/kernel/whatever?</p>

<p>Also surprised to see the implementation do a ¸writeBuffer.replace(QLatin1Char('\n'), QLatin1String("\r\n"));¸for windows where I expected <tt style="background: #ebebeb; font-size: 13px;">endl</tt> itself to care for it...</p></div></div><br /><div><strong>REPOSITORY</strong><div><div>R269 BluezQt</div></div></div><br /><div><strong>REVISION DETAIL</strong><div><a href="https://phabricator.kde.org/D26320">https://phabricator.kde.org/D26320</a></div></div><br /><div><strong>To: </strong>mlaurent, dfaure<br /><strong>Cc: </strong>kossebau, apol, kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns<br /></div>