[Development] A modest proposal: disable lower-case keywords (emit, foreach, forever, signals, slots) by default

Giuseppe D'Angelo giuseppe.dangelo at kdab.com
Fri Feb 21 14:25:13 CET 2020


Il 20/02/20 14:44, Kai Köhne ha scritto:
> As a counter proposal that (I hope) would get broader consensus,  I suggest to just do this for 'emit': QTBUG-82379 .

I don't think this is exactly a counter proposal for the plan or the 
scheduling posted by Marc, though. We're now bikeshedding about Q_EMIT 
vs [[qt::emit]] vs. qEmit or anything.


Can we instead discuss about the plan instead? AFAIU it could be 
simplified as:

* Qt 6.x
** Introduce opt-in ways to request lowercase keywords: 
-DQT_USE_KEYWORDS, CONFIG+=keywords, whatever. They do nothing.
** Default for user projects is still same as today (use lowercase).
** User projects get a deprecation warning unless they specify 
no_keywords and/or keywords. Specifying both keeps keywords.

* Qt 6.[x..x+3]
** Qt turns on no_keywords for itself (all code, examples, docs).
** Nothing changes for end-user code.

* Qt 6.(x+3)
** Default for user code becomes no_keywords.

Am I reading the original proposal correctly? The (x+3) here means that 
there'll be at least one LTS in the middle where behavior won't change 
for end-user applications.

My 2 c,
-- 
Giuseppe D'Angelo | giuseppe.dangelo at kdab.com | Senior Software Engineer
KDAB (France) S.A.S., a KDAB Group company
Tel. France +33 (0)4 90 84 08 53, http://www.kdab.com
KDAB - The Qt, C++ and OpenGL Experts

-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4329 bytes
Desc: Firma crittografica S/MIME
URL: <http://lists.qt-project.org/pipermail/development/attachments/20200221/e9dbea28/attachment.bin>


More information about the Development mailing list