Andre Poenitz wrote:
On Thu, Sep 27, 2007 at 11:32:29AM +0200, Abdelrazak Younes wrote:
Peter Kümmel wrote:
Wouldn't it be better to catch an exception in main:
catch { QCoreApplication::exit(1) return 1; }
I only ask, because we had really strange cross-platform problems in
the past because of using exit
I did that (I committed it inadvertently together with r20530). It seems
to work fine.
Could someone on Mac report if there's any problem please? In order to
test it please apply this patch and try to insert a new inset in a new
document. In principle it should exit without crashing. Perhaps we
should warn the user that something bad happened.
Abdel.
Index: Inset.cpp
===================================================================
--- Inset.cpp (revision 20479)
+++ Inset.cpp (working copy)
@@ -124,6 +124,7 @@
Dimension const Inset::dimension(BufferView const & bv) const
{
+ throw 1;
return bv.coordCache().getInsets().dim(this);
}
Btw, you are aware of the fact that this "out of inset" dim cache might
have performance implications?
I've tested this quite extensively with a 1280x1024 screen full of math
insets and noticed none. The drawing speed is much more costly than the
map searching.
Formerly we could access e.g.
inset.width() with two or three assembler instruction, not it is looking
up a value in a map containing a few hundred or thousand items, i.e.
something in the range of n x 100 instructions...
Only those insets that are in the coord cache are in the map. In any
case the inset position is retrieved anyway so its not like we use to
never access the map.
Abdel.