should return nil when it does not add a new entry
[lqt.git] / generator / qt_internal.lua
blob04ebd48dfd548ec05a421485438f13bcbbd10e07
2 local classes, enums = ...
3 local ret1, ret2 = {}, {}
5 -- don't bind this Qt internals/unsupported classes
6 -- if there are linker errors, or errors when laoding the .so
7 -- add the class here
9 for c in pairs(classes) do
10 local n = c.xarg.name
11 if n~=string.lower(n) and not (string.match(n, '_')
13 -- internals, no binding needed
14 or c.xarg.fullname=='QDebug::Stream'
15 or c.xarg.fullname=='QByteArray::Data'
16 or c.xarg.fullname=='QVariant::Private::Data'
17 or c.xarg.fullname=='QRegion::QRegionData'
18 or c.xarg.fullname=='QString::Data'
19 or c.xarg.fullname=='QObjectData'
20 or c.xarg.fullname=='QThreadStorageData'
21 or c.xarg.fullname=='QXmlAttributes::Attribute'
22 or c.xarg.fullname=='QGLColormap::QGLColormapData'
23 or c.xarg.fullname=='QtConcurrent::internal::ExceptionStore'
24 or c.xarg.fullname=='QtConcurrent::internal::ExceptionHolder'
25 or c.xarg.fullname=='QtConcurrent::ResultIteratorBase'
27 -- platform specific, TODO
28 or c.xarg.fullname=='QWindowsCEStyle'
29 or c.xarg.fullname=='QWindowsMobileStyle'
30 or c.xarg.fullname=='QWindowsXPStyle'
31 or c.xarg.fullname=='QWindowsVistaStyle'
32 or c.xarg.fullname=='QMacStyle'
34 -- binding bugs
35 or c.xarg.fullname=='QUpdateLaterEvent'
36 or c.xarg.fullname=='QTextStreamManipulator'
37 or c.xarg.fullname=='QForeachContainerBase'
38 or c.xarg.fullname=='QtConcurrent::ThreadEngineSemaphore'
39 or c.xarg.fullname=='QtConcurrent::Exception' -- GCC throw() in destructor base declaration
40 or c.xarg.fullname=='QtConcurrent::UnhandledException' -- GCC throw() in destructor base declaration
42 ) then
43 ret1[c] = true
44 end
45 end
47 for e in pairs(enums) do
48 local n = e.xarg.name
49 if n~=string.lower(n) and not string.match(n, '_') then
50 ret2[e] = true
51 end
52 end
54 return ret1, ret2