update to Qt 4.6 xml files · MeVisLab/pythonqt@91faba9 · GitHub
Skip to content

Commit 91faba9

Browse files
committed
update to Qt 4.6 xml files
1 parent 7d79d0b commit 91faba9

24 files changed

Lines changed: 3520 additions & 2551 deletions

generator/merge.sh

Lines changed: 11 additions & 0 deletions

generator/parser/rpp/pp-engine-bits.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -383,14 +383,16 @@ template <typename _InputIterator, typename _OutputIterator>
383383
_InputIterator pp::handle_include (bool __skip_current_path, _InputIterator __first, _InputIterator __last,
384384
_OutputIterator __result)
385385
{
386+
std::cout << env.current_file << std::endl;
386387
if (pp_isalpha (*__first) || *__first == '_')
387388
{
388389
pp_macro_expander expand_include (env);
389390
std::string name;
390391
name.reserve (255);
391392
expand_include (__first, __last, std::back_inserter (name));
392393
std::string::iterator it = skip_blanks (name.begin (), name.end ());
393-
assert (it != name.end () && (*it == '<' || *it == '"'));
394+
printf("%s", name.c_str());
395+
assert((it != name.end () && (*it == '<' || *it == '"')));
394396
handle_include (__skip_current_path, it, name.end (), __result);
395397
return __first;
396398
}
@@ -416,7 +418,7 @@ _InputIterator pp::handle_include (bool __skip_current_path, _InputIterator __fi
416418

417419
std::string filepath;
418420
FILE *fp = find_include_file (filename, &filepath, quote == '>' ? INCLUDE_GLOBAL : INCLUDE_LOCAL, __skip_current_path);
419-
421+
420422
#if defined (PP_HOOK_ON_FILE_INCLUDED)
421423
PP_HOOK_ON_FILE_INCLUDED (env.current_file, fp ? filepath : filename, fp);
422424
#endif

generator/setupgenerator.cpp

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ void SetupGenerator::generate()
123123
}
124124

125125
// declare individual class creation functions
126-
s << "void PythonQt_init_" << shortPackName << "() {" << endl;
126+
s << "void PythonQt_init_" << shortPackName << "(PyObject* module) {" << endl;
127127

128128
if (shortPackName.endsWith("Builtin")) {
129129
shortPackName = shortPackName.mid(0, shortPackName.length()-strlen("builtin"));
@@ -135,12 +135,14 @@ void SetupGenerator::generate()
135135
QString shellCreator;
136136
if (cls->generateShellClass()) {
137137
shellCreator = ", PythonQtSetInstanceWrapperOnShell<" + ShellGenerator::shellClassName(cls) + ">";
138+
} else {
139+
shellCreator = ", NULL";
138140
}
139141
if (cls->isQObject()) {
140-
s << "PythonQt::self()->registerClass(&" << cls->qualifiedCppName() << "::staticMetaObject, \"" << shortPackName <<"\", PythonQtCreateObject<PythonQtWrapper_" << cls->name() << ">" << shellCreator << ");" << endl;
142+
s << "PythonQt::priv()->registerClass(&" << cls->qualifiedCppName() << "::staticMetaObject, \"" << shortPackName <<"\", PythonQtCreateObject<PythonQtWrapper_" << cls->name() << ">" << shellCreator << ", module);" << endl;
141143
} else {
142144
QString baseName = cls->baseClass()?cls->baseClass()->qualifiedCppName():"";
143-
s << "PythonQt::self()->registerCPPClass(\""<< cls->qualifiedCppName() << "\", \"" << baseName << "\", \"" << shortPackName <<"\", PythonQtCreateObject<PythonQtWrapper_" << cls->name() << ">" << shellCreator << ");" << endl;
145+
s << "PythonQt::priv()->registerCPPClass(\""<< cls->qualifiedCppName() << "\", \"" << baseName << "\", \"" << shortPackName <<"\", PythonQtCreateObject<PythonQtWrapper_" << cls->name() << ">" << shellCreator << ", module);" << endl;
144146
}
145147
foreach(AbstractMetaClass* interface, cls->interfaces()) {
146148
// the interface might be our own class... (e.g. QPaintDevice)

generator/shellgenerator.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,7 @@ bool ShellGenerator::shouldGenerate(const AbstractMetaClass *meta_class) const
5252
if (meta_class->name().startsWith("Global")) return false;
5353
if (meta_class->name().startsWith("QStyleOptionComplex")) return false;
5454
if (meta_class->name().startsWith("QTextLayout")) return false;
55-
//if (meta_class->name().startsWith("QTextStream")) return false; // because of >> operators
56-
//if (meta_class->name().startsWith("QDataStream")) return false; // "
55+
if (meta_class->name().startsWith("QPersistentModelIndex")) return false;
5756
return ((cg & TypeEntry::GenerateCode) != 0);
5857
}
5958

generator/shellimplgenerator.cpp

Lines changed: 7 additions & 0 deletions

0 commit comments

Comments
 (0)