Penggunaan dumpcpp akan menghasilkan fail namespace untuk penggunaan dalam C++.
Bila aku guna untuk komponen ActiveX crviewer.dll Crystal Report 8.5, banyak pulak error kata "QObject::QObject(const Object&) is private".
Rupa-rupanya, kalau interface tu cuma sebagai vtable-only, dumpcpp terkena pepijat http://bugreports.qt.nokia.com/browse/QTBUG-1270?page=com.googlecode.jira-suite-utilities%3Atransitions-summary-tabpanel
Workaround:
Segment akhir fail yang dihasilkan oleh dumpcpp berupa seperti kod dibawah ini untuk semua class yang terkandung dalam fail tersebut..
template<>
inline void *qMetaTypeConstructHelper(const CRVIEWERLib::ICrystalReportSourceRouter *t)
{ Q_ASSERT(!t); return new CRVIEWERLib::ICrystalReportSourceRouter; }
jadi, tambahkan dengan fungsi template yang sama, untuk class yang bermasalah.
Contoh:
Kalau class bermasalah adalah IEnumCrystalReportSource,
tambahkan di akhiran fail dengan berikut.
template<>
inline void *qMetaTypeConstructHelper(const CRVIEWERLib::IEnumCrystalReportSource *t)
{ Q_ASSERT(!t); return new CRVIEWERLib::IEnumCrystalReportSource; }
Friday, October 29, 2010
Subscribe to:
Posts (Atom)