[vlmc-devel] AbstractGraphicsItem::triggerResize : Remove a useless parameter
Yikai Lu
git at videolan.org
Tue Jun 28 10:39:46 CEST 2016
vlmc | branch: master | Yikai Lu <luyikei.qmltu at gmail.com> | Tue Jun 28 16:21:55 2016 +0900| [e1bd060203f1c5d9e9b400e0123c4fd9239d927e] | committer: Yikai Lu
AbstractGraphicsItem::triggerResize : Remove a useless parameter
> https://code.videolan.org/videolan/vlmc/commit/e1bd060203f1c5d9e9b400e0123c4fd9239d927e
---
src/Gui/timeline/AbstractGraphicsItem.h | 2 +-
src/Gui/timeline/AbstractGraphicsMediaItem.cpp | 7 ++-----
src/Gui/timeline/AbstractGraphicsMediaItem.h | 2 +-
src/Gui/timeline/GraphicsEffectItem.cpp | 3 +--
src/Gui/timeline/GraphicsEffectItem.h | 2 +-
src/Gui/timeline/TracksView.cpp | 4 ++--
6 files changed, 8 insertions(+), 12 deletions(-)
diff --git a/src/Gui/timeline/AbstractGraphicsItem.h b/src/Gui/timeline/AbstractGraphicsItem.h
index a7c437d..6e152db 100644
--- a/src/Gui/timeline/AbstractGraphicsItem.h
+++ b/src/Gui/timeline/AbstractGraphicsItem.h
@@ -122,7 +122,7 @@ class AbstractGraphicsItem : public QObject, public QGraphicsItem
qint64 width() const;
virtual void triggerMove( TrackWorkflow* target, qint64 startPos ) = 0;
- virtual void triggerResize( TrackWorkflow* target, Workflow::Helper *helper,
+ virtual void triggerResize( TrackWorkflow* target,
qint64 newBegin, qint64 newEnd, qint64 pos ) = 0;
virtual std::shared_ptr<Workflow::Helper> helper() = 0;
virtual qint32 zSelected() const = 0;
diff --git a/src/Gui/timeline/AbstractGraphicsMediaItem.cpp b/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
index d895269..5b13a15 100644
--- a/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
+++ b/src/Gui/timeline/AbstractGraphicsMediaItem.cpp
@@ -260,15 +260,12 @@ AbstractGraphicsMediaItem::helper()
}
void
-AbstractGraphicsMediaItem::triggerResize( TrackWorkflow* target, Workflow::Helper *helper,
+AbstractGraphicsMediaItem::triggerResize( TrackWorkflow* target,
qint64 newBegin, qint64 newEnd, qint64 pos )
{
- Clip *clip = qobject_cast<Clip*>( helper );
- if ( clip == nullptr )
- return ;
if ( target == nullptr )
return ;
- Commands::trigger( new Commands::Clip::Resize( target, clip, newBegin,
+ Commands::trigger( new Commands::Clip::Resize( target, m_clip.get(), newBegin,
newEnd, pos ) );
}
diff --git a/src/Gui/timeline/AbstractGraphicsMediaItem.h b/src/Gui/timeline/AbstractGraphicsMediaItem.h
index a3de06b..80c4feb 100644
--- a/src/Gui/timeline/AbstractGraphicsMediaItem.h
+++ b/src/Gui/timeline/AbstractGraphicsMediaItem.h
@@ -56,7 +56,7 @@ public:
virtual std::shared_ptr<Workflow::Helper> helper();
virtual void triggerMove( TrackWorkflow* target, qint64 startPos );
- virtual void triggerResize( TrackWorkflow* target, Workflow::Helper *helper,
+ virtual void triggerResize( TrackWorkflow* target,
qint64 newBegin, qint64 newEnd, qint64 pos );
virtual qint64 itemHeight() const;
virtual qint32 zSelected() const;
diff --git a/src/Gui/timeline/GraphicsEffectItem.cpp b/src/Gui/timeline/GraphicsEffectItem.cpp
index 37a5b0b..bd47b03 100644
--- a/src/Gui/timeline/GraphicsEffectItem.cpp
+++ b/src/Gui/timeline/GraphicsEffectItem.cpp
@@ -265,11 +265,10 @@ GraphicsEffectItem::triggerMove( Backend::IService* target, qint64 startPos )
}
void
-GraphicsEffectItem::triggerResize( TrackWorkflow* target, Workflow::Helper* helper,
+GraphicsEffectItem::triggerResize( TrackWorkflow* target,
qint64 newBegin, qint64 newEnd, qint64 )
{
Q_UNUSED( target )
- Q_UNUSED( helper )
if ( m_effectHelper.get() == nullptr )
return ;
Commands::trigger( new Commands::Effect::Resize( m_effectHelper, newBegin, newEnd ) );
diff --git a/src/Gui/timeline/GraphicsEffectItem.h b/src/Gui/timeline/GraphicsEffectItem.h
index 551234a..1d9b2dc 100644
--- a/src/Gui/timeline/GraphicsEffectItem.h
+++ b/src/Gui/timeline/GraphicsEffectItem.h
@@ -60,7 +60,7 @@ class GraphicsEffectItem : public AbstractGraphicsItem
virtual std::shared_ptr<Workflow::Helper> helper();
virtual void triggerMove( TrackWorkflow* target, qint64 startPos );
virtual void triggerMove( Backend::IService* target, qint64 startPos );
- virtual void triggerResize( TrackWorkflow* target, Workflow::Helper *helper,
+ virtual void triggerResize( TrackWorkflow* target,
qint64 newBegin, qint64 newEnd, qint64 pos );
virtual qint64 itemHeight() const;
virtual qint32 zSelected() const;
diff --git a/src/Gui/timeline/TracksView.cpp b/src/Gui/timeline/TracksView.cpp
index 0f282ee..ca877bd 100644
--- a/src/Gui/timeline/TracksView.cpp
+++ b/src/Gui/timeline/TracksView.cpp
@@ -1218,13 +1218,13 @@ TracksView::mouseReleaseEvent( QMouseEvent *event )
GraphicsEffectItem *effectItem = qgraphicsitem_cast<GraphicsEffectItem*>( m_actionItem );
if ( effectItem != nullptr && m_effectTarget != nullptr )
{
- effectItem->triggerResize( nullptr, nullptr,
+ effectItem->triggerResize( nullptr,
newBegin, newEnd, m_actionItem->pos().x() );
}
else
{
auto target = m_actionItem->track()->trackWorkflow();
- m_actionItem->triggerResize( target, nullptr,
+ m_actionItem->triggerResize( target,
newBegin, newEnd, m_actionItem->pos().x() );
}
updateDuration();
More information about the Vlmc-devel
mailing list