BUG: in tab mode closing one file closes multiple files

F@lk Brettschneider gigafalk at yahoo.com
Thu Jun 14 05:59:47 UTC 2001

Hi Roland,

Roland Krause wrote:
> When using tab mode, when trying to close one file, multiple files can
> get closed.
> Do this to reproduce the problem:
> Switch MDI mode to "tab mode".
> Open a project.
> Open one file.
> Open another file.
> Click on the first file opened to focus it.
> Click File->Close or hit Ctrl-W to close the file and both files will
> get closed.
This is due the missing fix for the known focus problem in the TabPage
MDI mode. I found out the inner widget gets the focus but not the
covering KDockTabXXX. It's a litte bit tricky with those embedding
techniques. Hopefully, I will fix this problem this week when I have
more time and KDE works again.
First I helped jowenn with a fix for konqueror in the Dockwidgets, then
KDE was completely fucked off with the latest CVS (kdm crashed, kaccel
crashed, DCOP as well).

> Falk, somewhere on the way I have lost the overview... there are too
> many functions that close views and docs. 
Generally, there's a big difference between closing a document and
closing a view in an MDI program since many views can exist for one
document. close(document) closes all-views-and-the-document, close(view)
just closes-one-single-view-but-not-necessarily-the-document.

Note the file==document.

concerning closing a document there are: {
  the actual close routines: {
    DocViewMan::closeKWriteDoc(KWriteDoc* pDoc)
    DocViewMan::closeCDocBrowser(CDocBrowser* pDoc)

  just slot redirections from CKDevelop which should result
  in calls for the 2 methods from above: {

concerning closing a view there are: {
  the actual close routine: {
    DocViewMan::closeView(QWidget* pWnd)

  subroutines of the one from above: {
    DocViewMan::closeEditView(CEditWidget* pView)
    DocViewMan::closeBrowserView(KHTMLView* pView)

> Especially, I dont understand
> why DocViewMan::closeView() has a QWidget* as a parameter...
This is because it's either to CEditWidget* or KHTMLView*. We
dynamically cast it and then we call either closeKWriteDoc(),
closeCDocBrowser(). Originally, these two subroutines were part of
closeView() but we splitted it to avoid large functions.

I think that shows how easy it is at all ;-),

Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com

to unsubscribe from this list send an email to kdevelop-devel-request at kdevelop.org with the following body:
unsubscribe »your-email-address«

More information about the KDevelop-devel mailing list