No ECMAScript 6/7 in Frameworks, please

Kai Uwe Broulik kde at privat.broulik.de
Thu Oct 10 09:10:51 BST 2019


Hi everyone,

just a quick heads up that KDE Frameworks minimum Qt version requirement 
policy [1] does not permit the use of ECMAScript 6/7 features in 
repositories such as KDeclarative and Plasma-Framework at this time.

Current supported Frameworks minimum version is Qt 5.11 (I think? 5.13, 
5.12, 5.11) but ECMAScript 6/7 features (like Arrow-functions, "let" 
keyword, for..of, etc) were only added in Qt 5.12.

There's a few convenience methods (such as Array.find, Array.findIndex 
(very useful when dealing with ComboBoxes), String.startsWith and 
endsWith, String.includes, Number.isFinite, etc) that were added 
(partially by me \o/) in Qt 5.8 and Qt 5.9 and are safe to use, see [2] 
for a full list - most notably those with a "ECMAScript 6 added in Qt 
5.x" comment.

Thanks
Kai Uwe

[1] https://community.kde.org/Frameworks/Policies
[2] https://doc-snapshots.qt.io/qt5-5.11/qtqml-javascript-functionlist.html


More information about the Plasma-devel mailing list