<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd"><html><head><meta name="qrichtext" content="1" /><style type="text/css">p, li { white-space: pre-wrap; }</style></head><body style=" font-family:'DejaVu Sans'; font-size:9pt; font-weight:400; font-style:normal;">On Monday 09 March 2009, Dmitry Kazakov wrote:<br>
&gt; &gt; &gt; KisFilter d-&gt;parentFilter;<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; KisSerializableConfiguration*<br>
&gt; &gt; &gt; KisFilterConfigurationFactory::createDefault() {<br>
&gt; &gt; &gt; return d-&gt;parentFilter-&gt;defaultConfiguration;<br>
&gt; &gt; &gt; }<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Is it?<br>
&gt; &gt;<br>
&gt; &gt; almost, with return d-&gt;parentFilter-&gt;factoryConfiguration(); instead :)<br>
&gt;<br>
&gt; In such a case we miss loading of the default configuration from kritarc.<br>
&gt; So return d-&gt;parentFilter-&gt;defaultConfiguration(); instead :P<br>
No we don't, since the factory is mainly used by the bookmark manager when reading from kritarc, and by using d-&gt;parentFilter-&gt;defaultConfiguration(); we create an infinite loop, since:<br>
defaultConfiguration() calls the bookmarkmanager which call the createDefault() from factory which calls defaultConfiguration() which calls the bookmarkmanager which call the createDefault() from factory which calls defaultConfiguration() which....<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>KisBaseProcessor::defaultConfiguration() is a convenient function supposed to return by order of preference:<br>
1) the default as set by the user (from the bookmarkmanager)<br>
2) the last used configuration (from the bookmarkmanager)<br>
3) call factoryConfiguration() if all the above have fails<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>Not sure why it's marked as virtual. And it should probably not be so, since there is no reason to overwrite it, and no filter does that currently, so probably a good idea to make it non virtual.<br>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;"><br></p>-- <br>
Cyrille Berger</p></body></html>