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

List:       kde-core-devel
Subject:    AW: patch for runner_lock to use kxkb kpart
From:       "Nhuh Put" <nhuh.put () web ! de>
Date:       2007-10-08 14:45:11
Message-ID: 00a701c809b9$d68ddc00$ad5d66d5 () spika
[Download RAW message or body]

Hello

No idea where I got the impression, you unload the library, sorry about
that.

But besides that, KPluginFactory is completely in kdecore and creating some
kind of custom KLightPart with it, would be really easy.

 

            PutHuhn

 

  _____  

Von: kde-core-devel-bounces-+nhuh.put=web.de@kde.org
[mailto:kde-core-devel-bounces-+nhuh.put=web.de@kde.org] Im Auftrag von
Andriy Rysin
Gesendet: Sonntag, 7. Oktober 2007 03:29
An: kde-core-devel@kde.org
Betreff: Re: patch for runner_lock to use kxkb kpart

 

2007/10/6, Nhuh Put <nhuh.put@web.de>:

Von: Andriy Rysin
Gesendet: Samstag, 6. Oktober 2007 20:34
An: kde-core-devel@kde.org
Betreff: Re: patch for runner_lock to use kxkb kpart

> 2007/10/2, Oswald Buddenhagen < ossi@kde.org>:
> On Mon, Oct 01, 2007 at 07:16:34PM -0400, Andriy Rysin wrote:
> > 2007/9/30, Oswald Buddenhagen <ossi@kde.org>:
> > > would it be possible to use a plain libloader and QXEmbed (well, the
> > > qt4 equivalent) to make it more lightweight? or maybe we can introduce
a
> > > KBasicPart as a general solution? 
> >
> > I'll take a look to see if that's reasonable to do it with QXEmbed,
> >
> forget that part. qxembed is actually for embedding windows from
> external processes, which isn't the case here. :} 
> ideally, it would just provide a qwidget to plug into the normal layout.
> another point: i'd also like it to provide a qmenu to plug in.
>
> Ok, would you consider something more like the attached version? 
>
> It's a bit raw but pretty lightwieght - no additional libraries (no kpart,
no kio), loads only kdeinit_kxkb (which most probably is > already in the
memory), and uses simple C method to create component. 
> There are 4 modes one can create kxkb component in (enum in
kxkb_component.h file).
> I also wrote little macro to wrap up the library loading and function
reference process but I think this can be done much nicer. 

Please try to used the KPluginFactory system. It is very flexible and has
already support for stuff like objects with a different QWidget and QObject
parent. It makes also easier for other developers to use without figuring 
out the loading interface of the day.
You would also loose stuff like the library version check.


actually that was my original patch, see above - I've used KPart for kxkb
component.
Though Oswald noted that libkpart pulls kio which is huge and that's
overkill for small component like kxkb.
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. 

 

And unload libraries only if you really now what you are doing! In most
times, it's a very bad idea. 

Where did you see library unloading?

Andriy


[Attachment #3 (text/html)]

<html xmlns:v="urn:schemas-microsoft-com:vml" \
xmlns:o="urn:schemas-microsoft-com:office:office" \
xmlns:w="urn:schemas-microsoft-com:office:word" \
xmlns:st1="urn:schemas-microsoft-com:office:smarttags" \
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
	{font-family:Tahoma;
	panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
	{margin:0cm;
	margin-bottom:.0001pt;
	font-size:12.0pt;
	font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:blue;
	text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
	{color:blue;
	text-decoration:underline;}
span.E-MailFormatvorlage18
	{mso-style-type:personal-reply;
	font-family:Arial;
	color:navy;}
@page Section1
	{size:595.3pt 841.9pt;
	margin:70.85pt 70.85pt 2.0cm 70.85pt;}
div.Section1
	{page:Section1;}
-->
</style>

</head>

<body lang=DE link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>Hello<o:p></o:p></span></font></p>


<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>No idea where I got the
impression, you unload the library, sorry about that.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>But besides that,
KPluginFactory is completely in kdecore and creating some kind of custom
KLightPart with it, would be really easy.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>


<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; \
PutHuhn<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span lang=EN-GB
style='font-size:10.0pt;font-family:Arial;color:navy'><o:p>&nbsp;</o:p></span></font></p>


<div style='border:none;border-left:solid blue 1.5pt;padding:0cm 0cm 0cm 4.0pt'>

<div>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>Von:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'>
kde-core-devel-bounces-+nhuh.put=web.de@kde.org
[mailto:kde-core-devel-bounces-+nhuh.put=web.de@kde.org] <b><span
style='font-weight:bold'>Im Auftrag von </span></b>Andriy Rysin<br>
<b><span style='font-weight:bold'>Gesendet:</span></b> Sonntag, 7. Oktober 2007
03:29<br>
<b><span style='font-weight:bold'>An:</span></b> <st1:PersonName \
w:st="on">kde-core-devel@kde.org</st1:PersonName><br> <b><span \
style='font-weight:bold'>Betreff:</span></b> Re: patch for runner_lock to use kxkb \
kpart</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>2007/10/6, Nhuh Put &lt;<a \
href="mailto:nhuh.put@web.de">nhuh.put@web.de</a>&gt;:<o:p></o:p></span></font></p>

<div>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm \
6.0pt; margin-left:4.8pt;margin-right:0cm'>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>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>
&gt; 2007/10/2, Oswald Buddenhagen &lt; <a \
href="mailto:ossi@kde.org">ossi@kde.org</a>&gt;:<br> &gt; On Mon, Oct 01, 2007 at \
07:16:34PM -0400, Andriy Rysin wrote:<br> &gt; &gt; 2007/9/30, Oswald Buddenhagen \
&lt;<a href="mailto:ossi@kde.org">ossi@kde.org</a>&gt;:<br> &gt; &gt; &gt; would it \
be possible to use a plain libloader and QXEmbed (well, the<br>
&gt; &gt; &gt; qt4 equivalent) to make it more lightweight? or maybe we can
introduce<br>
a<br>
&gt; &gt; &gt; KBasicPart as a general solution? <br>
&gt; &gt;<br>
&gt; &gt; I'll take a look to see if that's reasonable to do it with QXEmbed,<br>
&gt; &gt;<br>
&gt; forget that part. qxembed is actually for embedding windows from<br>
&gt; external processes, which isn't the case here. :} <br>
&gt; ideally, it would just provide a qwidget to plug into the normal layout.<br>
&gt; another point: i'd also like it to provide a qmenu to plug in.<br>
&gt;<br>
&gt; Ok, would you consider something more like the attached version? <br>
&gt;<br>
&gt; It's a bit raw but pretty lightwieght - no additional libraries (no kpart,<br>
no kio), loads only kdeinit_kxkb (which most probably is &gt; already in the<br>
memory), and uses simple C method to create component. <br>
&gt; There are 4 modes one can create kxkb component in (enum in<br>
kxkb_component.h file).<br>
&gt; 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.<o:p></o:p></span></font></p>

</blockquote>

<div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><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. <o:p></o:p></span></font></p>

</div>

<blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm \
6.0pt; margin-left:4.8pt;margin-right:0cm'>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p>&nbsp;</o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>And unload libraries only if you really now what you are doing! In most<br>
times, it's a very bad idea. <o:p></o:p></span></font></p>

</blockquote>

<div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>Where did you see library
unloading?<o:p></o:p></span></font></p>

</div>

<p class=MsoNormal style='margin-bottom:12.0pt'><font size=3
face="Times New Roman"><span \
style='font-size:12.0pt'>Andriy<o:p></o:p></span></font></p>

</div>

</div>

</div>

</body>

</html>



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

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