]> git.sesse.net Git - kdenlive/commitdiff
Remove virtual keyword, fix include, fix indent
authorMontel Laurent <montel@kde.org>
Thu, 30 May 2013 07:28:31 +0000 (09:28 +0200)
committerMontel Laurent <montel@kde.org>
Thu, 30 May 2013 07:28:31 +0000 (09:28 +0200)
13 files changed:
src/commands/editclipcutcommand.cpp
src/commands/editclipcutcommand.h
src/commands/editeffectcommand.cpp
src/commands/editeffectcommand.h
src/commands/editfoldercommand.h
src/commands/editguidecommand.cpp
src/commands/editguidecommand.h
src/commands/editkeyframecommand.cpp
src/commands/editkeyframecommand.h
src/commands/groupclipscommand.cpp
src/commands/groupclipscommand.h
src/commands/insertspacecommand.cpp
src/commands/insertspacecommand.h

index 2d0f92f1cc495ba487e4b6d3aa3f03c1dbefc012..7bdfc53bd1a1a432c9ade3e6f406f12660539554 100644 (file)
@@ -21,6 +21,7 @@
 #include "projectlist.h"
 
 #include <KLocale>
+#include <KDebug>
 
 EditClipCutCommand::EditClipCutCommand(ProjectList *list, const QString &id, const QPoint &oldZone, const QPoint &newZone, const QString &oldComment, const QString &newComment, bool doIt, QUndoCommand * parent) :
         QUndoCommand(parent),
@@ -46,7 +47,8 @@ void EditClipCutCommand::undo()
 void EditClipCutCommand::redo()
 {
     kDebug() << "----  redoing action";
-    if (m_doIt) m_list->doUpdateClipCut(m_id, m_oldZone, m_newZone, m_newComment);
+    if (m_doIt)
+        m_list->doUpdateClipCut(m_id, m_oldZone, m_newZone, m_newComment);
     m_doIt = true;
 }
 
index dbd2af98a0277104f60a2391a912f4cb3535c44f..16f52ba54d80fedfd69b08abdfd54f3cba3becce 100644 (file)
@@ -24,8 +24,6 @@
 #include <QUndoCommand>
 #include <QPoint>
 
-#include <KDebug>
-
 class ProjectList;
 
 class EditClipCutCommand : public QUndoCommand
@@ -33,8 +31,8 @@ class EditClipCutCommand : public QUndoCommand
 public:
     EditClipCutCommand(ProjectList *list, const QString &id, const QPoint &oldZone, const QPoint &newZone, const QString &oldComment, const QString &newComment, bool doIt, QUndoCommand * parent = 0);
 
-    virtual void undo();
-    virtual void redo();
+    void undo();
+    void redo();
 
 private:
     ProjectList *m_list;
index dd9c00d31aa8b09eb2a245a84857ea85d4478db4..3fb2a33d104b0dacf1f4d1008dd0b0f789614491 100644 (file)
 
 #include "editeffectcommand.h"
 #include "customtrackview.h"
-
+#include <KDebug>
 #include <KLocale>
 
 EditEffectCommand::EditEffectCommand(CustomTrackView *view, const int track, const GenTime &pos, const QDomElement &oldeffect, const QDomElement &effect, int stackPos, bool refreshEffectStack, bool doIt, QUndoCommand *parent) :
-        QUndoCommand(parent),
-        m_view(view),
-        m_track(track),
-        m_oldeffect(oldeffect),
-        m_effect(effect),
-        m_pos(pos),
-        m_stackPos(stackPos),
-        m_doIt(doIt),
-        m_refreshEffectStack(refreshEffectStack)
+    QUndoCommand(parent),
+    m_view(view),
+    m_track(track),
+    m_oldeffect(oldeffect),
+    m_effect(effect),
+    m_pos(pos),
+    m_stackPos(stackPos),
+    m_doIt(doIt),
+    m_refreshEffectStack(refreshEffectStack)
 {
     QString effectName;
     QDomElement namenode = effect.firstChildElement("name");
-    if (!namenode.isNull()) effectName = i18n(namenode.text().toUtf8().data());
-    else effectName = i18n("effect");
+    if (!namenode.isNull())
+        effectName = i18n(namenode.text().toUtf8().data());
+    else
+        effectName = i18n("effect");
     setText(i18n("Edit effect %1", effectName));
 }
 
@@ -50,10 +52,14 @@ int EditEffectCommand::id() const
 // virtual
 bool EditEffectCommand::mergeWith(const QUndoCommand * other)
 {
-    if (other->id() != id()) return false;
-    if (m_track != static_cast<const EditEffectCommand*>(other)->m_track) return false;
-    if (m_stackPos != static_cast<const EditEffectCommand*>(other)->m_stackPos) return false;
-    if (m_pos != static_cast<const EditEffectCommand*>(other)->m_pos) return false;
+    if (other->id() != id())
+        return false;
+    if (m_track != static_cast<const EditEffectCommand*>(other)->m_track)
+        return false;
+    if (m_stackPos != static_cast<const EditEffectCommand*>(other)->m_stackPos)
+        return false;
+    if (m_pos != static_cast<const EditEffectCommand*>(other)->m_pos)
+        return false;
     m_effect = static_cast<const EditEffectCommand*>(other)->m_effect.cloneNode().toElement();
     return true;
 }
@@ -67,7 +73,7 @@ void EditEffectCommand::undo()
 void EditEffectCommand::redo()
 {
     if (m_doIt) {
-       m_view->updateEffect(m_track, m_pos, m_effect, m_refreshEffectStack);
+        m_view->updateEffect(m_track, m_pos, m_effect, m_refreshEffectStack);
     }
     m_doIt = true;
     m_refreshEffectStack = true;
index 8d63c86f5c2981d396c46209410d52b9ab099db8..1f0a266e3ac60f8327216fa38283499687efa2d5 100644 (file)
@@ -22,7 +22,6 @@
 #define EDITEFFECTCOMMAND_H
 
 #include <QUndoCommand>
-#include <KDebug>
 #include <gentime.h>
 #include <QDomElement>
 
@@ -35,8 +34,8 @@ public:
 
     virtual int id() const;
     virtual bool mergeWith(const QUndoCommand * command);
-    virtual void undo();
-    virtual void redo();
+    void undo();
+    void redo();
 
 private:
     CustomTrackView *m_view;
index 644292922decdfd5bfdd29642153e2439a92402e..3b62cb5d8bbdf994fc1f842f355f687b91df8ec0 100644 (file)
@@ -30,8 +30,8 @@ class EditFolderCommand : public QUndoCommand
 public:
     EditFolderCommand(ProjectList *view, const QString &newfolderName, const QString &oldfolderName, const QString &clipId, bool doIt, QUndoCommand *parent = 0);
 
-    virtual void undo();
-    virtual void redo();
+    void undo();
+    void redo();
 
 private:
     ProjectList *m_view;
index 7e12a7b38a448b470b228ea5b47b02f3996c30cd..0f5ece095189547c7eab8ce0771f10101ab2b14d 100644 (file)
 #include <KLocale>
 
 EditGuideCommand::EditGuideCommand(CustomTrackView *view, const GenTime &oldPos, const QString &oldcomment, const GenTime &pos, const QString &comment, bool doIt, QUndoCommand * parent) :
-        QUndoCommand(parent),
-        m_view(view),
-        m_oldcomment(oldcomment),
-        m_comment(comment),
-        m_oldPos(oldPos),
-        m_pos(pos),
-        m_doIt(doIt)
+    QUndoCommand(parent),
+    m_view(view),
+    m_oldcomment(oldcomment),
+    m_comment(comment),
+    m_oldPos(oldPos),
+    m_pos(pos),
+    m_doIt(doIt)
 {
     if (m_oldcomment.isEmpty()) {
-       setText(i18n("Add guide"));
-       m_oldPos = GenTime(-1);
+        setText(i18n("Add guide"));
+        m_oldPos = GenTime(-1);
     }
-    else if (m_oldPos == m_pos) setText(i18n("Edit guide"));
-    else if (m_pos < GenTime() && m_comment.isEmpty()) setText(i18n("Delete guide"));
-    else setText(i18n("Move guide"));
+    else if (m_oldPos == m_pos)
+        setText(i18n("Edit guide"));
+    else if (m_pos < GenTime() && m_comment.isEmpty())
+        setText(i18n("Delete guide"));
+    else
+        setText(i18n("Move guide"));
 }
 
-
 // virtual
 void EditGuideCommand::undo()
 {
index 189f5e4bccc3ab5f7cafddd19d10675939598d11..b317f8397c3a3a1e40fa30651ac679f7fe02c400 100644 (file)
 #define GUIDECOMMAND_H
 
 #include <QUndoCommand>
-#include <QGraphicsView>
-#include <QPointF>
-#include <QDomElement>
-#include <KDebug>
 
 #include "gentime.h"
 #include "definitions.h"
@@ -33,8 +29,8 @@ class EditGuideCommand : public QUndoCommand
 {
 public:
     EditGuideCommand(CustomTrackView *view, const GenTime &oldPos, const QString &oldcomment, const GenTime &pos, const QString &comment, bool doIt, QUndoCommand * parent = 0);
-    virtual void undo();
-    virtual void redo();
+    void undo();
+    void redo();
 
 private:
     CustomTrackView *m_view;
index 64b7a29dd668e81e41b8925eb81ba8a1ba5ab067..bf5de55d2a83b99823c8be309884ee67f0860406 100644 (file)
 #include <KLocale>
 
 EditKeyFrameCommand::EditKeyFrameCommand(CustomTrackView *view, const int track, const GenTime &pos, const int effectIndex, const QString& oldkeyframes, const QString& newkeyframes, bool doIt) :
-        QUndoCommand(),
-        m_view(view),
-        m_oldkfr(oldkeyframes),
-        m_newkfr(newkeyframes),
-        m_track(track),
-        m_index(effectIndex),
-        m_pos(pos),
-        m_doIt(doIt)
+    QUndoCommand(),
+    m_view(view),
+    m_oldkfr(oldkeyframes),
+    m_newkfr(newkeyframes),
+    m_track(track),
+    m_index(effectIndex),
+    m_pos(pos),
+    m_doIt(doIt)
 {
-    int prev = m_oldkfr.split(';', QString::SkipEmptyParts).count();
-    int next = m_newkfr.split(';', QString::SkipEmptyParts).count();
-    if (prev == next) setText(i18n("Edit keyframe"));
-    else if (prev > next) setText(i18n("Delete keyframe"));
-    else setText(i18n("Add keyframe"));
+    int prev = m_oldkfr.split(QLatin1Char(';'), QString::SkipEmptyParts).count();
+    int next = m_newkfr.split(QLatin1Char(';'), QString::SkipEmptyParts).count();
+    if (prev == next)
+        setText(i18n("Edit keyframe"));
+    else if (prev > next)
+        setText(i18n("Delete keyframe"));
+    else
+        setText(i18n("Add keyframe"));
     //kDebug() << "///  CREATE GUIDE COMMAND, TIMES: " << m_oldPos.frames(25) << "x" << m_pos.frames(25);
 }
 
index 2a2b5b2be39445e2f70a046a9bbe70ce711138ea..81ece609a8c207c263a18e6b2160bfb4f68b1995 100644 (file)
 #define KEYFRAMECOMMAND_H
 
 #include <QUndoCommand>
-#include <QGraphicsView>
-#include <QPointF>
-#include <QDomElement>
-#include <KDebug>
 
 #include "gentime.h"
 #include "definitions.h"
@@ -33,8 +29,8 @@ class EditKeyFrameCommand : public QUndoCommand
 {
 public:
     EditKeyFrameCommand(CustomTrackView *view, const int track, const GenTime &pos, const int effectIndex, const QString& oldkeyframes, const QString& newkeyframes, bool doIt);
-    virtual void undo();
-    virtual void redo();
+    void undo();
+    void redo();
 
 private:
     CustomTrackView *m_view;
index fa77295d0c36308fbeed320cce5ed5536098bee6..d8f2417a22b9e469a6ee5794ddc968540a07bfad 100644 (file)
 #include "customtrackview.h"
 
 #include <KLocale>
+#include <KDebug>
 
 GroupClipsCommand::GroupClipsCommand(CustomTrackView *view, const QList <ItemInfo> &clipInfos, const QList <ItemInfo>& transitionInfos, bool group, QUndoCommand * parent) :
-        QUndoCommand(parent),
-        m_view(view),
-        m_clips(clipInfos),
-        m_transitions(transitionInfos),
-        m_group(group)
+    QUndoCommand(parent),
+    m_view(view),
+    m_clips(clipInfos),
+    m_transitions(transitionInfos),
+    m_group(group)
 {
-    if (m_group) setText(i18n("Group clips"));
-    else setText(i18n("Ungroup clips"));
+    if (m_group)
+        setText(i18n("Group clips"));
+    else
+        setText(i18n("Ungroup clips"));
 }
 
 
 // virtual
 void GroupClipsCommand::undo()
 {
-// kDebug()<<"----  undoing action";
+    // kDebug()<<"----  undoing action";
     m_view->doGroupClips(m_clips, m_transitions, !m_group);
 }
 // virtual
index d1dd427bbf64c95344782f4e1adc8cc4bd58cebe..9e8728c42ebbfa01d31ef0ab728be902e622c50f 100644 (file)
 #define GROUPCLIPSCOMMAND_H
 
 #include <QUndoCommand>
-#include <QGraphicsView>
-#include <QPointF>
 
-#include <KDebug>
 #include "definitions.h"
 
 class CustomTrackView;
@@ -34,8 +31,8 @@ class GroupClipsCommand : public QUndoCommand
 {
 public:
     GroupClipsCommand(CustomTrackView *view, const QList <ItemInfo> &clipInfos, const QList <ItemInfo> &transitionInfos, bool group, QUndoCommand * parent = 0);
-    virtual void undo();
-    virtual void redo();
+    void undo();
+    void redo();
 
 private:
     CustomTrackView *m_view;
index 3e5a784a3b5c8aa6cda6ae1b9df15be4e0d7f2de..d06556f405398586e8f354a3d121a6cfb914acfd 100644 (file)
 #include <KLocale>
 
 InsertSpaceCommand::InsertSpaceCommand(CustomTrackView *view, const QList<ItemInfo> &clipsToMove, const QList<ItemInfo> &transToMove, int track, const GenTime &duration, bool doIt, QUndoCommand * parent) :
-        QUndoCommand(parent),
-        m_view(view),
-        m_clipsToMove(clipsToMove),
-        m_transToMove(transToMove),
-        m_duration(duration),
-        m_track(track),
-        m_doIt(doIt)
+    QUndoCommand(parent),
+    m_view(view),
+    m_clipsToMove(clipsToMove),
+    m_transToMove(transToMove),
+    m_duration(duration),
+    m_track(track),
+    m_doIt(doIt)
 {
-    if (duration > GenTime()) setText(i18n("Insert space"));
-    else setText(i18n("Remove space"));
+    if (duration > GenTime())
+        setText(i18n("Insert space"));
+    else
+        setText(i18n("Remove space"));
 }
 
 // virtual
index ab8d97dc8eaace3462765d74b2d96ebf4377813f..d41ec20e748f9375c8a92c026b95cd69bf344197 100644 (file)
@@ -22,9 +22,7 @@
 #define INSERTSPACECOMMAND_H
 
 #include <QUndoCommand>
-#include <QGraphicsView>
 
-#include <KDebug>
 #include "definitions.h"
 
 class CustomTrackView;
@@ -33,8 +31,8 @@ class InsertSpaceCommand : public QUndoCommand
 {
 public:
     InsertSpaceCommand(CustomTrackView *view, const QList<ItemInfo> &clipsToMove, const QList<ItemInfo> &transToMove, int track, const GenTime &duration, bool doIt, QUndoCommand * parent = 0);
-    virtual void undo();
-    virtual void redo();
+    void undo();
+    void redo();
 
 private:
     CustomTrackView *m_view;