~ubuntu-branches/ubuntu/raring/python-qt4/raring-proposed

« back to all changes in this revision

Viewing changes to sip/QtGui/qsyntaxhighlighter.sip

  • Committer: Package Import Robot
  • Author(s): Julian Taylor
  • Date: 2013-03-29 14:35:15 UTC
  • Revision ID: package-import@ubuntu.com-20130329143515-caln0b1j2309ekqb
Tags: 4.10-0ubuntu2
backport fix-QTextBlockUserData.patch from upstream snapshot
fixes e.g. syntax highlighting in editors (LP: #1161818)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// qsyntaxhighlighter.sip generated by MetaSIP on Fri Mar  1 21:42:08 2013
 
1
// qsyntaxhighlighter.sip generated by MetaSIP on Thu Mar 14 02:48:42 2013
2
2
//
3
3
// This file is part of the QtGui Python extension module.
4
4
//
68
68
    int previousBlockState() const;
69
69
    int currentBlockState() const;
70
70
    void setCurrentBlockState(int newState);
71
 
    void setCurrentBlockUserData(QTextBlockUserData *data /Transfer/);
 
71
    void setCurrentBlockUserData(QTextBlockUserData *data /GetWrapper/);
 
72
%MethodCode
 
73
        // Ownership of the user data is with the document not the text block.
 
74
        QTextDocument *td = sipCpp->document();
 
75
        
 
76
        if (td)
 
77
        {
 
78
            PyObject *td_obj = sipConvertFromType(td, sipType_QTextDocument, 0);
 
79
        
 
80
            if (td_obj)
 
81
            {
 
82
                sipTransferTo(a0Wrapper, td_obj);
 
83
                Py_DECREF(td_obj);
 
84
            }
 
85
        }
 
86
        
 
87
        sipCpp->setCurrentBlockUserData(a0);
 
88
%End
 
89
 
72
90
    QTextBlockUserData *currentBlockUserData() const;
73
91
%If (Qt_4_4_0 -)
74
92
    QTextBlock currentBlock() const;