[Kde-bindings] smokegen and mf_explicit flag

Chris Burel chrisburel at gmail.com
Fri Oct 9 17:58:05 UTC 2015


Hey everyone,
I've been working on a replacement for the existing smokegen tool, that is
based on clang's AST instead of the existing parser from kdevelop.  I'm
currently trying to get it to generate the smokedata.cpp file for qtcore.

One thing I'm noticing is that the mf_explicit flag doesn't seem to be
correctly applied to all explicit constructors.  It only shows up for 5 of
them:

QBool::QBool(bool)
QLatin1Char::QLatin1Char(char)
QLatin1String::QLatin1String(const char*)
QTextDecoder::QTextDecoder(const QTextCodec*)
QTextEncoder::QTextEncoder(const QTextCodec*)

Clang's parser turns up a lot more.  For example:
QAbstractEventDispatcher::QAbstractEventDispatcher(QObject *)
QAbstractItemModel::QAbstractItemModel(QObject *)
QAbstractListModel::QAbstractListModel(QObject *)

Looking at the headers for these classes, these constructors are indeed
marked "explicit".  Is this an error in the existing parser, or does the
mf_explicit flag mean more than just "the constructor was declared with the
explicit keyword"?

-Chris
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20151009/055d29b8/attachment.html>


More information about the Kde-bindings mailing list