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

List:       kde-commits
Subject:    [calligra/krita-animation-pentikainen] krita/image: Remove some unused methods
From:       Jouni_Pentikäinen <joupent () gmail ! com>
Date:       2015-08-12 9:41:17
Message-ID: E1ZPSX7-0000UW-UA () scm ! kde ! org
[Download RAW message or body]

Git commit 87b23a1160baab62805548f63ff6bd7873772665 by Jouni Pentikäinen.
Committed on 10/08/2015 at 10:00.
Pushed by jounip into branch 'krita-animation-pentikainen'.

Remove some unused methods

M  +0    -12   krita/image/kis_keyframe.cpp
M  +0    -17   krita/image/kis_keyframe.h
M  +0    -10   krita/image/kis_keyframe_channel.cpp
M  +0    -1    krita/image/kis_keyframe_channel.h

http://commits.kde.org/calligra/87b23a1160baab62805548f63ff6bd7873772665

diff --git a/krita/image/kis_keyframe.cpp b/krita/image/kis_keyframe.cpp
index 259f897..ca6124f 100644
--- a/krita/image/kis_keyframe.cpp
+++ b/krita/image/kis_keyframe.cpp
@@ -73,16 +73,4 @@ KisKeyframeChannel *KisKeyframe::channel() const
     return m_d->channel;
 }
 
-bool KisKeyframe::affects(int time) const
-{
-    return wouldAffect(time, this->time());
-}
-
-bool KisKeyframe::wouldAffect(int time, int newTime) const
-{
-    // TODO: think through corner cases..
-    KisKeyframe *nextKey = m_d->channel->nextKeyframeAfter(newTime);
-    return (newTime <= time && (!nextKey || time < nextKey->time()));
-}
-
 #include "kis_keyframe.moc"
diff --git a/krita/image/kis_keyframe.h b/krita/image/kis_keyframe.h
index a98a3ab..8c1f42e 100644
--- a/krita/image/kis_keyframe.h
+++ b/krita/image/kis_keyframe.h
@@ -42,23 +42,6 @@ public:
     void setTime(int time);
     KisKeyframeChannel *channel() const;
 
-    /**
-     * Returns true if the are no other keyframes between this keyframe and the given time.
-     * Note: if the keyframe is not actually on the channel, pretend it is.
-     * This may be the case during the handling of key insertion/removal signals.
-     * @param time time to check against
-     * @return true if the key is active at the given time
-     */
-    bool affects(int time) const;
-
-    /**
-     * Same as affects, except we pretend the key has the given time
-     * @param time time to check against
-     * @param newTime pretended keyframe time
-     * @return true if the key would be active at the given time
-     */
-    bool wouldAffect(int time, int newTime) const;
-
 private:
     struct Private;
     QScopedPointer<Private> m_d;
diff --git a/krita/image/kis_keyframe_channel.cpp b/krita/image/kis_keyframe_channel.cpp
index a01e14b..5d353b0 100644
--- a/krita/image/kis_keyframe_channel.cpp
+++ b/krita/image/kis_keyframe_channel.cpp
@@ -235,16 +235,6 @@ KisKeyframe *KisKeyframeChannel::activeKeyframeAt(int time) const
     return activeKeyIterator(time).value().data();
 }
 
-KisKeyframe *KisKeyframeChannel::nextKeyframeAfter(int time) const
-{
-    const KeyframesMap keys = constKeys();
-    KeyframesMap::const_iterator i = keys.upperBound(time);
-
-    if (i == keys.end()) return 0;
-
-    return i.value().data();
-}
-
 KisTimeRange KisKeyframeChannel::affectedFrames(int time) const
 {
     return identicalFrames(time);
diff --git a/krita/image/kis_keyframe_channel.h b/krita/image/kis_keyframe_channel.h
index effe796..479dc7a 100644
--- a/krita/image/kis_keyframe_channel.h
+++ b/krita/image/kis_keyframe_channel.h
@@ -55,7 +55,6 @@ public:
 
     KisKeyframe *keyframeAt(int time);
     KisKeyframe *activeKeyframeAt(int time) const;
-    KisKeyframe *nextKeyframeAfter(int time) const;
 
     /**
      * Get the set of frames affected by any changes to the value

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

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