[Kde-bindings] Does smokeqt support the Q3 support classes?

Chris Burel chrisburel at gmail.com
Mon Jul 27 21:55:20 UTC 2009


This appears to be a compiler issue.  The system I'm on at work is
using a very old gcc, gcc version 3.3.5 20050117 (prerelease) (SUSE
Linux).  I checked out cvs head of smoke and kalyptus, and still got
the above mentioned errors.  I got it to build ok at home on gcc
4.3.2, but I couldn't include all the headers. The headers I had to
exclude are:
/opt/qt-4.5.2/include/Qt3Support/q3dns.h
/opt/qt-4.5.2/include/Qt3Support/q3filedialog.h
/opt/qt-4.5.2/include/Qt3Support/q3memarray.h
/opt/qt-4.5.2/include/Qt3Support/q3progressdialog.h

Even though it compiles, I get some interesting compiler warnings,
like this one:
/opt/qt-4.5.1/include/Qt3Support/q3textedit.h:494: warning: ‘virtual
void Q3TextEdit::drawContents(QPainter*)’ was hidden
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_4.cpp:13003:
warning:   by ‘virtual void x_Q3TextView::drawContents(QPainter*, int,
int, int, int)’
Maybe 50 or so different methods produce that warning.

q3memarray.h I assume we don't need bindings for anyway, but for the
record the line
"operator QVector<type>() const;"
was not successfully parsed by kalyptus.  It died at line 1657 of
kalyptusCxxToSmoke.pm.

q3filedialog.h yeilds:
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_2.cpp: In static
member function ‘static void x_Q3FilePreview::x_1(Smoke::StackItem*)’:
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_2.cpp:2830: error:
cannot allocate an object of abstract type ‘x_Q3FilePreview’
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_2.cpp:2821: note:
 because the following virtual functions are pure within
‘x_Q3FilePreview’:
/opt/qt-4.5.1/include/Qt3Support/q3filedialog.h:88: note:
virtual void Q3FilePreview::previewUrl(const Q3Url&)
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_2.cpp: In static
member function ‘static void x_Q3FilePreview::x_2(Smoke::StackItem*)’:
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_2.cpp:2837: error:
cannot allocate an object of abstract type ‘x_Q3FilePreview’
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_2.cpp:2821: note:
 since type ‘x_Q3FilePreview’ has pure virtual functions

q3progressdialog.h yeilds:
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_3.cpp:11972:
error: ‘x_Q3ProgressDialog::x_Q3ProgressDialog(const QString&, const
QString&, int, QWidget*)’ cannot be overloaded
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_3.cpp:11930:
error: with ‘x_Q3ProgressDialog::x_Q3ProgressDialog(const QString&,
const QString&, int, QWidget*)’
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_3.cpp:11979:
error: ‘x_Q3ProgressDialog::x_Q3ProgressDialog(const QString&, const
QString&, int)’ cannot be overloaded
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_3.cpp:11937:
error: with ‘x_Q3ProgressDialog::x_Q3ProgressDialog(const QString&,
const QString&, int)’
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_3.cpp: In
constructor ‘x_Q3ProgressDialog::x_Q3ProgressDialog(const QString&,
const QString&, int, QWidget*)’:
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_3.cpp:11930:
error: call of overloaded ‘Q3ProgressDialog(const QString&, const
QString&, int&, QWidget*&)’ is ambiguous
/opt/qt-4.5.1/include/Qt3Support/q3progressdialog.h:82: note:
candidates are: Q3ProgressDialog::Q3ProgressDialog(const QString&,
const QString&, int, QWidget*, Qt::WindowFlags)
/opt/qt-4.5.1/include/Qt3Support/q3progressdialog.h:79: note:
       Q3ProgressDialog::Q3ProgressDialog(const QString&, const
QString&, int, QWidget*, const char*, bool, Qt::WindowFlags)
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_3.cpp: In
constructor ‘x_Q3ProgressDialog::x_Q3ProgressDialog(const QString&,
const QString&, int)’:
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_3.cpp:11937:
error: call of overloaded ‘Q3ProgressDialog(const QString&, const
QString&, int&)’ is ambiguous
/opt/qt-4.5.1/include/Qt3Support/q3progressdialog.h:82: note:
candidates are: Q3ProgressDialog::Q3ProgressDialog(const QString&,
const QString&, int, QWidget*, Qt::WindowFlags)
/opt/qt-4.5.1/include/Qt3Support/q3progressdialog.h:79: note:
       Q3ProgressDialog::Q3ProgressDialog(const QString&, const
QString&, int, QWidget*, const char*, bool, Qt::WindowFlags)
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_3.cpp: In
constructor ‘x_Q3ProgressDialog::x_Q3ProgressDialog(const QString&,
const QString&, int, QWidget*)’:
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_3.cpp:11972:
error: call of overloaded ‘Q3ProgressDialog(const QString&, const
QString&, int&, QWidget*&)’ is ambiguous
/opt/qt-4.5.1/include/Qt3Support/q3progressdialog.h:82: note:
candidates are: Q3ProgressDialog::Q3ProgressDialog(const QString&,
const QString&, int, QWidget*, Qt::WindowFlags)
/opt/qt-4.5.1/include/Qt3Support/q3progressdialog.h:79: note:
       Q3ProgressDialog::Q3ProgressDialog(const QString&, const
QString&, int, QWidget*, const char*, bool, Qt::WindowFlags)
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_3.cpp: In
constructor ‘x_Q3ProgressDialog::x_Q3ProgressDialog(const QString&,
const QString&, int)’:
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_3.cpp:11979:
error: call of overloaded ‘Q3ProgressDialog(const QString&, const
QString&, int&)’ is ambiguous
/opt/qt-4.5.1/include/Qt3Support/q3progressdialog.h:82: note:
candidates are: Q3ProgressDialog::Q3ProgressDialog(const QString&,
const QString&, int, QWidget*, Qt::WindowFlags)
/opt/qt-4.5.1/include/Qt3Support/q3progressdialog.h:79: note:
       Q3ProgressDialog::Q3ProgressDialog(const QString&, const
QString&, int, QWidget*, const char*, bool, Qt::WindowFlags)

For q3dns.h, the smoke lib built ok, but then won't link.  I had
modified the CMakeLists.txt to get libsmokeqt to link to the
Qt3Support library, but it still errors out with some undefined
symbols.  Even though I can run nm on the libQt3Support.so and see the
symbols defined there:
Linking CXX shared library ../../lib/libsmokeqt.so
CMakeFiles/smokeqt.dir/x_2.o: In function `Q3DnsSocket::tr(char
const*, char const*)':
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_2.cpp:258:
undefined reference to `Q3DnsSocket::staticMetaObject'
CMakeFiles/smokeqt.dir/x_2.o: In function `x_Q3DnsSocket':
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_2.cpp:265:
undefined reference to `Q3DnsSocket::Q3DnsSocket(QObject*, char
const*)'
CMakeFiles/smokeqt.dir/x_2.o: In function
`x_Q3DnsSocket::x_1(Smoke::StackItem*)':
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_2.cpp:238:
undefined reference to `Q3DnsSocket::staticMetaObject'
CMakeFiles/smokeqt.dir/x_2.o: In function
`x_Q3DnsSocket::x_2(Smoke::StackItem*) const':
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_2.cpp:242:
undefined reference to `Q3DnsSocket::metaObject() const'
CMakeFiles/smokeqt.dir/x_2.o: In function
`x_Q3DnsSocket::x_3(Smoke::StackItem*)':
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_2.cpp:247:
undefined reference to `Q3DnsSocket::qt_metacall(QMetaObject::Call,
int, void**)'
CMakeFiles/smokeqt.dir/x_2.o: In function `x_Q3DnsSocket::metaObject() const':
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_2.cpp:307:
undefined reference to `Q3DnsSocket::metaObject() const'
CMakeFiles/smokeqt.dir/x_2.o: In function
`x_Q3DnsSocket::qt_metacall(QMetaObject::Call, int, void**)':
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_2.cpp:315:
undefined reference to `Q3DnsSocket::qt_metacall(QMetaObject::Call,
int, void**)'
CMakeFiles/smokeqt.dir/x_2.o: In function `~x_Q3DnsSocket':
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_2.cpp:323:
undefined reference to `Q3DnsSocket::~Q3DnsSocket()'
/home/cburel/src/smoke/kdebindings/build/smoke/qt/x_2.cpp:323:
undefined reference to `Q3DnsSocket::~Q3DnsSocket()'
CMakeFiles/smokeqt.dir/x_2.o:(.data.rel.ro._ZTV13x_Q3DnsSocket[vtable
for x_Q3DnsSocket]+0xc): undefined reference to
`Q3DnsSocket::qt_metacast(char const*)'
CMakeFiles/smokeqt.dir/x_2.o:(.data.rel.ro._ZTV13x_Q3DnsSocket[vtable
for x_Q3DnsSocket]+0x38): undefined reference to
`Q3DnsSocket::cleanCache()'
CMakeFiles/smokeqt.dir/x_2.o:(.data.rel.ro._ZTV13x_Q3DnsSocket[vtable
for x_Q3DnsSocket]+0x3c): undefined reference to
`Q3DnsSocket::retransmit()'
CMakeFiles/smokeqt.dir/x_2.o:(.data.rel.ro._ZTV13x_Q3DnsSocket[vtable
for x_Q3DnsSocket]+0x40): undefined reference to
`Q3DnsSocket::answer()'
CMakeFiles/smokeqt.dir/x_2.o:(.data.rel.ro._ZTI13x_Q3DnsSocket[typeinfo
for x_Q3DnsSocket]+0x8): undefined reference to `typeinfo for
Q3DnsSocket'
collect2: ld returned 1 exit status
make[2]: *** [lib/libsmokeqt.so.2.0.0] Error 1
make[1]: *** [smoke/qt/CMakeFiles/smokeqt.dir/all] Error 2
make: *** [all] Error 2

~/src/smoke/kdebindings/build$> nm -C
/opt/qt-4.5.1/lib/libQt3Support.so | grep
'Q3DnsSocket::staticMetaObject'
00365de0 d Q3DnsSocket::staticMetaObject
~/src/smoke/kdebindings/build$> nm -C
/opt/qt-4.5.1/lib/libQt3Support.so | grep 'Q3DnsSocket::Q3DnsSocket'
0026b922 t Q3DnsSocket::Q3DnsSocket(QObject*, char const*)
0026b962 t Q3DnsSocket::Q3DnsSocket(QObject*, char const*)
~/src/smoke/kdebindings/build$> nm -C
/opt/qt-4.5.1/lib/libQt3Support.so | grep 'Q3DnsSocket::metaObject'
002cdfea t Q3DnsSocket::metaObject() const
~/src/smoke/kdebindings/build$> nm -C
/opt/qt-4.5.1/lib/libQt3Support.so | grep 'Q3DnsSocket::qt_metacall'
002ce000 t Q3DnsSocket::qt_metacall(QMetaObject::Call, int, void**)

On Fri, Jul 24, 2009 at 5:00 AM, Richard Dale<rdale at foton.es> wrote:
> On Friday 24 July 2009 10:52:03 am Richard Dale wrote:
>> On Thursday 23 July 2009 10:31:46 pm Chris Burel wrote:
>> > I added the Q3Support headers to smoke/qt/header_list and tried to
>> > recompile, but I get a bunch of errors:
>> > /pts/testPipe/share/Qt4/def/dat/perlqt4/build/smoke/qt/x_1.cpp:3606:
>> > error: base `Q3CanvasItem' with only non-default constructor in class
>> > without a constructor
>> > /pts/testPipe/share/Qt4/def/dat/perlqt4/build/smoke/qt/x_1.cpp:5163:
>> > error: base `Q3CanvasSprite' with only non-default constructor in class
>> > without a constructor
>> > /pts/testPipe/share/Qt4/def/dat/perlqt4/build/smoke/qt/x_1.cpp:5474:
>> > error: base `Q3CanvasText' with only non-default constructor in class
>> > without a constructor
>> >
>> > Looks like kalyptus isn't creating valid class constructors for those.
>> >  The full list of classes with that problem is
>> > Q3CanvasItem
>> > Q3CanvasSprite
>> > Q3CanvasText
>> > Q3DockAreaLayout
>> > Q3GCacheIterator
>> > Q3GDictIterator
>> > Q3GListIterator
>> > Q3NetworkOperation
>> > Q3SimpleRichText
>> > Q3StyleSheetItem
>> >
>> > Some of those are undocumented classes, but for the ones I checked
>> > they all have constructors that require arguments.
>> >
>> > Is this just something that isn't supported?
>>
>> I've always excluded the Q3* classes as I think that there are more than
>> enough classes in Qt4 as it is, and having even more makes the api even
>> harder to master.
>>
>> I had a look at Q3CanvasItem and it doesn't seem to have anything unusual
>> in the header. Have you added the new classes to the 'classlist' file for
>> the smoke project?
> Oops, it's not classlist that is if you were just adding to the smoke/qt
> library project. I've just built that with some q3* headers added including
> q3canvas.h and it built fine for me.
>
> Index: header_list
> ===================================================================
> --- header_list (revision 996702)
> +++ header_list (working copy)
> @@ -1,3 +1,7 @@
> +q3frame.h
> +q3valuelist.h
> +q3canvas.h
> +q3scrollview.h
>  qtextdocumentwriter.h
>  qabstracteventdispatcher.h
>  qabstractfileengine.h
>
> Are you using the up to date version of kalyptus in the kdebindings trunk svn?
>
> -- Richard
> _______________________________________________
> Kde-bindings mailing list
> Kde-bindings at kde.org
> https://mail.kde.org/mailman/listinfo/kde-bindings
>



More information about the Kde-bindings mailing list