Moved the edit_infos stuff from CKDevelop to DocViewMan

Falk Brettschneider gigafalk at yahoo.com
Sun Mar 18 17:50:25 UTC 2001


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...

> 
> Bye,
> Christian.
Ciao,
F at lk

_________________________________________________________
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