While preparing updated 3.4.2 packages for Debian unstable, we found that kdebindings failed to build from source on 64 bit architectures with the following error: qtjava/javalib/qtjava/QPointArray.cpp:279: error: cast from 'QPoint*' to 'jint' loses precision This affects architectures like alpha, ia64 and amd64. Complete logs can be fetched from http://buildd.debian.org/fetch.php?&pkg=kdebindings&ver=4%3A3.4.2-1&arch=ia64&stamp=1129866203&file=log&as=raw and http://buildd.debian.org/fetch.php?&pkg=kdebindings&ver=4%3A3.4.2-1&arch=alpha&stamp=1129867513&file=log&as=raw. The compiler was GCC 4.0.2 (mentioned at the top of the log). Steve Langasek <vorlon@debian.org> provided a patch that changes the return value of QPointArray::begin and ::end to return a jlong instead of jint. Attached.
Created attachment 13154 [details] Fix kdebindings FTBFS by making QPointArray::{begin,end} return jlong instead of jint
SVN commit 474384 by rdale: * Removed QPointArray.begin() and end() methods as they don't compile on 64 bit machines, and Iterators can't be used in QtJava anyway. Fixes problem reported by Adeodato S. CCBUGS: 115104 M +6 -0 ChangeLog M +0 -2 javalib/org/kde/qt/QPointArray.java M +0 -12 javalib/qtjava/QPointArray.cpp M +0 -2 javalib/qtjava/QPointArray.h --- branches/KDE/3.5/kdebindings/qtjava/ChangeLog #474383:474384 @@ -1,3 +1,9 @@ +2005-10-26 Richard Dale <Richard_Dale@tipitina.demon.co.uk> + + * Removed QPointArray.begin() and end() methods as they don't compile + on 64 bit machines, and Iterators can't be used in QtJava anyway. + Fixes problem reported by Adeodato S. + 2005-10-23 Richard Dale <Richard_Dale@tipitina.demon.co.uk> * Regenerated the java bindings from the Qt 3.3.5 headers --- branches/KDE/3.5/kdebindings/qtjava/javalib/org/kde/qt/QPointArray.java #474383:474384 @@ -63,8 +63,6 @@ public native boolean isNull(); public native boolean resize( int size); public native boolean truncate( int pos); - public native int begin(); - public native int end(); public native QPoint at(int index); } --- branches/KDE/3.5/kdebindings/qtjava/javalib/qtjava/QPointArray.cpp #474383:474384 @@ -273,18 +273,6 @@ return (jboolean) ((QPointArrayJBridge*) QtSupport::getQt(env, obj))->truncate((uint) pos); } -JNIEXPORT jint JNICALL -Java_org_kde_qt_QPointArray_begin(JNIEnv *env, jobject obj) -{ - return (jint) ((QPointArrayJBridge*) QtSupport::getQt(env, obj))->begin(); -} - -JNIEXPORT jint JNICALL -Java_org_kde_qt_QPointArray_end(JNIEnv *env, jobject obj) -{ - return (jint) ((QPointArrayJBridge*) QtSupport::getQt(env, obj))->end(); -} - JNIEXPORT jobject JNICALL Java_org_kde_qt_QPointArray_at(JNIEnv * env, jobject obj, jint index) { --- branches/KDE/3.5/kdebindings/qtjava/javalib/qtjava/QPointArray.h #474383:474384 @@ -41,8 +41,6 @@ extern JNIEXPORT jboolean JNICALL Java_org_kde_qt_QPointArray_isNull (JNIEnv *env, jobject); extern JNIEXPORT jboolean JNICALL Java_org_kde_qt_QPointArray_resize (JNIEnv *env, jobject, jint); extern JNIEXPORT jboolean JNICALL Java_org_kde_qt_QPointArray_truncate (JNIEnv *env, jobject, jint); -extern JNIEXPORT jint JNICALL Java_org_kde_qt_QPointArray_begin (JNIEnv *env, jobject); -extern JNIEXPORT jint JNICALL Java_org_kde_qt_QPointArray_end (JNIEnv *env, jobject); extern JNIEXPORT jobject JNICALL Java_org_kde_qt_QPointArray_at (JNIEnv *env, jobject, jint); #ifdef __cplusplus
SVN commit 474385 by rdale: * Removed QPointArray.begin() and end() methods as they don't compile on 64 bit machines, and Iterators can't be used in QtJava anyway. Fixes problem reported by Adeodato S. CCBUGS: 115104 M +0 -12 kalyptusCxxToJNI.pm --- branches/KDE/3.5/kdebindings/kalyptus/kalyptusCxxToJNI.pm #474384:474385 @@ -1322,18 +1322,6 @@ return (jboolean) ((QPointArrayJBridge*) QtSupport::getQt(env, obj))->truncate((uint) pos); } -JNIEXPORT jint JNICALL -Java_org_kde_qt_QPointArray_begin(JNIEnv *env, jobject obj) -{ - return (jint) ((QPointArrayJBridge*) QtSupport::getQt(env, obj))->begin(); -} - -JNIEXPORT jint JNICALL -Java_org_kde_qt_QPointArray_end(JNIEnv *env, jobject obj) -{ - return (jint) ((QPointArrayJBridge*) QtSupport::getQt(env, obj))->end(); -} - JNIEXPORT jobject JNICALL Java_org_kde_qt_QPointArray_at(JNIEnv * env, jobject obj, jint index) {
*** Bug 113537 has been marked as a duplicate of this bug. ***
Hi! Is this bug still valid on KDE 4?
No. QtJava hasn't been ported to KDE4. And it's been fixed anyway from what it says in Richards commit message.