Moved the edit_infos stuff from CKDevelop to DocViewMan

Christian Couder chcouder at club-internet.fr
Sun Mar 18 18:01:34 UTC 2001


Falk Brettschneider a écrit :
> 
> Christian Couder wrote:
> >
> > Hi everyone,
> Hi!
> 
> >
> > I just commited some big changes to the ckdevelop files and docviewman
> > files.
> > I think the edit_infos list should be merged with the m_docsAndViews
> > list.
> > Currently I just moved the edit_infos stuff in the DocViewMan class to
> > make the merge easier and to clean a little the ckdevelop files.
> Nice idea to put the edit_infos stuff into the DocViewMan. :-)
> 
> But I think it could be dropped, totally:
> 
> struct TEditInfo {
>   /**  the id in the menu-buffer*/
>   int id;  ---> docId
>   QString filename; ---> ask KWriteDoc::fileName()
>   QCString text; ---> ask KWriteDoc::text()
>   bool modified; ---> ask KWriteDoc::isModified()
>   int cursor_line; ---> should be requested from KWriteDoc
>   int cursor_col; ---> should be requested from KWriteDoc
>   QDateTime last_modified; ---> should be requested from KWriteDoc
> };
> All information in the struct belongs to KWriteDoc since it's specific
> for edit widgets.
> We should always directly ask the KWriteDoc. Eventually, we should add
> new get methods. Otherwise we must always take care for the
> synchronization of the data in the KWriteDoc and the TEditInfo which is
> hard to do and seems to be overhead.
> 
> Also: if we added this to the struct DocViewNode, we would make it too
> special for edit widgets. But it also manages Browser documents and
> their views as well.
> 
> Christian, what do you think about replacing TEditInfo by direct
> KWriteDoc calls? Thanks the fact that you've moved the whole stuff to
> DocViewMan, it should be easy to get it done...

You are probably right.
I already wanted to remove the "text" member of the TEditInfo struct
because it is somewhat useless and it create bugs in the bookmark stuff.

I will do it if you don't mind.

Bye,
Christian.

-
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