Confused by QMimeSourceFactory
Ok, here it goes. If you are not fluent in Qt programming the following entry will make no sense whatsoever :-)
If you set the contents of a QTextBrowser, and the content is HTML, it will call its QMimeSourceFactory's data() method to get MimeObjects representing, for example, images in the HTML.
So far so good.
However, I am mistified by this: While it's doing that, you can change the contents, and it will go along it's merry way, except that old data() calls are still in progress.
In other words, it acts as if it's multithreaded. Usually, in Qt, this is because someone is calling QApp::processEvents, and then you have multiple functions running and yielding to each other in the Qt event loop.
That is surely what's happeneing, but... how the hell does one stop the old data() calls????
The processEvents call is not made by me, it's done internally by some method in the QTextBrowser.... so, right now, in KRsN, sometimes you are downloading images for old stuff you saw minutes ago!