[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: kdebase/konqueror/treeview
From:       Simon Hausmann <shaus () uermel ! Med ! Uni-Magdeburg ! DE>
Date:       1999-11-01 8:09:52
[Download RAW message or body]



On Mon, 1 Nov 1999, CVS by dfaure wrote:

> 
> kdebase/konqueror/treeview konq_treeviewitems.cc,NONE,1.1 \
> konq_treeviewitems.h,NONE,1.1 konq_treeviewwidget.cc,NONE,1.1 \
> konq_treeviewwidget.h,NONE,1.1 Makefile.am,1.1,1.2 konq_treeview.cc,1.78,1.79 \
>                 konq_treeview.h,1.36,1.37
> Author: dfaure
> CVSROOT: /home/kde
> Mon Nov  1 01:02:38 MET 1999
> Update of /home/kde/kdebase/konqueror/treeview
> In directory zeus:/tmp/cvs-serv11343/treeview
> 
> Modified Files:
> 	Makefile.am konq_treeview.cc konq_treeview.h 
> Added Files:
> 	konq_treeviewitems.cc konq_treeviewitems.h 
> 	konq_treeviewwidget.cc konq_treeviewwidget.h 
> Log Message:
> Just did the reverse of what enable-final does : the tree view is now split
> over 3 files instead of 1, with a maximum of 2 classes per file.
> A lot easier to read, debug, and maintain.
> Also overall Kfm->Konq renaming

This is great! The old konq_treeview.cc was really bloated :)
 
> Simon : do we need KonqTreeView and KonqTreeViewWidget to be separate 
> widgets, one inside the other ? ("KonqTreeViewWidget" is the former "KfmTreeView")

Unfortunately yes.

The reason is: We do not support multiple inheritance, as QObject/moc
doesn't. BrowserView is a QWidget. That's why we cannot make KonqTreeView
inherit from BrowserView and from QListView (KonqTreeViewWidget) , but
instead keep it as a child widget.

In the beginning I was very disappointed that we loose the multiple
inheritance feature, but after I while I really started liking the current
single-inheritance system, as in somehow it looks a lot cleaner IMHO:

There's a clear distinction between the interface to Konqueror, the
widget which displays the data and the extensions, as all are separate
objects/classes, brought together by the Qt Object Model :-)

In the old system everything was mixed up into one big class, which made
it
 a) bloat
 b) look ugly (IMHO)

Now we have clearly separated classes, all doing *their* specific task,
which is a much cleaner OO design IMHO.

Bye,
 Simon

P.S.: What do we learn from this: multiple inheritance is evil ;-))


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic