<commit_before><typesystem package="PySide.QtUiTools">

    <load-typesystem name="typesystem_gui.xml" generate="no" />
    <load-typesystem name="typesystem_xml.xml" generate="no" />

    <object-type name="QUiLoader">
      <modify-function signature="createAction(QObject *, const QString&amp;)">
        <modify-argument index="return">
          <parent index="1" action="add"/>
        </modify-argument>
      </modify-function>

      <modify-function signature="createActionGroup(QObject *, const QString&amp;)">
        <modify-argument index="return">
          <parent index="1" action="add"/>
        </modify-argument>
      </modify-function>

      <modify-function signature="createLayout(const QString&amp;,QObject *, const QString&amp;)">
        <modify-argument index="return">
          <parent index="2" action="add"/>
        </modify-argument>
      </modify-function>

      <modify-function signature="createWidget(const QString&amp;,QWidget*, const QString&amp;)">
        <modify-argument index="return">
          <parent index="2" action="add"/>
        </modify-argument>
      </modify-function>

      <modify-function signature="load(QIODevice*, QWidget*)">
        <modify-argument index="return">
          <parent index="2" action="add"/>
        </modify-argument>
      </modify-function>

      <!-- Syntax sugar -->
      <add-function signature="load(const char*, QWidget*)" return-type="QWidget*">
        <modify-argument index="return">
          <parent index="2" action="add"/>
        </modify-argument>
        <inject-code>
            QFile f(%1);
            if (f.open(QIODevice::ReadOnly | QIODevice::Text))
                %PYARG_0 = %CONVERTTOPYTHON[QWidget*](%CPPSELF.load(&amp;f, %2));
            else
                PyErr_SetString(PyExc_RuntimeError, "Unable to open ui file");
        </inject-code>
      </add-function>
    </object-type>

</typesystem>
<commit_msg>Add a default value and argument name to QUiLoader::file(str, QWidget)<commit_after><typesystem package="PySide.QtUiTools">

    <load-typesystem name="typesystem_gui.xml" generate="no" />
    <load-typesystem name="typesystem_xml.xml" generate="no" />

    <object-type name="QUiLoader">
      <modify-function signature="createAction(QObject *, const QString&amp;)">
        <modify-argument index="return">
          <parent index="1" action="add"/>
        </modify-argument>
      </modify-function>

      <modify-function signature="createActionGroup(QObject *, const QString&amp;)">
        <modify-argument index="return">
          <parent index="1" action="add"/>
        </modify-argument>
      </modify-function>

      <modify-function signature="createLayout(const QString&amp;,QObject *, const QString&amp;)">
        <modify-argument index="return">
          <parent index="2" action="add"/>
        </modify-argument>
      </modify-function>

      <modify-function signature="createWidget(const QString&amp;,QWidget*, const QString&amp;)">
        <modify-argument index="return">
          <parent index="2" action="add"/>
        </modify-argument>
      </modify-function>

      <modify-function signature="load(QIODevice*, QWidget*)">
        <modify-argument index="return">
          <parent index="2" action="add"/>
        </modify-argument>
      </modify-function>

      <!-- Syntax sugar -->
      <add-function signature="load(const char*, QWidget*)" return-type="QWidget*">
        <modify-argument index="2">
          <replace-default-expression with="0" />
          <rename to="parentWidget" />
        </modify-argument>
        <modify-argument index="return">
          <parent index="2" action="add"/>
        </modify-argument>
        <inject-code>
            QFile f(%1);
            if (f.open(QIODevice::ReadOnly | QIODevice::Text))
                %PYARG_0 = %CONVERTTOPYTHON[QWidget*](%CPPSELF.load(&amp;f, %2));
            else
                PyErr_SetString(PyExc_RuntimeError, "Unable to open ui file");
        </inject-code>
      </add-function>
    </object-type>

</typesystem>

{'fraction_non_alphanumeric': 0.1613061625337589, 'fraction_numerical': 0.004910385465259023, 'mean_word_length': 2.744485294117647, 'pattern_counts': {'":': 0, '<': 85, '<?xml version=': 0, '>': 85, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 6}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '657958', 'n_tokens_mistral': 1239, 'n_tokens_neox': 1206, 'n_words': 214}