[prev in list] [next in list] [prev in thread] [next in thread]
List: kfm-devel
Subject: Re: A more flexible solution for internet keywords
From: Andreas Hochsteger <e9625392 () student ! tuwien ! ac ! at>
Date: 2001-06-11 13:22:41
[Download RAW message or body]
Hi Dawit!
On Mon, 11 Jun 2001, Dawit Alemayehu wrote:
> On Sunday 10 June 2001 12:14, Andreas Hochsteger wrote:
> > Hi!
>
> Hi Andreas,
>
> > Sorry for this rather long mail, I hope you read it nevertheless ;-)
> > I've implemented a more flexible solution for the internet keywords which
> > solves some problems with more advanced queries and provides a more
> > flexible usage.
>
> I read your original post but forgot to respond, too many things going on :(
> Anyways, though I like this expaned feature I have some concerns that
> these changes might completely break the curent behavior. See below...
[...]
> > The algorithm works like this:
> > ------------------------------
> > The user query gets split at the spaces into a QStringList.
> ^^^^
> Here lies what I think could be the problem. Does typing for example
> gg:The K Desktop Environment work correctly ? If it does then the
> changes below are probably okay, but ofcourse we need to test and
> my concerns go away. Anyways, I am being lazy since I can apply
> the patch and test :)
Yes, this is working.
For details look at the code.
> > Testing:
> > --------
> > After applying the patch create an internet keyword 'ikw' with the
> > following (test-)URL:
> > http://www.ikwtest.com/1=\1&2=\2&3=\3&4=\4&5=\5&6=\6&7=\7&8=\8&9=\9&10=\10&
> >11=\11&12=\12&name=\name&test=\test
> >
> > Enter the following query into konqueror:
> > ikw:1 2 3 4 5 6 7 name=myname 9 test=mytest 11 12
> >
> > This query gets replaced with the following url:
> > http://www.ikwtest.com/1=1&2=2&3=3&4=4&5=5&6=6&7=7&8=name%3Dmyname&9=9&10=t
> >est%3Dmytest&11=11&12=12&name=myname&test=mytest
>
> Please add these and any other tests in the test unit code found under
> kdelibs/kio/tests/kurifiltertest.cpp and use it to test if the other scenarios
> work as well after making this change. The main framework (the plugin loader)
> that deals with this stuff is located under under kdelibs/kio...
Yes, I'll have a look at it.
>
> > \0 is a special reference and has the same meanig like \1 has now. It
> > simply expands to the whole user query. The old internet keyword files
> > needs to be changed therefore (replace \1 with \0) to work with the new
> > scheme.
>
> Hmm... this is also problematic since it breaks any .desktop file other people
> have created. It is fine for our own since we can adapot them. It also I guess
> as Yves stated messes with the charset entry. I can look into that.
I know, this is the only disadvantage I can see with it.
I'd suggest two different solutions for this:
1. During installation a script checks for old .desktop files and
replaces \1 with \0. This will do the job for the files in one
directory:
# ls *.desktop | xargs perl -pi -e 's/\\1/\\0/'
2. I can add a compatibility mode:
If the URL template only contains "\1" then it is renamed to "\0".
I think the second solution is the best.
[...]
> > Questions:
> > ----------
> > * I don't know, if I've done everything right with the encoding of the
> > strings.
> > Can somebody with more experience take a look at it and help me with that?
>
> I will take a look at this later today if Malte does not beat me to it :)
>
> > * When the code works for everyone and all agree to put it into cvs:
> > Can somebody put it into CVS for me, since I don't have an account?
>
> Yes and Yes :)
>
> > * What do you think about the global reference thing?
>
> Let me see how it works first :)
>
> Regards,
> Dawit A.
>
Bye,
Andreas
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic