KDE-CVS-Digest for June 20, 2003

This week in KDE-CVS-Digest: CD burning application K3b begins to gain DVD writing functionality, continued fixes and improvements
to KWin, more on the binary compatibility debate, bug fixes, and more. Enjoy.

Dot Categories: 

Comments

by Sad Eagle (not verified)

As Androgynous Howard already described, it doesn't work like this, since it really look more like this (in a single inheritance case, let's not talk about MI :-) ):

struct Foo
{
Foo_vtable* vptr;
int data1;
int data2;
//..
}

struct Foo_vtable
{
int base_offset;
someFunctionPtr1 typeID;
someFunctionPtr2 virtualFunc1;
someFunctionPtr2 virtualFunc2;
...
}

Adding more virtuals becomes a problem when there is a class that inherited off
the base and added a new one. The traditional way of doing that would be for
the child to create a virtual table that has additional slots at the end. If the
parent puts something else in these locations, funny stuff happens, of course..

The size issue of course exists if you add more data members.
But it can also exist even when the allocation size of the object doesn't change.

Consider this:

struct Base
{
char v1;
char v2;
char v3;
};

Here, sizeof(Base) == 4 on most platforms due to alignment/padding. So can you safely add a char v4, since it'd still allocate 4 bytes? Nope.

If you had a
struct Child: public Base
{
char c1;
};

Many C++ implementations (I believe including g++-3.x) would pack the
new value into the padding of the parent class, so making the base class use it
is not a very good idea...

Anyway, the point of all this:
Most (all?) C++ ABIs are designed for performance, at the expense of making binary compatibility difficult. Therefore there are generally no easy answers --
just a lot of discipline plus some tricks...

by somebody (not verified)

Since KDE is C++, and C++ doesn't really allow this (because of virtual function tables, etc), it would be difficult to do this. But, another language, objective-C, does this quite nicely, using messages for doing method calls. The way a message works is through a proxy function, which just browses the object's message table, and calls the right method. It's pretty cool, just check it out at apple's site. IMHO it's much better than C++.

by Alex (not verified)

I remember reading a few months ago that the design adopted by KDE.org will replace the design which many KDE websites like:

http://www.kde.org/areas/people/
http://i18n.kde.org/
http://artist.kde.org/
http://dot.kde.org/
http://events.kde.org/
http://kdemyths.urbanlizard.com/
http://www.koffice.org/
http://www.kdevelop.org/
http://printing.kde.org/
http://women.kde.org/
http://developer.kde.org/
http://www.kdeleague.org/
http://enterprise.kde.org/
http://promo.kde.org/

do not us and have not even adopted the color-scheme. This is not even the complete list of website snot using the new design, it is a shame to see such inconsistency so many months after the new design became ffective and I am wondering if there si stilla plan to bring a level of consistency between the different designs KDE.org sub-sites have adopted.

I really hope this issue is taken seriously because it is really hurting KDE's image as a consistent desktop. People will think that if the sites are this inconsistent so must be the desktop.

Thanks,
I hope this issue will get resolved quickly =)

BTW: I will help, but I am leaving for 2 months starting tommarow so I can't help yet.

by annma (not verified)

http://women.kde.org has its own design and will not be ported to the new one.
For the other sites you list, very often webmasters are also developers and they cannot find time to port the website. I guess the dot has always had a style different from www.kde.org
I suggest that when you are available again (in 2 months), you cvs co the www module, you subscribe to the kde-www mailing list and you port those websites locally. Then you can make a tarball and send it to someone from the mailing list.
:-)
In my opinion, events and promo must be the first to be ported.

by Carlo (not verified)

I don't know anything about the structure of the kde libraries or qt, and so I really don't understand bugs like this one:

>Christian Loose committed a change to kdesdk/cervisia

>Implement BR 59644: Change key shortcuts for cvs add and
>cvs remove to Insert and Delete. Now you can use the plus and
>minus keys to fold/unfold the tree view like in most other KDE
>applications.

Shouldn't such controls like a treeview and their behaviour be part of kdelibs/kdebase, shared by all kde applications and only be overridden when necessary?

Allows this signal/slot mechanism no inheritance or so? To me (having no clue about qt) it looks like a sample of bad design. Please enlighten me! :-)

by Roie (not verified)

The +/- keys are indeed shared between all apps using the treeview control. The problem was that in cervisia, + and - were overridden to perform other functions, and therefore could not be used to expand and collapse the tree. These other functions were now remapped to the Ins/Del keys, so that +/- are again available for expanding/collapsing the tree.

by Carlo (not verified)

Thanks for the explanation. I had a second look at the diff and have to concede that this was a pretty dumb question. It was too early in the morning, I suppose.