[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    Re: branches/work/~makmanalp/plasma
From:       Alexis_Ménard <menard () kde ! org>
Date:       2009-07-02 21:33:47
Message-ID: 81941aea0907021433v7e462779o554c4167d10d95d2 () mail ! gmail ! com
[Download RAW message or body]

hehe man...it happens sometimes :D

On Thu, Jul 2, 2009 at 11:26 PM, Mehmet Ali Akmanalp <makmanalp@wpi.edu>wrote:

> SVN commit 990642 by makmanalp:
>
> Virtual destructors, multiple inclusion guards and also, damn you
> PLASMA_EXPORT!
> Took me 2 days to figure out why the hell plasma would compile fine, and
> when using
> plasma it would not error about classes not existing but it would error
> about
> undefined reference to vtable of foo (which means you somehow forgot to
> override a
> pure virtual function). I was going nuts, because everything that needed to
> be
> overriden was! To top it all, if I cut that part out and ran it standalone,
> it
> would run fine! But when I checked CMakeLists, nothing seemed wrong. Then
> in
> caffeine-supported depression and desperation, I noticed that all the other
> classes
> included plasma_export.h. Moral: Never poot a frogswallop with a honkytonk.
> </rant>
>
>
>  M  +13 -2     animationelements.cpp
>  M  +18 -4     animationelements.h
>
>
> --- branches/work/~makmanalp/plasma/animationelements.cpp #990641:990642
> @@ -1,9 +1,17 @@
>  #include <QObject>
> -#include "animationelements.h"
> +#include <kdebug.h>
> +#include <plasma/animationelements.h>
> +#include <iostream>
>
>  namespace Plasma
>  {
>
> +BaseAnimationElement::~BaseAnimationElement(){}
> +
> +//=========================================
> +
> +Animation::~Animation(){}
> +
>  void Animation::setObject(QWidget* receiver){
>     this->m_object = receiver;
>  }
> @@ -12,6 +20,9 @@
>
>  }
>
> +QPropertyAnimation* Animation::render(){
> +    std::cout <<"render";
> +}
>
>
>  void AnimationGroup::setObject(QWidget* receiver){
> @@ -22,5 +33,5 @@
>
>  }
>
> +} //namespace Plasma
>
> -} //namespace Plasma
> --- branches/work/~makmanalp/plasma/animationelements.h #990641:990642
> @@ -4,10 +4,14 @@
>  * for simple animations in Plasma.
>  */
>
> +#ifndef PLASMA_ANIMATIONELEMENTS_H
> +#define PLASMA_ANIMATIONELEMENTS_H
> +
>  #include <QtCore/QObject>
>  #include <QWidget>
>  #include <QMap>
>  #include <QPropertyAnimation>
> +#include <plasma/plasma_export.h>
>
>  namespace Plasma
>  {
> @@ -16,13 +20,17 @@
>  /**
>  * Abstract base class for AnimationGroup and Animation.
>  */
> -class BaseAnimationElement : public QObject
> +class PLASMA_EXPORT BaseAnimationElement : public QObject
>  {
>
>     Q_OBJECT
>
>  public:
>
> +//    BaseAnimationElement(){}
> +    virtual ~BaseAnimationElement() = 0;
> +
> +
>     /**
>      * Set the object on which the animation is to be performed.
>      * @arg receiver The QWidget to be animated.
> @@ -50,13 +58,16 @@
>  /**
>  * A group of Animations and / or AnimationGroups.
>  */
> -class AnimationGroup : public BaseAnimationElement
> +class PLASMA_EXPORT AnimationGroup : public BaseAnimationElement
>  {
>
>     Q_OBJECT
>
>  public:
>
> +//    AnimationGroup(){}
> +//    virtual ~AnimationGroup(){}
> +
>     /**
>      * Set the object on which the animation is to be performed.
>      */
> @@ -99,7 +110,6 @@
>      */
>     void remove(int id);
>
> -
>  private:
>
>     /**
> @@ -121,13 +131,16 @@
>  /**
>  * Abstract representation of a single animation.
>  */
> -class Animation : public BaseAnimationElement
> +class PLASMA_EXPORT Animation : public BaseAnimationElement
>  {
>
>     Q_OBJECT
>
>  public:
>
> +//    Animation(){}
> +    virtual ~Animation() = 0;
> +
>     /**
>      * Set the object on which the animation is to be performed.
>      */
> @@ -147,3 +160,4 @@
>
>  } //namespace Plasma
>
> +#endif
>

[Attachment #3 (text/html)]

hehe man...it happens sometimes :D<br><br><div class="gmail_quote">On Thu, Jul 2, \
2009 at 11:26 PM, Mehmet Ali Akmanalp <span dir="ltr">&lt;<a \
href="mailto:makmanalp@wpi.edu">makmanalp@wpi.edu</a>&gt;</span> \
wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, \
204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"> SVN commit 990642 by \
makmanalp:<br> <br>
Virtual destructors, multiple inclusion guards and also, damn you PLASMA_EXPORT!<br>
Took me 2 days to figure out why the hell plasma would compile fine, and when \
using<br> plasma it would not error about classes not existing but it would error \
about<br> undefined reference to vtable of foo (which means you somehow forgot to \
override a<br> pure virtual function). I was going nuts, because everything that \
needed to be<br> overriden was! To top it all, if I cut that part out and ran it \
standalone, it<br> would run fine! But when I checked CMakeLists, nothing seemed \
wrong. Then in<br> caffeine-supported depression and desperation, I noticed that all \
the other classes<br> included plasma_export.h. Moral: Never poot a frogswallop with \
a honkytonk. &lt;/rant&gt;<br> <br>
<br>
 M  +13 -2     animationelements.cpp<br>
 M  +18 -4     animationelements.h<br>
<br>
<br>
--- branches/work/~makmanalp/plasma/animationelements.cpp #990641:990642<br>
@@ -1,9 +1,17 @@<br>
 #include &lt;QObject&gt;<br>
-#include &quot;animationelements.h&quot;<br>
+#include &lt;kdebug.h&gt;<br>
+#include &lt;plasma/animationelements.h&gt;<br>
+#include &lt;iostream&gt;<br>
<br>
 namespace Plasma<br>
 {<br>
<br>
+BaseAnimationElement::~BaseAnimationElement(){}<br>
+<br>
+//=========================================<br>
+<br>
+Animation::~Animation(){}<br>
+<br>
 void Animation::setObject(QWidget* receiver){<br>
     this-&gt;m_object = receiver;<br>
 }<br>
@@ -12,6 +20,9 @@<br>
<br>
 }<br>
<br>
+QPropertyAnimation* Animation::render(){<br>
+    std::cout &lt;&lt;&quot;render&quot;;<br>
+}<br>
<br>
<br>
 void AnimationGroup::setObject(QWidget* receiver){<br>
@@ -22,5 +33,5 @@<br>
<br>
 }<br>
<br>
+} //namespace Plasma<br>
<br>
-} //namespace Plasma<br>
--- branches/work/~makmanalp/plasma/animationelements.h #990641:990642<br>
@@ -4,10 +4,14 @@<br>
  * for simple animations in Plasma.<br>
  */<br>
<br>
+#ifndef PLASMA_ANIMATIONELEMENTS_H<br>
+#define PLASMA_ANIMATIONELEMENTS_H<br>
+<br>
 #include &lt;QtCore/QObject&gt;<br>
 #include &lt;QWidget&gt;<br>
 #include &lt;QMap&gt;<br>
 #include &lt;QPropertyAnimation&gt;<br>
+#include &lt;plasma/plasma_export.h&gt;<br>
<br>
 namespace Plasma<br>
 {<br>
@@ -16,13 +20,17 @@<br>
 /**<br>
  * Abstract base class for AnimationGroup and Animation.<br>
  */<br>
-class BaseAnimationElement : public QObject<br>
+class PLASMA_EXPORT BaseAnimationElement : public QObject<br>
 {<br>
<br>
     Q_OBJECT<br>
<br>
 public:<br>
<br>
+//    BaseAnimationElement(){}<br>
+    virtual ~BaseAnimationElement() = 0;<br>
+<br>
+<br>
     /**<br>
      * Set the object on which the animation is to be performed.<br>
      * @arg receiver The QWidget to be animated.<br>
@@ -50,13 +58,16 @@<br>
 /**<br>
  * A group of Animations and / or AnimationGroups.<br>
  */<br>
-class AnimationGroup : public BaseAnimationElement<br>
+class PLASMA_EXPORT AnimationGroup : public BaseAnimationElement<br>
 {<br>
<br>
     Q_OBJECT<br>
<br>
 public:<br>
<br>
+//    AnimationGroup(){}<br>
+//    virtual ~AnimationGroup(){}<br>
+<br>
     /**<br>
      * Set the object on which the animation is to be performed.<br>
      */<br>
@@ -99,7 +110,6 @@<br>
      */<br>
     void remove(int id);<br>
<br>
-<br>
 private:<br>
<br>
     /**<br>
@@ -121,13 +131,16 @@<br>
 /**<br>
  * Abstract representation of a single animation.<br>
  */<br>
-class Animation : public BaseAnimationElement<br>
+class PLASMA_EXPORT Animation : public BaseAnimationElement<br>
 {<br>
<br>
     Q_OBJECT<br>
<br>
 public:<br>
<br>
+//    Animation(){}<br>
+    virtual ~Animation() = 0;<br>
+<br>
     /**<br>
      * Set the object on which the animation is to be performed.<br>
      */<br>
@@ -147,3 +160,4 @@<br>
<br>
 } //namespace Plasma<br>
<br>
+#endif<br>
</blockquote></div><br>



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic