[Psi-devel] Re: a patch for auto-replace
Kevin Smith
kevin at kismith.co.uk
Wed Feb 9 01:46:38 PST 2005
On Wed, Feb 09, 2005 at 04:04:18AM -0500, Nolan Eakins wrote:
> Michail Pishchagin wrote:
> | Kevin Smith wrote:
> |>I appreciate that, but the better way would be to extend the qtextedit
> |>instead. Class that exist only to meddle with the internals of another
> |>class aren't a good idea really. /K
> | My code for nick completion is not built into QTextEdit too, and is
> done in a
> | similar fashion. What should I do? How should I live? :)
> Like the rest of the meddlers. :-)
> I agree that the nick completion probably should have gone into its own
> widget class. Its parent widget would have to provide some methods of
> its own to get the list of nicks and stuff though.
The completion code being put in another class is fine, as is the autoreplace string matching stuff. What I was saying shouldn't be done is the chatdlg (etc) passing out its QTextEdit* for another class to meddle with. Instead QTextEdit should be extended so that it passes out the string of the new words/etc, and replaces them itself. ChatDlg (or whatever) could equally do this, although inheriting classes is probably neater.
/K
--
Kevin Smith
PhD Research Student, Dept. Computer Science, University Of Exeter
Taekwon-Do Club Captain, University of Exeter
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://listserver.dreamhost.com/pipermail/psi-devel-affinix.com/attachments/20050209/838d04b6/attachment.bin
More information about the Psi-devel-affinix.com
mailing list