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

List:       ktexteditor-devel
Subject:    Re: Global Editor object, factory
From:       Matt Rogers <mattr () kde ! org>
Date:       2005-06-08 23:32:29
Message-ID: 200506081832.30054.mattr () kde ! org
[Download RAW message or body]

[Attachment #2 (multipart/signed)]


On Wednesday 08 June 2005 04:19 pm, Christoph Cullmann wrote:
> hi,
> as for some tasks, like config managment, command registration, document
> lists and so on, the KTextEditor::Document/View's would need one global
> object, and my first plan to use the factory for this fails, as:
>
>  1) factories get's deleted automagic by klibloader and that's not nice at
> app shutdown if still docs exists 2) kate and yzis internal singleton
> doesn't want such "hey, you will die now" stuff ;)
>
> here I propose a new way ;)
>
> 1) we add KTextEditor::Factory : public KParts::Factory
>      in addition to normal factory, it has a method to query the global
> editor object, which will stay alive at least as long as the factory itself
> + any remaining document/view (or even for eternity)
>
> 2) we add KTextEditor::Editor : public QObject
>      this should be the baseclass for the global editor object of the part,
> the document get's access for it, the editor object itself provides
> methodes to create KTextEditor::Document's and to provide a document list,
> additional, the config stuff is moved to this class, and we can provide
> interfaces for it, too
>
> This way we would have some safe global Editor object, and it would be
> still possible to load several different editor components in the same
> process. I would prefer that Factory and global object would be the same,
> but this would cause the above mentioned probs, see no real way to avoid
> this, as the factory will be deleted, and this will kill everything, and
> even if not, you could create 2 factory objects, which would be no good
> idea, too, if it is the global object, this way, the part can construct the
> global object itself in secret, and the apps only access it, which looks
> more safe
>
> cu
> Christoph

Seems sane enough, I suppose.

Matt

[Attachment #5 (application/pgp-signature)]

_______________________________________________
Ktexteditor-devel mailing list
Ktexteditor-devel@kde.org
https://mail.kde.org/mailman/listinfo/ktexteditor-devel


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

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