Help regarding the code

sujith h sujith.h at gmail.com
Wed Sep 15 04:58:24 CEST 2010


On Wed, Sep 15, 2010 at 4:01 AM, Aaron J. Seigo <aseigo at kde.org> wrote:

>  On Tuesday, September 14, 2010, sujith h wrote:
>
> > Hi,
>
> >
>
> > I were trying to modify the frame applet in kdeplasma-addons.
>
> > I am having a small issue with the diff attached with the
> mail(frame.diff).
>
> > The backtrace is also attached with
>
> > the mail(backtrace.txt). My intention is to pass emit the a function in
>
> > slideshow.cppwhen the directory is empty
>
> > to load images and then use the connect in the picture.cpp to write some
>
> > message to the a QString variable.
>
> > In the mean while I am initializing an object of SlideShow class using:
>
> >
>
> > m_slideshow = new SlideShow(this);
>
> >
>
> > Should this cause a problem? Pardon me if am wrong.
>
> you have an infinite loop, and youc an see this in the backtrace how it
> alternates between two lines back and forth:
>
> in your patch in Picture::Picture(), there is this:
>
>  m_slideshow = new SlideShow(this);
>
> so Picture creates a SlideShow. but in SlideShow's constructor, there is
> this:
>
>  m_picture = new Picture(this);
>
> which means Picture creates a Slideshow, which creates a Picture, which
> creates a SlideShow, which creates a ....
>
> you should not create the SlideShow in Picture. instead, right after
> "m_picture = new Picture(this);" in SlideShow, put this line:
>
>  connect(this, SIGNAL(emptyDirMessage()), m_picture,
> SLOT(customizeEmptyMessage()));
>
> that should work much better :)
>
> on a side note, instead of this:
>
>  if( m_picturePaths.size() == 0) {
>
> you can just do:
>
>  if (m_picturePaths.isEmtpy()) {
>
> we find it more readable
>
> also, please be careful to follow the coding style (whitespace, etc) in the
> files you work on.. cheers :)
>

Thanks a lot Aaron. I would try my best to rectify my errors.

 --
>
> Aaron J. Seigo
>
> humru othro a kohnu se
>
> GPG Fingerprint: 8B8B 2209 0C6F 7C47 B1EA EE75 D6B7 2EB1 A7F1 DB43
>
> KDE core developer sponsored by Qt Development Frameworks
>
>
> _______________________________________________
> Plasma-devel mailing list
> Plasma-devel at kde.org
> https://mail.kde.org/mailman/listinfo/plasma-devel
>
>


-- 
സുജിത് ഹരിദാസന്
Bangalore
http://fci.wikia.com/wiki/Anti-DRM-Campaign
<Blog> http://sujithh.info
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.kde.org/pipermail/plasma-devel/attachments/20100915/d52f07db/attachment.htm 


More information about the Plasma-devel mailing list