Jean-Marc Lasgouttes wrote:
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:

Abdelrazak> Indeed. We could ask QErrorList to re-instantiate the
Abdelrazak> dialog... But what about this simpler patch instead? The
Abdelrazak> dialog will not remember its last position but this can be
Abdelrazak> implemented easily.

Did you try it?

Yes on win-msvc/qt4.

When you recreate a list, the first element is
selected even if you do not ask for it. At least on qt3.

Not with qt4 apparently ;-)

Believe, I
first tried the kind of solution you advocate.



Abdelrazak> The reason why I am insisting is because a change in the
Abdelrazak> controller to accomodate a dialog doesn't feel right.
Why? The controller is the model, isn't it?

Should be yes. And in this case the controller internal errorlist is kind-of the model. But with current architecture this is not really a model because the dialog needs to ask for a change instead of reacting to a model change.

Also, this patch does not
change the behaviour of the controller, it just adds a new feature
(the controller can say "I have new data for you") that can be
ignored.

Is it a theoretical or a practical objection?

Mostly theoretical for 1.4. But I agree that your patch is the right solution there.

For 1.5, I am sure we can do without with a proper model-view separation. Of course I will do so for qt4 only.


Abdelrazak> For qt4, doing the model/view separation (as in the
Abdelrazak> Citation and Toc dialogs) will solve the problem.

What would that change?

I am not going to inherit from QController (and thus not using build_dialog() and update_content()).

Conclusion: for 1.4, please go ahead as it is obviously the right fix. For 1.5, be warned that, if you implement it, I might erase it sometimes in the feature ;-)

Abdel.

Reply via email to