[Kstars-devel] KDE/kdeedu/kstars/kstars

Andrew Buck andrew.buck at ndsu.edu
Wed Dec 19 18:40:58 CET 2007


Hello again,

I kind of wondered if that embedded unicode symbol would work, even if
the text editor takes it I don't know if the compiler would like it.
The original code had these lines in it...

QString sdeg;
sdeg.sprintf("%c", 176);

we could basically combine this tequnique with Luciano's idea...

QString expression;
expression.sprintf("[hdms'\"%c \t\n\r\v\f]", 176);
entry.remove( QRegExp(expression) );


I haven't tested it at all (I deleted my old source directory thinking I
would get a SVN copy running and then was unable to get it working) but
I don't see any reason why it wouldn't work.

As for why it is getting called so much I have no idea.  I only know the
very basics of gprof and unfortunately since I deleted my source tree I
don't have the profile information anymore to re-examine it.  If you
want to you can just recompile your source tree with the -pg option, (or
re-run ./configure with the --profile option to change the makefile
automatically) then just run the program normally for a while, then
close it and run gprof on the output file "gmon.out" (the man page has
the syntax if your unfamiliar with it).  When I ran the program I let
Kstars load and then set up the time advance to 5 minutes and let it run
for a while to try to gather as much "real" execution time as possible.
I don't know why it should be used anywhere except reading in the star
databases, etc, at startup but according to gprof it got called several
million times so I would guess its being used somewhere in normal
execution, but this is just a very "un-educated" guess.

Note:  when you run gprof to analyze the output from the monitor run you
need to give it the name of the actual executable.  When I ran it with
just ./kstars it complained because that is just a shell script, I
needed to tell it to use ./.libs/kstars which is the real program.  I
don't know if the KDE4 version builds using this same method but if it
does you need to be aware of that to employ gprof.

-Buck


On Tue, 2007-12-18 at 16:42 -0700, Jason Harris wrote:
> Uh oh:
> 
> On Tuesday 18 December 2007 04:35:12 pm Jason Harris wrote:
> >  M  +1 -10     dms.cpp   [UTF-8 ENCODING PROBLEMS]
> (snip)
> > +    entry.remove( QRegExp("[hdms'\" \t\n\r\v\f]") );
> 
> That was a copy/paste of Luciano's string.  It looks like it didn't like my 
> degree symbol.  Is this perhaps because I was using emacs?  I can try it 
> again with kate.  Any other ideas?
> 
> Jason
> 
> _______________________________________________
> Kstars-devel mailing list
> Kstars-devel at kde.org
> https://mail.kde.org/mailman/listinfo/kstars-devel



More information about the Kstars-devel mailing list