PyKF5 use of the SIP second declaration

Shaheed Haque <[email protected]>
Newsgroups gmane.comp.kde.devel.bindings
Message-ID <CAHAc2jdjkbnFSZ3JJgG7_PcgptT7NgGd+4hAp+dGRSEsVzBvOA@mail.gmail.com>
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.