<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    <div class="moz-cite-prefix">Sorry for the late answer, I was away
      from the computer.<br>
      <br>
      There must be something already with the progressbar, because when
      I call the image import for the png files, the progressbar at the
      bottom flashes. Only it always shows 0%.<br>
      <br>
      I don't know how it works now, I'm going to check the code
      tomorrow. We should be able to handle the race condition if one
      function using the progressbar calls another, and the called part
      also wants to set one for itself.<br>
      <br>
      Let's say there is function Alice() and she sends progressbar
      updates while working. During this, it calls function Bob() and he
      also reports its readiness. It's wrong to send all these values
      directly to the widget, the progressbar would flash like crazy.
      The good value for the widget is lerp( current(Alice),
      next(Alice), current(Bob) ). But the progressbar doesn't know the
      next(Alice) value - probably even Alice() can't calculate it
      before it really happens. And there can be a third Carole()
      function called by Bob() too...<br>
      <br>
      One solution could be to somehow separate the signals by their
      source and keep all these values in a list. I think the percentage
      report should contain an optional next value for the correct
      calculations. Without the provided next value, the lower levels
      should be ignored.<br>
      <br>
      But perhaps this is too complicated so it's easier to entirely
      disable the embedded reporting. In this case the initial
      setUpdater() call for Bob() should return an error code and tell
      Bob() that he must be silent.<br>
      <br>
      Fazek<br>
      <br>
      2016-03-04 15:04 keltezéssel, Dmitry Kazakov írta:<br>
    </div>
    <blockquote
cite="mid:CAEkBSfXtpEN1CsjxnpeE9MXc1MmVSwfLHdUfbHL0XLtWxneqBg@mail.gmail.com"
      type="cite">
      <blockquote type="cite">
        <pre wrap="">As far as I know, in the import/export plugins we don't have any progress
</pre>
        <blockquote type="cite">
          <pre wrap="">reporting framework (Boud will correct me if I'm wrong), though it might be
a good idea to have one.

</pre>
        </blockquote>
        <pre wrap="">
There actually is one, you can set an updater using
KisImportExportFilter::setUpdater and report progress with the
sigProgress(int percent); whether that actually works is another thing.
Adding progress reporting to our import/export plugins has been a todo
since we moved away from the built-in ImageMagick filters, I think!

But the proper thing to do is emit that signal from the filter and then
let me worry about how whether the progress bar is shown.

</pre>
      </blockquote>
      <pre wrap="">
Yes, that would be an ideal solution :)

</pre>
      <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
Krita mailing list
<a class="moz-txt-link-abbreviated" href="mailto:kimageshop@kde.org">kimageshop@kde.org</a>
<a class="moz-txt-link-freetext" href="https://mail.kde.org/mailman/listinfo/kimageshop">https://mail.kde.org/mailman/listinfo/kimageshop</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>