[Kde-java] Qt and KDE java package names
Gert-Jan van der Heiden
g.j.vanderheiden at genimen.com
Sun Aug 10 13:13:59 CEST 2003
I disagree. The old style packages looked fine by me. (Though the idea of
subpackages like kparts, kio, etc is an excellent idea)
These dns style names aren't true Java coding conventions, though it is widely
accepted.
Using lower case package names is a true Java coding convention. I would
recommend applying this convention, because it doesn't confuses a Java
programmer. It would be the same as writing Classes in lower case. Take this
example, it looks very strange (in my opinion):
Qt.QWidget
It looks like QWidget is an inner class of the class Qt.
oR IT LOOKS LIKE THIS. :)
That's just the difference between C++ and Java. Java is using the dot for
more purposes. Look at this:
Qt::QWidget (C++)
or this
Qt.QWidget (Java)
cheers,
Gert-Jan
On Friday 08 August 2003 14:03, Richard Dale wrote:
> Who wants to write:
>
> connect(myapp, "SLOT(org.kde.qt.QWidget, org.kde.koala.KPart)", ...
You made a point here. But if you write a serious application, this isn't an
exception either. I mean, if you define your own slot and signals, but I
don't know if the current bindings can do that. Maybe the new version?
> That is fine when all the KDE classes are in one package, but an important
> enhancement will be to split them up into packages which map onto the C++
> namespace - 'kparts', 'kio' and so on. And as soon as the KDE classes are
> in more than one package, the above solution doesn't work.
Wait a minute, the above statement (connect...) defines classes in a String.
So the above solution will always work, because the slot requires always
require packagename+classname.
I thing what you're ment to write is that classes used in Java code can be in
the same package. But are there so many classes with the same name in KDE?
More information about the Kde-java
mailing list