]> git.sesse.net Git - kdenlive/commitdiff
const'ref
authorMontel Laurent <montel@kde.org>
Fri, 31 May 2013 14:13:38 +0000 (16:13 +0200)
committerMontel Laurent <montel@kde.org>
Fri, 31 May 2013 14:13:38 +0000 (16:13 +0200)
src/effectslist.cpp
src/effectslist.h
src/effectslistwidget.cpp
src/effectstackedit.cpp
src/encodingprofilesdialog.h
src/geometryval.h
src/kdenlivesettingsdialog.h

index 95ddca8a92592f1e7dcad496b1efda9378b603fd..2d81f00d586144d537db572f23ace09d238d678e 100644 (file)
@@ -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();
index 9654b5bb6174fb19fe077afe770dc2c09ca3a482..2ef55f0f4bdaf82263e2c3f57a5b3eb59b82fda6 100644 (file)
@@ -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 */
index 328d95813c03384289fdce8e4df54b58f70273be..fbf8d1e59478aee5d3d48b933412ca711546da03 100644 (file)
@@ -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"
index 431c2c52930b87ca540c49f1f4ed4652c8984026..2a21a0fc01ab9e4d06e773bbaac4638733f5269d 100644 (file)
@@ -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 );
     }
 }
index 60468f0dea1cbd3e9d439f2544ff737a4f95508e..af9938deeac96d4fb15a5bbfb715960bba2d7c0f 100644 (file)
@@ -33,8 +33,6 @@ public:
     explicit EncodingProfilesDialog(int profileType, QWidget * parent = 0);
     ~EncodingProfilesDialog();
 
-protected:
-
 private slots:
     void slotLoadProfiles();
     void slotShowParams();
index a0215a80cb1c5d678ba0231d5befdc8b4f2d0aeb..a1557fc03f5bb6b05cb7340cf2f2848e253eff4a 100644 (file)
@@ -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
index f43a0b3fe27e5ec232f0393b27b16084429687fa..f00a32faa89d95f3e5853ac50a3154bdaf925732 100644 (file)
@@ -21,8 +21,6 @@
 #ifndef KDENLIVESETTINGSDIALOG_H
 #define KDENLIVESETTINGSDIALOG_H
 
-#include <QDialog>
-
 #include <QMap>
 #include <KConfigDialog>
 #include <KProcess>