Changes to MDI Template
Ralf Nolden
nolden at kde.org
Fri Dec 8 14:11:42 UTC 2000
Pascal Francq wrote:
>
> Hi,
> I have a remark and a little bug fix concerning the MDI template, both
> concerning the "eventFilter" function of the application.
>
> 1°)
> You remove a view from a document and if the document contains not more
> views, it is removed from the pDocList. Just before remove it, it is perhaps
> useful to call "doc->closeDocument()" to make sure that all data are delete
> from memory (Some data may be delet in closeDocument and other in the
> destructor).
Hi Pascal,
hehe, 1) is a function that is handled when the document is deleted.
Which is
void KMenuBarBugDoc::removeView(KMenuBarBugView *view)
{
pViewList->remove(view);
if(!pViewList->isEmpty())
changedViewList();
else
deleteContents();
}
So the contents is cleared in deleteContents() if the view list is
empty. That ensures that the document can be removed. At least that is
planned to work that way ;) Correct me if I´m wrong here.
> 2°)
> With "pWorkspace->windowList().count()<1", the application test if the
> windows list is empty to set the correct title in this case. But, it doesn't
> work. The problem, I think, is that the view is delete from the Workspace
> after. To make it work, you must supply
>
> if(pWorkspace->windowList().count()<1)
>
> by something like
>
> QWidgetList l=pWorkspace->windowList();
> l.remove(pView);
> if(l.count()<1)
>
Yes, titles are a mess with KDE applications. I have now removed the
calls for setCaption in the App class completely, so at least we get a
caption that doesn´t do double stuff, now it only shows App -
[Untitled1] - App; the rest is a KDE libs problem which I should report
there.
Thanks,
Ralf
BTW: don´t you have a CVS account yet ? Searching for your last message
I found you had applied at me for working on kdevelop ;) some month ago,
what about it ?
--
The only way to get rid of a temptation is to yield to it. Oscar Wilde
**********************************
Ralf Nolden
The KDevelop Project
http://www.kdevelop.org
nolden at kde.org
rnolden at kdevelop.org
**********************************
-
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