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

List:       kde-commits
Subject:    [kdenlive] src: const'ref
From:       Montel Laurent <montel () kde ! org>
Date:       2013-05-31 17:13:46
Message-ID: 20130531171346.CB9E9A6067 () git ! kde ! org
[Download RAW message or body]

Git commit c45c2060cb43e4eec064624d967080cec0d15c6f by Montel Laurent.
Committed on 31/05/2013 at 16:13.
Pushed by mlaurent into branch 'master'.

const'ref

M  +3    -3    src/effectslist.cpp
M  +2    -2    src/effectslist.h
M  +5    -4    src/effectslistwidget.cpp
M  +45   -45   src/effectstackedit.cpp
M  +0    -2    src/encodingprofilesdialog.h
M  +1    -2    src/geometryval.h
M  +0    -2    src/kdenlivesettingsdialog.h

http://commits.kde.org/kdenlive/c45c2060cb43e4eec064624d967080cec0d15c6f

diff --git a/src/effectslist.cpp b/src/effectslist.cpp
index 95ddca8..2d81f00 100644
--- a/src/effectslist.cpp
+++ b/src/effectslist.cpp
@@ -389,7 +389,7 @@ void EffectsList::updateIndexes(QDomNodeList effects, int \
startIndex)  {
     for (int i = startIndex; i < effects.count(); ++i) {
         QDomElement listeffect =  effects.at(i).toElement();
-        listeffect.setAttribute("kdenlive_ix", i + 1);
+        listeffect.setAttribute(QLatin1String("kdenlive_ix"), i + 1);
     }
 }
 
@@ -403,13 +403,13 @@ void EffectsList::enableEffects(const QList <int>& indexes, \
bool disable)  }
 }
 
-QDomElement EffectsList::effectFromIndex(QDomNodeList effects, int ix)
+QDomElement EffectsList::effectFromIndex(const QDomNodeList &effects, int ix)
 {
     if (ix <= 0 || ix > effects.count()) return QDomElement();
     return effects.at(ix - 1).toElement();
 }
 
-void EffectsList::updateEffect(QDomElement effect)
+void EffectsList::updateEffect(const QDomElement &effect)
 {
     QDomNodeList effects = m_baseElement.childNodes();
     int ix = effect.attribute("kdenlive_ix").toInt();
diff --git a/src/effectslist.h b/src/effectslist.h
index 9654b5b..2ef55f0 100644
--- a/src/effectslist.h
+++ b/src/effectslist.h
@@ -71,7 +71,7 @@ public:
     void removeAt(int ix);
     QDomElement itemFromIndex(int ix) const;
     QDomElement insert(QDomElement effect);
-    void updateEffect(QDomElement effect);
+    void updateEffect(const QDomElement &effect);
     static bool hasKeyFrames(const QDomElement &effect);
     static bool hasSimpleKeyFrames(const QDomElement &effect);
     static bool hasGeometryKeyFrames(const QDomElement &effect);
@@ -89,7 +89,7 @@ public:
     static void removeMetaProperties(QDomElement producer);
     void clearList();
     /** @brief Get am effect with effect index equal to ix. */
-    QDomElement effectFromIndex(QDomNodeList effects, int ix);
+    QDomElement effectFromIndex(const QDomNodeList &effects, int ix);
     /** @brief Update all effects indexes to make sure they are 1, 2, 3, ... */
     void updateIndexes(QDomNodeList effects, int startIndex);
     /** @brief Enable / disable a list of effects */
diff --git a/src/effectslistwidget.cpp b/src/effectslistwidget.cpp
index 328d958..fbf8d1e 100644
--- a/src/effectslistwidget.cpp
+++ b/src/effectslistwidget.cpp
@@ -228,14 +228,14 @@ void EffectsListWidget::loadEffects(const EffectsList \
*effectlist, KIcon icon, Q  int ct = effectlist->count();
 
     
-    for (int ix = 0; ix < ct; ix ++) {
+    for (int ix = 0; ix < ct; ++ix) {
         effectInfo = effectlist->effectIdInfo(ix);
         effectInfo.append(QString::number(type));
         parentItem = NULL;
 
         if (folders) {
             for (int i = 0; i < folders->count(); ++i) {
-                l = folders->at(i)->data(0, IdRole).toString().split(',', \
QString::SkipEmptyParts); +                l = folders->at(i)->data(0, \
IdRole).toString().split(QLatin1Char(','), QString::SkipEmptyParts);  if \
(l.contains(effectInfo.at(2))) {  parentItem = folders->at(i);
                     break;
@@ -265,7 +265,7 @@ QTreeWidgetItem *EffectsListWidget::findFolder(const QString \
&name)  QTreeWidgetItem *item = NULL;
     QList<QTreeWidgetItem *> result = findItems(name, Qt::MatchExactly);
     if (!result.isEmpty()) {
-        for (int j = 0; j < result.count(); j++) {
+        for (int j = 0; j < result.count(); ++j) {
             if (result.at(j)->data(0, TypeRole) ==  EFFECT_FOLDER) {
                 item = result.at(j);
                 break;
@@ -363,7 +363,8 @@ void EffectsListWidget::dragMoveEvent(QDragMoveEvent *event)
 void EffectsListWidget::contextMenuEvent(QContextMenuEvent * event)
 {
     QTreeWidgetItem *item = itemAt(event->pos());
-    if (item && item->data(0, TypeRole).toInt() == EFFECT_CUSTOM) \
m_menu->popup(event->globalPos()); +    if (item && item->data(0, TypeRole).toInt() \
== EFFECT_CUSTOM) +        m_menu->popup(event->globalPos());
 }
 
 #include "effectslistwidget.moc"
diff --git a/src/effectstackedit.cpp b/src/effectstackedit.cpp
index 431c2c5..2a21a0f 100644
--- a/src/effectstackedit.cpp
+++ b/src/effectstackedit.cpp
@@ -52,7 +52,7 @@ EffectStackEdit::EffectStackEdit(Monitor *monitor, QWidget *parent) \
                :
     setSizePolicy(QSizePolicy(QSizePolicy::Expanding, \
QSizePolicy::MinimumExpanding));  
     setStyleSheet(EffectStackView2::getStyleSheet());
-    setWidget(m_baseWidget);   
+    setWidget(m_baseWidget);
     /*m_vbox = new QVBoxLayout(m_baseWidget);
     m_vbox->setContentsMargins(0, 0, 0, 0);
     m_vbox->setSpacing(2);    */
@@ -100,48 +100,48 @@ void EffectStackEdit::updateParameter(const QString &name, \
const QString &value)  bool EffectStackEdit::eventFilter( QObject * o, QEvent * e ) 
 {
     if (e->type() == QEvent::Wheel) {
-	QWheelEvent *we = static_cast<QWheelEvent *>(e);
-	bool filterWheel = verticalScrollBar() && verticalScrollBar()->isVisible();
-	if (!filterWheel || we->modifiers() != Qt::NoModifier) {
-	    e->accept();
-	    return false;
-	}
-	if (qobject_cast<QAbstractSpinBox*>(o)) {
-	    if(qobject_cast<QAbstractSpinBox*>(o)->focusPolicy() == Qt::WheelFocus)
-	    {
-		e->accept();
-		return false;
-	    }
-	    else
-	    {
-		e->ignore();
-		return true;
-	    }
-	}
-	if (qobject_cast<KComboBox*>(o)) {
-	    if(qobject_cast<KComboBox*>(o)->focusPolicy() == Qt::WheelFocus)
-	    {
-		e->accept();
-		return false;
-	    }
-	    else
-	    {
-		e->ignore();
-		return true;
-	    }
-	}
-	if (qobject_cast<QProgressBar*>(o)) {
-	    if(qobject_cast<QProgressBar*>(o)->focusPolicy() == Qt::WheelFocus)
-	    {
-		e->accept();
-		return false;
-	    }
-	    else
-	    {
-		e->ignore();
-		return true;
-	    }
-	}
+        QWheelEvent *we = static_cast<QWheelEvent *>(e);
+        bool filterWheel = verticalScrollBar() && verticalScrollBar()->isVisible();
+        if (!filterWheel || we->modifiers() != Qt::NoModifier) {
+            e->accept();
+            return false;
+        }
+        if (qobject_cast<QAbstractSpinBox*>(o)) {
+            if(qobject_cast<QAbstractSpinBox*>(o)->focusPolicy() == Qt::WheelFocus)
+            {
+                e->accept();
+                return false;
+            }
+            else
+            {
+                e->ignore();
+                return true;
+            }
+        }
+        if (qobject_cast<KComboBox*>(o)) {
+            if(qobject_cast<KComboBox*>(o)->focusPolicy() == Qt::WheelFocus)
+            {
+                e->accept();
+                return false;
+            }
+            else
+            {
+                e->ignore();
+                return true;
+            }
+        }
+        if (qobject_cast<QProgressBar*>(o)) {
+            if(qobject_cast<QProgressBar*>(o)->focusPolicy() == Qt::WheelFocus)
+            {
+                e->accept();
+                return false;
+            }
+            else
+            {
+                e->ignore();
+                return true;
+            }
+        }
     }
     return QWidget::eventFilter(o, e);
 }
@@ -164,11 +164,11 @@ void EffectStackEdit::transferParamDesc(const QDomElement &d, \
ItemInfo info, boo  sp->setFocusPolicy( Qt::StrongFocus );
     }
     Q_FOREACH( KComboBox * cb, m_baseWidget->findChildren<KComboBox*>() ) {
-	cb->installEventFilter( this );
+        cb->installEventFilter( this );
         cb->setFocusPolicy( Qt::StrongFocus );
     }
     Q_FOREACH( QProgressBar * cb, m_baseWidget->findChildren<QProgressBar*>() ) {
-	cb->installEventFilter( this );
+        cb->installEventFilter( this );
         cb->setFocusPolicy( Qt::StrongFocus );
     }
 }
diff --git a/src/encodingprofilesdialog.h b/src/encodingprofilesdialog.h
index 60468f0..af9938d 100644
--- a/src/encodingprofilesdialog.h
+++ b/src/encodingprofilesdialog.h
@@ -33,8 +33,6 @@ public:
     explicit EncodingProfilesDialog(int profileType, QWidget * parent = 0);
     ~EncodingProfilesDialog();
 
-protected:
-
 private slots:
     void slotLoadProfiles();
     void slotShowParams();
diff --git a/src/geometryval.h b/src/geometryval.h
index a0215a8..a1557fc 100644
--- a/src/geometryval.h
+++ b/src/geometryval.h
@@ -22,7 +22,6 @@
 #include <QWidget>
 #include <QDomElement>
 #include <QGraphicsPathItem>
-#include <QGraphicsView>
 
 #include <mlt++/Mlt.h>
 
@@ -31,9 +30,9 @@
 #include "keyframehelper.h"
 #include "timecodedisplay.h"
 
-//class QGraphicsScene;
 class GraphicsSceneRectMove;
 class QGraphicsRectItem;
+class QGraphicsView;
 
 
 class Geometryval : public QWidget, public Ui::Geometryval
diff --git a/src/kdenlivesettingsdialog.h b/src/kdenlivesettingsdialog.h
index f43a0b3..f00a32f 100644
--- a/src/kdenlivesettingsdialog.h
+++ b/src/kdenlivesettingsdialog.h
@@ -21,8 +21,6 @@
 #ifndef KDENLIVESETTINGSDIALOG_H
 #define KDENLIVESETTINGSDIALOG_H
 
-#include <QDialog>
-
 #include <QMap>
 #include <KConfigDialog>
 #include <KProcess>


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

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