Mercurial > projects > qtd
comparison generator/dgenerator.cpp @ 331:1defd6a98364 signals
Make static constructors shared. Requires new dmd. Remove irrelevant junk
author | eldar1@eldar1-laptop |
---|---|
date | Fri, 22 Jan 2010 23:59:07 +0000 |
parents | 7c2cf27391c4 |
children | 5896535a03cd |
comparison
equal
deleted
inserted
replaced
330:115130499d78 | 331:1defd6a98364 |
---|---|
1855 bool staticInit = d_class->isQObject() || d_class->typeEntry()->isValue() || (cpp_shared && d_class->generateShellClass() && !d_class->isInterface()); | 1855 bool staticInit = d_class->isQObject() || d_class->typeEntry()->isValue() || (cpp_shared && d_class->generateShellClass() && !d_class->isInterface()); |
1856 if (staticInit) | 1856 if (staticInit) |
1857 { | 1857 { |
1858 auxFile.isDone = false; | 1858 auxFile.isDone = false; |
1859 auxFile.stream << "extern(C) void static_init_" << d_class->name() << "();" << endl; | 1859 auxFile.stream << "extern(C) void static_init_" << d_class->name() << "();" << endl; |
1860 auxFile.stream << "static this() { static_init_" << d_class->name() << "; }" << endl << endl; | 1860 auxFile.stream << "shared static this() { static_init_" << d_class->name() << "; }" << endl << endl; |
1861 } | 1861 } |
1862 | 1862 |
1863 if (m_docs_enabled) { | 1863 if (m_docs_enabled) { |
1864 m_doc_parser = new DocParser(m_doc_directory + "/" + d_class->name().toLower() + ".jdoc"); | 1864 m_doc_parser = new DocParser(m_doc_directory + "/" + d_class->name().toLower() + ".jdoc"); |
1865 } | 1865 } |
2741 if (!d_class->isFinal()) | 2741 if (!d_class->isFinal()) |
2742 s << " int qt_metacall(QMetaObject.Call _c, int _id, void **_a) {" << endl | 2742 s << " int qt_metacall(QMetaObject.Call _c, int _id, void **_a) {" << endl |
2743 << " return qtd_" << d_class->name() << "_qt_metacall(__nativeId, _c, _id, _a);" << endl | 2743 << " return qtd_" << d_class->name() << "_qt_metacall(__nativeId, _c, _id, _a);" << endl |
2744 << " }" << endl << endl; | 2744 << " }" << endl << endl; |
2745 | 2745 |
2746 s << " private static QMetaObject _staticMetaObject;" << endl | 2746 s << " private static __gshared QMetaObject _staticMetaObject;" << endl |
2747 << " protected static void createStaticMetaObject() {" << endl | 2747 << " protected static void createStaticMetaObject() {" << endl |
2748 << " assert(!_staticMetaObject);" << endl | 2748 << " assert(!_staticMetaObject);" << endl |
2749 << " QMetaObject base;" << endl; | 2749 << " QMetaObject base;" << endl; |
2750 | 2750 |
2751 if (d_class->name() != "QObject") | 2751 if (d_class->name() != "QObject") |