PyKF5 use of the SIP second declaration

Shaheed Haque srhaque at theiet.org
Fri Jan 20 11:20:36 UTC 2017


Hi Steve,

Another smallpoint to resolve is around the logic for the support of the
second declaration in SIP files, e.g. the bit in [] brackets here:

   KFontChooser(QWidget* parent /TransferThis/ = 0, const
KFontChooser::DisplayFlags& flags = KFontChooser::DisplayFrame, const
QStringList& fontList = QStringList(), int visibleListSize = 8,
Qt::CheckState* sizeIsRelativeState = 0)
        [(QWidget* = 0, const KFontChooser::DisplayFlags& =
KFontChooser::DisplayFrame, const QStringList& = QStringList(), int = 8,
Qt::CheckState* = 0)];

Now, until yesterday the rule for defining the parameters for the main and
the second declarations were both strings, but as I rebased, I needed to
support the change you made where the former is now an array.

I suggest that for consistency the second set of parameters should also be
an array:

     "getFontAndText":
     {
-        "parameters": "QFont& theFont, QString& theString, const
KFontChooser::DisplayFlags& flags = KFontChooser::NoDisplayFlags, QWidget*
parent /Transfer/ = 0, Qt::CheckState sizeIsRelativeState = Qt::Unchecked",
+        "parameters": ["QFont& theFont", "QString& theString", "const
KFontChooser::DisplayFlags& flags = KFontChooser::NoDisplayFlags",
"QWidget* parent /Transfer/ = 0", "Qt::CheckState sizeIsRelativeState =
Qt::Unchecked"],
         "fn_result": "SIP_PYTUPLE",
-        "decl2": "QFont&, QString&, const KFontChooser::DisplayFlags& =
KFontChooser::NoDisplayFlags, QWidget* = 0, Qt::CheckState* = 0",
+        "decl2": ["QFont&", "QString&", "const KFontChooser::DisplayFlags&
= KFontChooser::NoDisplayFlags", "QWidget* = 0", "Qt::CheckState* = 0"],
         "fn_result2": "int",
         "code":
         """

I've coded this up but wanted to check for the impact this might have on
you. Please let me know if this is going to be a problem.

Thanks, Shaheed
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-bindings/attachments/20170120/1acf71c9/attachment.html>


More information about the Kde-bindings mailing list