2007/10/6, Nhuh Put <<a href="mailto:nhuh.put@web.de">nhuh.put@web.de</a>>:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Von: Andriy Rysin<br>Gesendet: Samstag, 6. Oktober 2007 20:34<br>An: <a href="mailto:kde-core-devel@kde.org">kde-core-devel@kde.org</a><br>Betreff: Re: patch for runner_lock to use kxkb kpart<br><br>> 2007/10/2, Oswald Buddenhagen <
<a href="mailto:ossi@kde.org">ossi@kde.org</a>>:<br>> On Mon, Oct 01, 2007 at 07:16:34PM -0400, Andriy Rysin wrote:<br>> > 2007/9/30, Oswald Buddenhagen <<a href="mailto:ossi@kde.org">ossi@kde.org</a>>:<br>
> > > would it be possible to use a plain libloader and QXEmbed (well, the<br>> > > qt4 equivalent) to make it more lightweight? or maybe we can introduce<br>a<br>> > > KBasicPart as a general solution?
<br>> ><br>> > I'll take a look to see if that's reasonable to do it with QXEmbed,<br>> ><br>> forget that part. qxembed is actually for embedding windows from<br>> external processes, which isn't the case here. :}
<br>> ideally, it would just provide a qwidget to plug into the normal layout.<br>> another point: i'd also like it to provide a qmenu to plug in.<br>><br>> Ok, would you consider something more like the attached version?
<br>><br>> It's a bit raw but pretty lightwieght - no additional libraries (no kpart,<br>no kio), loads only kdeinit_kxkb (which most probably is > already in the<br>memory), and uses simple C method to create component.
<br>> There are 4 modes one can create kxkb component in (enum in<br>kxkb_component.h file).<br>> I also wrote little macro to wrap up the library loading and function<br>reference process but I think this can be done much nicer.
<br><br>Please try to used the KPluginFactory system. It is very flexible and has<br>already support for stuff like objects with a different QWidget and QObject<br>parent. It makes also easier for other developers to use without figuring
<br>out the loading interface of the day.<br>You would also loose stuff like the library version check.</blockquote><div><br>actually that was my original patch, see above - I've used KPart for kxkb component.<br>
Though Oswald noted that libkpart pulls kio which is huge and that's overkill for small component like kxkb.<br>Thus I just used QLibrary and couple lines of code. I would be nice to have e.g. KLightPart but I am not sure it's reasonable to start talking about it right now.
<br></div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">And unload libraries only if you really now what you are doing! In most<br>times, it's a very bad idea.
</blockquote><div>Where did you see library unloading?<br><br></div>Andriy<br><br></div>