<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><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#586935" style="background-color: #e7e7e7;
border-color: #e7e7e7;
border-radius: 3px;
padding: 0 4px;
font-weight: bold;
color: black;text-decoration: none;">D26320#586935</a>, <a href="https://phabricator.kde.org/p/mlaurent/" style="
border-color: #f1f7ff;
color: #19558d;
background-color: #f1f7ff;
border: 1px solid transparent;
border-radius: 3px;
font-weight: bold;
padding: 0 4px;">@mlaurent</a> wrote:</div>
<div style="margin: 0;
padding: 0;
border: 0;
color: rgb(107, 116, 140);"><p>So what I need to change in this patch ? (if I need to change a code :) )</p></div>
</blockquote>
<p>When it comes to me, so far I have been more curious what the best principled approach is in general to react to the deprecation challenge we have here.<br />
And what the perfect streaming code would look like in general, now that we are touching this code.</p>
<p>As said initial, I am used to the pattern to "<< endl" everywhere and assume some others are as well. Having now code doing all kind of custom linebreaks and flushing only when thinking it is needed or relying on auto-flush in other cases by destructors makes things seem more complicated to me, because less patterns and more chances to miss some flushing were perhaps needed. Also more lines of code, as the flush call is on a separate line usually.</p>
<p>I may be more sensitive here when it comes to code structure patters, so will not try to push/enforce my ideas here and just stick to having advertized the solution I find more elegant to counter the namespace change only, and not changing code logic for that, repeated again here:</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);">namespace KF { // if not already in custom namespace
using TextStreamFunction = QTextStream& (*)(QTextStream&);
#if QT_VERSION >= QT_VERSION_CHECK(5, 14, 0)
constexpr TextStreamFunction endl = Qt::endl;
#else
constexpr TextStreamFunction endl = ::endl;
#endif
}
// use KF::endl now, or stick with endl if already in custom namespace</pre></div>
<p>If you prefer moving away from endl instead, your choice, as you also do the work & patch, also do others seem okay with it as well, from what I saw by the reactions to the similar patches.</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>