[Kde-java] Re: polish( )

David Goodenough david.goodenough at btconnect.com
Wed Oct 13 14:53:13 CEST 2004


On Wednesday 13 October 2004 11:00, David Goodenough wrote:
<snip.>
> > Yes, please try building the KDE_3_3_BRANCH and see if you have the same
> > problem. I hope you don't mind me cc'ing this to the kde-java list.. The
> > project really needs someone other than myself to be able to sort out
> > problems like this.
> >
> > -- Richard
>
> OK, I downloaded and compiled the qt/kdejava bits of kdebindings _BRANCH
> and it seems to compile and link cleanly on my machine.  I smell tool
> version problems.
>
> The sequence I used to download and compile was:-
>
> #!/bin/bash
> set -x
>
> export CVSROOT=:pserver:anonymous at anoncvs.kde.org:/home/kde
> cvs login
> cvs co -l -r KDE_3_3_BRANCH kdebindings
> cvs co -r KDE_3_3_BRANCH kdebindings/qtjava
> cvs co -r KDE_3_3_BRANCH kdebindings/kdejava
> cvs co -r KDE_3_3_BRANCH kde-common
> cvs co -r KDE_3_3_BRANCH kdebindings/dcopc
> cd kdebindings
> ln -s ../kde-common/admin ./admin
> make -f Makefile.cvs
> /configure
> make
>
> I am running Debian Sid, last updated about a week ago.
>
> I did notice a few warnings wizzing past on the console, and there
> may have been a few I missed when doing other things.  I will repeat the
> excercise redirecting output and see if I can track those down, but they
> were only warnings (otherwise the make would have stopped).  But I
> never quite trust compilers to be entirely honest about the level of
> errors, so I will look to see if I can produce patches to get rid of them
> too.
>
> Regards
>
> David
Having redone the compile and extracted the warnings, here is the list
grouped by type of problem:-

Firstly, cast from pointer to integer of different size.

QWidget.cpp: In function `jlong Java_org_kde_qt_QWidget_paintDevice(JNIEnv*, 
   _jobject*)':
QWidget.cpp:2728: warning: cast from pointer to integer of different size
qtjava.cpp: In function `_jclass* 
   Java_org_kde_qt_qtjava_classFromQtMetaData(JNIEnv*, _jclass*, _jclass*, 
   _jstring*, long long int)':
qtjava.cpp:42: warning: cast to pointer from integer of different size
qtjava.cpp: In function `void Java_org_kde_qt_qtjava_setQt(JNIEnv*, _jclass*, 
   _jobject*, long long int)':
qtjava.cpp:100: warning: cast to pointer from integer of different size
qtjava.cpp: In function `jlong Java_org_kde_qt_qtjava_getQt(JNIEnv*, _jclass*, 
   _jobject*)':
qtjava.cpp:108: warning: cast from pointer to integer of different size
qtjava.cpp: In function `jlong Java_org_kde_qt_qtjava_newJavaSignal(JNIEnv*, 
   _jclass*)':
qtjava.cpp:116: warning: cast from pointer to integer of different size
qtjava.cpp: In function `jlong Java_org_kde_qt_qtjava_newJavaSlot(JNIEnv*, 
   _jclass*, _jobject*, _jstring*)':
qtjava.cpp:132: warning: cast from pointer to integer of different size
QPixmap.cpp: In function `jlong Java_org_kde_qt_QPixmap_paintDevice(JNIEnv*, 
   _jobject*)':
QPixmap.cpp:761: warning: cast from pointer to integer of different size
QPaintDevice.cpp: In function `jlong 
   Java_org_kde_qt_QPaintDevice_paintDevice(JNIEnv*, _jobject*)':
QPaintDevice.cpp:137: warning: cast from pointer to integer of different size
QMimeSource.cpp: In function `jlong 
   Java_org_kde_qt_QMimeSource_mimeSource(JNIEnv*, _jobject*)':
QMimeSource.cpp:51: warning: cast from pointer to integer of different size
QHostAddress.cpp: In function `void 
   Java_org_kde_qt_QHostAddress_newQHostAddress__S(JNIEnv*, _jobject*, short 
   int)':
QHostAddress.cpp:123: warning: cast to pointer from integer of different size
QHostAddress.cpp: In function `void 
   Java_org_kde_qt_QHostAddress_setAddress__S(JNIEnv*, _jobject*, short int)':
QHostAddress.cpp:154: warning: cast to pointer from integer of different size
QDropEvent.cpp: In function `jlong 
   Java_org_kde_qt_QDropEvent_mimeSource(JNIEnv*, _jobject*)':
QDropEvent.cpp:197: warning: cast from pointer to integer of different size
QtSupport.cpp: In static member function `static bool 
   QtSupport::eventFilterDelegate(QObject*, const char*, QObject*, QEvent*)':
QtSupport.cpp:158: warning: cast from pointer to integer of different size
QtSupport.cpp:159: warning: cast from pointer to integer of different size
QtSupport.cpp:161: warning: cast from pointer to integer of different size
QtSupport.cpp: In static member function `static bool 
   QtSupport::eventDelegate(QObject*, const char*, void*, const char*)':
QtSupport.cpp:200: warning: cast from pointer to integer of different size
QtSupport.cpp:201: warning: cast from pointer to integer of different size
QtSupport.cpp: In static member function `static bool 
   QtSupport::voidDelegate(void*, const char*, const char*)':
QtSupport.cpp:235: warning: cast from pointer to integer of different size
QtSupport.cpp: In static member function `static bool 
   QtSupport::booleanDelegate(QObject*, const char*)':
QtSupport.cpp:268: warning: cast from pointer to integer of different size
QtSupport.cpp: In static member function `static void* 
   QtSupport::getQt(JNIEnv*, _jobject*)':
QtSupport.cpp:419: warning: cast to pointer from integer of different size
QtSupport.cpp: In static member function `static void 
QtSupport::setQt(JNIEnv*, 
   _jobject*, void*)':
QtSupport.cpp:428: warning: cast from pointer to integer of different size
QtSupport.cpp: In static member function `static void 
   QtSupport::setObjectForQtKey(JNIEnv*, _jobject*, void*)':
QtSupport.cpp:449: warning: cast from pointer to integer of different size
QtSupport.cpp: In static member function `static _jobject* 
   QtSupport::objectForQtKey(JNIEnv*, void*, const char*, bool)':
QtSupport.cpp:477: warning: cast from pointer to integer of different size
QtSupport.cpp: In static member function `static void 
   QtSupport::qtKeyDeleted(void*)':
QtSupport.cpp:505: warning: cast from pointer to integer of different size
QtSupport.cpp: In static member function `static JavaSignal* 
   QtSupport::signalForSender(JNIEnv*, void*, _jstring*)':
QtSupport.cpp:601: warning: cast from pointer to integer of different size
QtSupport.cpp:601: warning: cast to pointer from integer of different size
QtSupport.cpp: In static member function `static JavaSlot* 
   QtSupport::slotForReceiver(JNIEnv*, _jobject*, _jstring*)':
QtSupport.cpp:618: warning: cast from pointer to integer of different size
QtSupport.cpp:618: warning: cast to pointer from integer of different size
QtSupport.cpp: In static member function `static QPaintDevice* 
   QtSupport::paintDevice(JNIEnv*, _jobject*)':
QtSupport.cpp:636: warning: cast to pointer from integer of different size
QtSupport.cpp: In static member function `static QMimeSource* 
   QtSupport::mimeSource(JNIEnv*, _jobject*)':
QtSupport.cpp:652: warning: cast to pointer from integer of different size
KMD5.cpp: In function `void Java_org_kde_koala_KMD5_update__S(JNIEnv*, 
   _jobject*, short int)':
KMD5.cpp:158: warning: cast to pointer from integer of different size
KMD5.cpp: In function `void Java_org_kde_koala_KMD5_update__SI(JNIEnv*, 
   _jobject*, short int, int)':
KMD5.cpp:165: warning: cast to pointer from integer of different size
KShred.cpp: In function `jboolean 
   Java_org_kde_koala_KShred_fillpattern(JNIEnv*, _jobject*, short int, int)':
KShred.cpp:93: warning: cast to pointer from integer of different size

Now some almost certainly benign unused parameters or variables.

QPopupMenu.cpp: In function `jint 
   Java_org_kde_qt_QPopupMenu_insertItem__Lorg_kde_qt_QIconSet_2Ljava_lang_String_2Lorg_kde_qt_QObject_2Ljava_lang_String_2
(JNIEnv*,
   _jobject*, _jobject*, _jstring*, _jobject*, _jstring*)':
QPopupMenu.cpp:1455: warning: unused variable `QString*_qstring_text'
QMenuData.cpp: In function `jint 
   Java_org_kde_qt_QMenuData_insertItem__Lorg_kde_qt_QIconSet_2Ljava_lang_String_2Lorg_kde_qt_QObject_2Ljava_lang_String_2
(JNIEnv*,
   _jobject*, _jobject*, _jstring*, _jobject*, _jstring*)':
QMenuData.cpp:713: warning: unused variable `QString*_qstring_text'
QMenuBar.cpp: In function `jint 
   Java_org_kde_qt_QMenuBar_insertItem__Lorg_kde_qt_QIconSet_2Ljava_lang_String_2Lorg_kde_qt_QObject_2Ljava_lang_String_2
(JNIEnv*,
   _jobject*, _jobject*, _jstring*, _jobject*, _jstring*)':
QMenuBar.cpp:1338: warning: unused variable `QString*_qstring_text'
KMainWindow.cpp: In function `_jobject* 
   Java_org_kde_koala_KMainWindow_memberList(JNIEnv*, _jobject*)':
KMainWindow.cpp:1605: warning: unused parameter `_jobject*obj'

Comparisons between signed and unsigned ints:-

QPointArray.cpp: In function `jboolean 
   Java_org_kde_qt_QPointArray_putPoints__II_3S(JNIEnv*, _jobject*, int, int, 
   _jshortArray*)':
QPointArray.cpp:229: warning: comparison between signed and unsigned integer 
   expressions

Casts between integers of different sizes:

QHostAddress.cpp: In function `void 
   Java_org_kde_qt_QHostAddress_newQHostAddress__S(JNIEnv*, _jobject*, short 
   int)':
QHostAddress.cpp:123: warning: cast to pointer from integer of different size
QHostAddress.cpp: In function `void 
   Java_org_kde_qt_QHostAddress_setAddress__S(JNIEnv*, _jobject*, short int)':
QHostAddress.cpp:154: warning: cast to pointer from integer of different size
QDropEvent.cpp: In function `jlong 
   Java_org_kde_qt_QDropEvent_mimeSource(JNIEnv*, _jobject*)':
QDropEvent.cpp:197: warning: cast from pointer to integer of different size
QDragObject.cpp: In function `jlong 
   Java_org_kde_qt_QDragObject_mimeSource(JNIEnv*, _jobject*)':
QDragObject.cpp:170: warning: cast from pointer to integer of different size

Odds and sods:-

QJpUnicodeConv.cpp:8: warning: `class QJpUnicodeConvJBridge' has virtual 
   functions but non-virtual destructor
QImage.cpp: In function `_jobject* Java_org_kde_qt_QImage_jumpTable(JNIEnv*, 
   _jobject*)':
QImage.cpp:341: warning: control reaches end of non-void function
KFileTreeViewToolTip.cpp:10: warning: `class KFileTreeViewToolTipJBridge' has 
   virtual functions but non-virtual destructor

Deprecations:-

KProgressDialog.cpp: In function `jboolean 
   Java_org_kde_koala_KProgressDialog_allowCancel(JNIEnv*, _jobject*)':
KProgressDialog.cpp:441: warning: `allowCancel' is deprecated (declared at 
   /usr/include/kde/kprogress.h:262)
KProgressDialog.cpp: In function `_jstring* 
   Java_org_kde_koala_KProgressDialog_buttonText(JNIEnv*, _jobject*)':
KProgressDialog.cpp:463: warning: `buttonText' is deprecated (declared at 
   /usr/include/kde/kprogress.h:341)
KProgressDialog.cpp: In function `_jstring* 
   Java_org_kde_koala_KProgressDialog_labelText(JNIEnv*, _jobject*)':
KProgressDialog.cpp:502: warning: `labelText' is deprecated (declared at 
   /usr/include/kde/kprogress.h:239)
KProgressDialog.cpp: In function `jint 
   Java_org_kde_koala_KProgressDialog_minimumDuration(JNIEnv*, _jobject*)':
KProgressDialog.cpp:516: warning: `minimumDuration' is deprecated (declared at 
   /usr/include/kde/kprogress.h:359)

Now of course many of these will be benign, or just unfortunate consequences
of differing conventions.  But the odds and sods, in particular the middle 
one, look worth investigating, and many of the others could start to be 
problems with 64bit architectures and the like, so I guess they need 
working through as well.

As for the deprecations, I am not sure what the kde-java policy is on 
such things?

David


More information about the Kde-java mailing list