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

List:       kwrite-devel
Subject:    Re: File not read completely when opening?
From:       Christoph Cullmann <cullmann () babylon2k ! de>
Date:       2003-02-09 13:22:47
[Download RAW message or body]

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sunday 09 February 2003 12:52, Hamish Rodda wrote:
> Andras Mantia wrote:
> > Andras Mantia wrote:
> >
> > ...
> >
> >> According to the ReadOnlyPart code the signal is emited when the
> >> openFile() returns. So if openFile() wait until the whole file is read,
> >> then everything's fine. But in case we don't even need the completed(),
> >> as we can just wait for openURL() to return.
> >
> > ...
> >
> > The ReadOnlyPart::openURL() documentation says:
> >
> > "Only reimplement openURL if you don't want synchronous network
> > transparency Otherwise, reimplement openFile() only ."
> >
> > And later for openFile():
> >
> > "If the part uses the standard implementation of openURL(), it must
> > reimplement this, to open m_file. Otherwise simply define it to { return
> > false; } "
> >
> > Kate uses the standard openURL() implementation, and reimplements
> > openFile(). According to the above, in this case the opening should be
> > done in a synchronous way.
I thought the syncronoous would be for the network transparent part of it, 
which means: openURL defaults to use the syncronous downloading before it 
calls openFile for remote files, that says nothing about the whole openFile 
implementation. But in the part.cpp implementation of openURL it seems they 
want that openFile is syncrounous, too,  too bad. Perhaps kate should 
overwrite the standard openURL implementation with one that only emtis 
completed() after the stuff has really enended in the buffer. That would 
still allow to handle the stuff asyncronous per default but let the apps 
connect to the completed thingy.

>
> Hmm, looks like Andras has done the real investigation :)  My patch is thus
> quite hackish (didn't see these emails at the time), perhaps the other Kate
> devs can enlighten us as to why the loading was async in the first place...
explanation to that few lines above ;)


- -- 
Christoph Cullmann
KDE Developer, kde.org Co-Maintainer
http://www.babylon2k.de, cullmann@kde.org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE+RlYqyPjDGePm9UIRAmGUAJ0YrCc9mrdQvZ8lBpIoRnEohQk4ugCfUPWI
KRv51ggWT59TmFuf3AYsaTw=
=hNH9
-----END PGP SIGNATURE-----

_______________________________________________
KWrite-Devel mailing list
KWrite-Devel@mail.kde.org
http://mail.kde.org/mailman/listinfo/kwrite-devel
[prev in list] [next in list] [prev in thread] [next in thread] 

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