D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2020-01-11 Thread David Faure
dfaure added a comment. Right, from a performance point of view, I believe this code was flushing far too much. In fact even now those calls to flush() are all unnecessary. Just one flush before closing the file is enough to be sure, or even without it, it will work (socket notifier says

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2020-01-09 Thread Laurent Montel
This revision was not accepted when it landed; it landed in state "Needs Review". This revision was automatically updated to reflect the committed changes. Closed by commit R269:d08e77529bd1: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not… (authored by mlaurent).

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2020-01-08 Thread Laurent Montel
mlaurent added a comment. From me I am ok with David comment for this code it's not necessary to have a flush() many time. Adding \n is enough for me. Regards REPOSITORY R269 BluezQt REVISION DETAIL https://phabricator.kde.org/D26320 To: mlaurent, dfaure Cc: kossebau, apol,

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2020-01-08 Thread Friedrich W. H. Kossebau
kossebau added a comment. In D26320#586935 , @mlaurent wrote: > So what I need to change in this patch ? (if I need to change a code :) ) When it comes to me, so far I have been more curious what the best principled approach is in

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2020-01-07 Thread Laurent Montel
mlaurent added a comment. No change needed ? I will commit in two days if no complains. 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

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2020-01-03 Thread Laurent Montel
mlaurent added a comment. So what I need to change in this patch ? (if I need to change a code :) ) 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

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2020-01-03 Thread David Faure
dfaure added a comment. Doesn't flushing happen automatically when internal buffers are full enough? i.e. I don't think the app should have to think about that, except when it *wants* partial results to be visible (which isn't the case in a code generator). About replace('\n', '\r\n')

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2020-01-02 Thread Friedrich W. H. Kossebau
kossebau added a comment. 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

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2020-01-02 Thread Laurent Montel
mlaurent added a comment. nm -gDC libQt5Core.so.5.15.0 | grep endl 00336680 T endl(QTextStream&) 00336500 T QTextStreamFunctions::endl(QTextStream&) 003361e0 T Qt::endl(QTextStream&) REPOSITORY R269 BluezQt REVISION DETAIL https://phabricator.kde.org/D26320

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2020-01-01 Thread Friedrich W. H. Kossebau
kossebau added a comment. @mlaurent Hm, is there a chance ABI got broken by that respective code in Qt 5.15 when it comes to the non-Qt-namespaced variants of the methods? Unless I misread, those deprecated ones are now in the QTextStreamFunctions namespace. And which might be source

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2020-01-01 Thread David Faure
dfaure added a comment. I don't think a code generator needs to flush() many times along the way anyway. \n actually sounds more efficient. REPOSITORY R269 BluezQt REVISION DETAIL https://phabricator.kde.org/D26320 To: mlaurent, dfaure Cc: kossebau, apol, kde-frameworks-devel,

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2020-01-01 Thread Friedrich W. H. Kossebau
kossebau added a comment. Ah, I looked at the "dev" branch only and missed that it is possibly already pre-Qt6, no longer base for any future Qt5 branches, right? Indeed things look differently in the 5.15 branch, where the old variant is tagged deprecated, I now see. Have to tell

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2020-01-01 Thread Laurent Montel
mlaurent updated this revision to Diff 72512. mlaurent added a comment. more \n merge REPOSITORY R269 BluezQt CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26320?vs=72511=72512 BRANCH port_endl_qt5.15 (branched from master) REVISION DETAIL

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2020-01-01 Thread Laurent Montel
mlaurent updated this revision to Diff 72511. mlaurent added a comment. merge \n REPOSITORY R269 BluezQt CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D26320?vs=72443=72511 BRANCH port_endl_qt5.15 (branched from master) REVISION DETAIL https://phabricator.kde.org/D26320

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2020-01-01 Thread Laurent Montel
mlaurent added a comment. @kossebau bonne année aussi :) Yep for sure it's namespaced in qt5.15 (I build it monday from qt5.15 branch) REPOSITORY R269 BluezQt REVISION DETAIL https://phabricator.kde.org/D26320 To: mlaurent, dfaure Cc: kossebau, apol, kde-frameworks-devel, LeGast00n,

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2019-12-31 Thread Friedrich W. H. Kossebau
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

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2019-12-31 Thread Aleix Pol Gonzalez
apol added inline comments. INLINE COMMENTS > CppGenerator.cpp:61 > writeCopyrightHeader(stream); > -stream << "#pragma once" << endl << endl; > -stream << "#include " << endl << endl; > -stream << "class QDBusObjectPath;" << endl << endl; > -stream <<

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2019-12-30 Thread Laurent Montel
mlaurent added a reviewer: dfaure. REPOSITORY R269 BluezQt REVISION DETAIL https://phabricator.kde.org/D26320 To: mlaurent, dfaure Cc: kde-frameworks-devel, LeGast00n, GB_2, michaelh, ngraham, bruns

D26320: endl is Qt:: namespaced in qt5.15. Port to \n and flush when QTextStream is not on a QFile

2019-12-30 Thread Laurent Montel
mlaurent created this revision. Herald added a project: Frameworks. Herald added a subscriber: kde-frameworks-devel. mlaurent requested review of this revision. REVISION SUMMARY Port endl to \n REPOSITORY R269 BluezQt BRANCH port_endl_qt5.15 (branched from master) REVISION DETAIL