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

List:       kde-commits
Subject:    koffice/kpresenter/part
From:       Boudewijn Rempt <boud () valdyas ! org>
Date:       2010-07-14 17:38:13
Message-ID: 20100714173813.EE70AAC76A () svn ! kde ! org
[Download RAW message or body]

SVN commit 1149962 by rempt:

fix some warnings, mostly order of initialization and uninitialized values

 M  +2 -1      KPrPresentationStrategyBase.h  
 M  +1 -2      KPrViewModePresentation.h  
 M  +4 -0      animations/KPrAnimationLoader.cpp  
 M  +2 -2      animations/strategy/KPrAttributeHeight.cpp  
 M  +2 -2      animations/strategy/KPrAttributeRotate.cpp  
 M  +2 -2      animations/strategy/KPrAttributeWidth.cpp  
 M  +4 -1      animations/strategy/KPrSmilValues.cpp  
 M  +1 -0      commands/KPrAnimationCreateCommand.cpp  


--- trunk/koffice/kpresenter/part/KPrPresentationStrategyBase.h #1149961:1149962
@@ -46,8 +46,9 @@
     void activateDefaultStrategy();
     KoPACanvas * canvas();
 
+    KPrPresentationTool *m_tool;
     KPrPresentationToolEventForwarder *m_widget;
-    KPrPresentationTool *m_tool;
+
 };
 
 #endif /* KPRPRESENTATIONSTRATEGYBASE_H */
--- trunk/koffice/kpresenter/part/KPrViewModePresentation.h #1149961:1149962
@@ -160,9 +160,8 @@
     KPrAnimationDirector * m_pvAnimationDirector;
     KoPACanvas * m_presenterViewCanvas;
     KPrPresenterViewWidget * m_presenterViewWidget;
-    KPrView *m_view;
-
     KPrEndOfSlideShowPage * m_endOfSlideShowPage;
+    KPrView *m_view;
 };
 
 #endif /* KPRVIEWMODEPRESENTATION_H */
--- trunk/koffice/kpresenter/part/animations/KPrAnimationLoader.cpp #1149961:1149962
@@ -101,15 +101,19 @@
         indent += ' ';
     }
     if (KPrAnimationStep *a = dynamic_cast<KPrAnimationStep*>(animation)) {
+        Q_UNUSED(a);
         kDebug() << indent + "animation step";
     }
     else if (KPrAnimationSubStep *a = dynamic_cast<KPrAnimationSubStep*>(animation)) \
{ +        Q_UNUSED(a);
         kDebug() << indent + "animation sub step";
     }
     else if (KPrShapeAnimation *a = dynamic_cast<KPrShapeAnimation*>(animation)) {
+        Q_UNUSED(a);
         kDebug() << indent + "shape animation";
     }
     else if (KPrAnimationBase *a = dynamic_cast<KPrAnimationBase*>(animation)) {
+        Q_UNUSED(a);
         kDebug() << indent + "animation base";
     }
 
--- trunk/koffice/kpresenter/part/animations/strategy/KPrAttributeHeight.cpp \
#1149961:1149962 @@ -32,7 +32,7 @@
 
 void KPrAttributeHeight::updateCache(KPrAnimationCache *cache, KPrShapeAnimation \
*shapeAnimation, qreal value)  {
-    qreal tx, ty;
+    qreal tx, ty = 0.0;
     KoShape * shape = shapeAnimation->shape();
     KoTextBlockData * textBlockData = shapeAnimation->textBlockData();
     QTransform transform;
@@ -60,7 +60,7 @@
 
 void KPrAttributeHeight::initCache(KPrAnimationCache *animationCache, int step, \
KPrShapeAnimation * shapeAnimation, qreal startValue, qreal endValue)  {
-    qreal v1, v2, tx, ty;
+    qreal v1, v2, tx, ty = 0.0;
     KoShape * shape = shapeAnimation->shape();
     KoTextBlockData * textBlockData = shapeAnimation->textBlockData();
 
--- trunk/koffice/kpresenter/part/animations/strategy/KPrAttributeRotate.cpp \
#1149961:1149962 @@ -33,7 +33,7 @@
 
 void KPrAttributeRotate::updateCache(KPrAnimationCache *cache, KPrShapeAnimation \
*shapeAnimation, qreal value)  {
-    qreal tx, ty;
+    qreal tx, ty = 0.0;
     KoShape * shape = shapeAnimation->shape();
     KoTextBlockData * textBlockData = shapeAnimation->textBlockData();
     QTransform transform;
@@ -60,7 +60,7 @@
 
 void KPrAttributeRotate::initCache(KPrAnimationCache *animationCache, int step, \
KPrShapeAnimation * shapeAnimation, qreal startValue, qreal endValue)  {
-    qreal tx, ty;
+    qreal tx, ty = 0.0;
     KoShape * shape = shapeAnimation->shape();
     KoTextBlockData * textBlockData = shapeAnimation->textBlockData();
     if (textBlockData) {
--- trunk/koffice/kpresenter/part/animations/strategy/KPrAttributeWidth.cpp \
#1149961:1149962 @@ -32,7 +32,7 @@
 
 void KPrAttributeWidth::updateCache(KPrAnimationCache *cache, KPrShapeAnimation \
*shapeAnimation, qreal value)  {
-    qreal tx, ty;
+    qreal tx, ty = 0.0;
     KoShape * shape = shapeAnimation->shape();
     KoTextBlockData * textBlockData = shapeAnimation->textBlockData();
     QTransform transform;
@@ -62,7 +62,7 @@
 
 void KPrAttributeWidth::initCache(KPrAnimationCache *animationCache, int step, \
KPrShapeAnimation * shapeAnimation, qreal startValue, qreal endValue)  {
-    qreal v1, v2, tx, ty;
+    qreal v1, v2, tx, ty = 0.0;
     KoShape * shape = shapeAnimation->shape();
     KoTextBlockData * textBlockData = shapeAnimation->textBlockData();
 
--- trunk/koffice/kpresenter/part/animations/strategy/KPrSmilValues.cpp \
#1149961:1149962 @@ -29,7 +29,10 @@
 
 qreal KPrSmilValues::value(qreal time) const
 {
-    qreal value, value1, value2 = 0.0;
+    qreal value = 0.0;
+    qreal value1 = 0.0;
+    qreal value2 = 0.0;
+
     for (int i = 0; i < m_values.size(); i++) {
         if (time > m_times.at(i) && (m_times.at(i+1) - m_times.at(i))) {
             value1 = m_values.at(i).eval(m_cache);
--- trunk/koffice/kpresenter/part/commands/KPrAnimationCreateCommand.cpp \
#1149961:1149962 @@ -24,6 +24,7 @@
 #include "KPrDocument.h"
 #include "shapeanimations/KPrShapeAnimationOld.h"
 #include "KPrShapeAnimations.h"
+#include "animations/KPrShapeAnimation.h"
 
 KPrAnimationCreateCommand::KPrAnimationCreateCommand( KPrDocument * doc, \
KPrShapeAnimation * animation )  : m_doc( doc )


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

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