This file is indexed.

/usr/share/sip/PyKDE4/kdeui/kapplication.sip is in python-kde4-dev 4:4.13.0-0ubuntu1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
//
//     Copyright 2008 Jim Bublitz <jbublitz@nwinternet.com>
//     Earlier copyrights 1998 - 2007 Jim Bublitz also apply

//                 Generated by twine

// This file is part of PyKDE4.

// PyKDE4 is free software; you can redistribute it and/or modify
// it under the terms of the GNU Lesser General Public License as
// published by the Free Software Foundation; either version 2.1 of
// the License, or (at your option) any later version.

// PyKDE4 is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.

// You should have received a copy of the GNU General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>.

typedef unsigned long Atom;

%ModuleHeaderCode
#include <kapplication.h>
%End


class KApplication : QApplication
{
%TypeHeaderCode
#include <kapplication.h>
%End

%TypeCode
// Convert a Python argv list to a conventional C argc count and argv array.
static char **kdeui_ArgvToC(PyObject *argvlist, int &argc)
{
    char **argv;

    argc = PyList_GET_SIZE(argvlist);

    // Allocate space for two copies of the argument pointers, plus the
    // terminating NULL.
    if ((argv = (char **)sipMalloc(2 * (argc + 1) * sizeof (char *))) == NULL)
        return NULL;

    // Convert the list.
    for (int a = 0; a < argc; ++a)
    {
        char *arg;
#if PY_MAJOR_VERSION >= 3
        PyObject *utf8bytes = PyUnicode_AsUTF8String(PyList_GetItem(argvlist,a));
        arg = PyBytes_AsString(utf8bytes);
#else
        arg = PyString_AsString(PyList_GetItem(argvlist,a));
#endif
        // Get the argument and allocate memory for it.
        if (arg == NULL ||
            (argv[a] = (char *)sipMalloc(strlen(arg) + 1)) == NULL)
            return NULL;

        // Copy the argument and save a pointer to it.
        strcpy(argv[a], arg);
        argv[a + argc + 1] = argv[a];
#if PY_MAJOR_VERSION >= 3
        Py_DECREF(utf8bytes);
#endif
    }

    argv[argc + argc + 1] = argv[argc] = NULL;

    return argv;
}


// Remove arguments from the Python argv list that have been removed from the
// C argv array.
static void kdeui_UpdatePyArgv(PyObject *argvlist, int argc, char **argv)
{
    for (int a = 0, na = 0; a < argc; ++a)
    {
        // See if it was removed.
        if (argv[na] == argv[a + argc + 1])
            ++na;
        else
            PyList_SetSlice(argvlist, na, na + 1, NULL);
    }
}
%End


public:
    explicit                KApplication (bool GUIenabled = 1);
    explicit                KApplication (Display* display, Qt::HANDLE visual = 0, Qt::HANDLE colormap = 0);
//force
                            KApplication (Display* display, SIP_PYLIST list, const QByteArray& rAppName, bool GUIenabled = 1) [(Display*, int&, char**, const QByteArray&, bool = 1)];
%MethodCode
// The Python interface is a list of argument strings that is modified.

        int argc;
        char **argv;
        
        // Convert the list.
        if ((argv = kdeui_ArgvToC(a1, argc)) == NULL)
            sipIsErr = 1;
        else
        {
            // Create it now the arguments are right.
            static int nargc;
            nargc = argc;
        
            Py_BEGIN_ALLOW_THREADS
            sipCpp = new sipKApplication(a0, nargc, argv, *a2, a3);
            Py_END_ALLOW_THREADS
        
            // Now modify the original list.
            kdeui_UpdatePyArgv(a1, argc, argv);
        }
%End
//end
//ig                            KApplication (Display* display, int& argc, char** argv, const QByteArray& rAppName, bool GUIenabled = 1);

    static KApplication*    kApplication ();
    KConfig*                sessionConfig ();
    void                    disableSessionManagement ();
    void                    enableSessionManagement ();
    void                    commitData (QSessionManager& sm);
    void                    saveState (QSessionManager& sm);
    bool                    sessionSaving () const;
    void                    setTopWidget (QWidget* topWidget);
    static QString          tempSaveName (const QString& pFilename);
    static QString          checkRecoverFile (const QString& pFilename, bool& bRecover /Out/);
//ig    static Display*         getDisplay ();
    void                    installX11EventFilter (QWidget* filter);
    void                    removeX11EventFilter (const QWidget* filter);
    QByteArray              startupId () const;
    void                    setStartupId (const QByteArray& startup_id);
    void                    clearStartupId ();
    void                    setSynchronizeClipboard (bool synchronize);
    unsigned long           userTimestamp () const;
    void                    updateRemoteUserTimestamp (const QString& service, int time = 0);
    bool                    notify (QObject* receiver, QEvent* event);
//ig    int                     xErrhandler (Display*, void*);
    int                     xioErrhandler (Display*);
//ig    void                    iceIOErrorHandler (_IceConn* conn);
    bool loadedByKdeinit;
    void                    updateUserTimestamp (int time = 0);
    void                    reparseConfiguration ();
    void                    quit ();

signals:
    void                    saveYourself ();

protected:
                            KApplication (bool GUIenabled, const KComponentData& cData);
                            KApplication (Display* display, Qt::HANDLE visual, Qt::HANDLE colormap, const KComponentData& cData);
//ig    bool                    x11EventFilter (XEvent*);

private:
                            KApplication (const KApplication&);
                            KApplication (bool, bool);

public:
    ~KApplication ();
};
// KApplication