Skip to content

Conversation

@dbermond
Copy link
Contributor

@dbermond dbermond commented Apr 7, 2025

The Qt documentation recommends not using Qt keywords in the public API of Qt libraries, specially the signals and slots Qt keywords.

Without this, client applications that are compiled with the QT_NO_KEYWORDS macro (or that are compiled in conjunction with other libraries that also defines the same Qt keywords) will fail to build.

The QT_NO_SIGNALS_SLOTS_KEYWORDS macro assures that the library is not using signals and slots Qt keywords, since it will fail to build when they are used. Useful for code sanity and for avoiding future pull requests that may try to use these Qt keywords.

The Qt documentation recommends[1] not using Qt keywords in the
public API of Qt libraries, specially the 'signals' and 'slots'
Qt keywords.

Without this, client applications that are compiled with the
'QT_NO_KEYWORDS'[2] macro (or that are compiled in conjunction
with other libraries that also defines the same Qt keywords)
will fail to build.

The 'QT_NO_SIGNALS_SLOTS_KEYWORDS'[1] macro assures that
the library is not using 'signals' and 'slots' Qt keywords,
since it will fail to build when they are used. Useful for
code sanity and for avoiding future pull requests that may
try to use these Qt keywords.

[1] https://doc.qt.io/qt-6/signalsandslots.html#signals-and-slots-in-qt-based-libraries
[2] https://doc.qt.io/qt-6/qtglobal.html#QT_NO_KEYWORDS
@Shatur Shatur merged commit 6c0e984 into Skycoder42:master Jul 6, 2025
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants