D14060: Clean up string casts

2018-07-12 Thread Frederik Gladhorn
This revision was automatically updated to reflect the committed changes. Closed by commit R110:973bef8349d2: Clean up string casts (authored by gladhorn). CHANGED PRIOR TO COMMIT https://phabricator.kde.org/D14060?vs=37616=37628#toc REPOSITORY R110 KScreen Library CHANGES SINCE LAST

D14060: Clean up string casts

2018-07-12 Thread David Edmundson
davidedmundson accepted this revision. davidedmundson added a comment. > I think micro-optimizing the tests further is simply not worth anyone's time Me too. Previous +2 applies REPOSITORY R110 KScreen Library BRANCH master REVISION DETAIL https://phabricator.kde.org/D14060

D14060: Clean up string casts

2018-07-12 Thread Frederik Gladhorn
gladhorn added a comment. I think micro-optimizing the tests further is simply not worth anyone's time. I'd propose taking this in (and if you spot more things, do them on top of this change). REPOSITORY R110 KScreen Library BRANCH master REVISION DETAIL

D14060: Clean up string casts

2018-07-12 Thread Vlad Zagorodniy
zzag added inline comments. INLINE COMMENTS > anthonyfieroni wrote in parser.cpp:145 > It should be QLatin1String on contains? http://doc.qt.io/qt-5/qbytearray.html#contains-1 REPOSITORY R110 KScreen Library BRANCH master REVISION DETAIL https://phabricator.kde.org/D14060 To:

D14060: Clean up string casts

2018-07-12 Thread Anthony Fieroni
anthonyfieroni added inline comments. INLINE COMMENTS > parser.cpp:145 > +const QByteArray type = > map[QStringLiteral("type")].toByteArray().toUpper(); > if (type.contains("LVDS") || type.contains("EDP") || > type.contains("IDP") || type.contains("7")) { >

D14060: Clean up string casts

2018-07-12 Thread Frederik Gladhorn
gladhorn added inline comments. INLINE COMMENTS > davidedmundson wrote in waylandtestserver.cpp:39 > shouldn't that be a QStringLiteral? Concatenation is still faster with latin1string. REPOSITORY R110 KScreen Library BRANCH master REVISION DETAIL https://phabricator.kde.org/D14060

D14060: Clean up string casts

2018-07-12 Thread Frederik Gladhorn
gladhorn updated this revision to Diff 37616. gladhorn marked 2 inline comments as done. gladhorn added a comment. Fixed some of Kai's comments, some minor things are still to do. REPOSITORY R110 KScreen Library CHANGES SINCE LAST UPDATE https://phabricator.kde.org/D14060?vs=37599=37616

D14060: Clean up string casts

2018-07-12 Thread Frederik Gladhorn
gladhorn marked 3 inline comments as done. gladhorn added inline comments. INLINE COMMENTS > broulik wrote in testkwaylandbackend.cpp:88 > Why `true`? Indeed, that makes no sense. > broulik wrote in testlog.cpp:52 > I thought when concatenating the advantage of `QStringLiteral` don't cut it >

D14060: Clean up string casts

2018-07-11 Thread Kai Uwe Broulik
broulik added a comment. INLINE COMMENTS > testkwaylandbackend.cpp:88 > // and thus connect to our internal test server. > -setenv("WAYLAND_DISPLAY", s_socketName.toLocal8Bit(), 1); > +setenv("WAYLAND_DISPLAY", s_socketName.toLocal8Bit().constData(), true); >

D14060: Clean up string casts

2018-07-11 Thread David Edmundson
davidedmundson accepted this revision. davidedmundson added a comment. This revision is now accepted and ready to land. cool, thanks. INLINE COMMENTS > waylandtestserver.cpp:39 > : QObject(parent) > -, m_configFile(TEST_DATA + QStringLiteral("default.json")) > +,

D14060: Clean up string casts

2018-07-11 Thread Frederik Gladhorn
gladhorn created this revision. Restricted Application added a project: Plasma. Restricted Application added a subscriber: plasma-devel. gladhorn requested review of this revision. REVISION SUMMARY Compile without casting to/from ascii to avoid typical mistakes due to implicit conversions.