tianqi22 / monav

Automatically exported from code.google.com/p/monav
0 stars 0 forks source link

Plugin Instances #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Hello,

first of all thank you for your hard work!

I don't know if this fits your code or your goal but I faced the problem that 
your static QPlugins can only be instantiated once. So this can give problems 
if you have starting address and target address together. That would need 2 
instances of the IAddressLookup plugin since it stores the city ID in the class.

I made a patch which makes it possible to instantiate the IAddressLookup plugin 
several times. I don't know if it is also feasable for the other plugins since 
you e.g. barely would need more than 1 route at a time ;-)

Original issue reported on code.google.com by daniel.g...@gmail.com on 27 Nov 2010 at 12:35

Attachments:

GoogleCodeExporter commented 9 years ago
Thanks for the suggestion.

Personally I do not really like the notion of separate instances.

As long as you are not using a single instance from two different threads 
simultaneously, you should not need to have several instances. Just explicitly 
set the respective place ID before calling GetStreetSuggestions and 
GetStreetData.

Maybe I'll make the place ID a parameter for those two functions again. That 
should remove confusion, as the Address Lookup plugin would not have an 
internal state anymore.

Original comment by veaac.fd...@gmail.com on 27 Nov 2010 at 11:14

GoogleCodeExporter commented 9 years ago
Your last suggestion would be the best and most clean solution! Would be really 
great to have that :-)

Original comment by daniel.g...@gmail.com on 28 Nov 2010 at 12:07

GoogleCodeExporter commented 9 years ago
This issue was closed by revision r391.

Original comment by veaac.fd...@gmail.com on 14 Dec 2010 at 9:30

GoogleCodeExporter commented 9 years ago
This issue was closed by revision d42ca316f95e.

Original comment by veaac.fd...@gmail.com on 23 Apr 2011 at 4:00