[Kdenlive-devel] [PATCH 33/46] stopmotion.cpp: Use char for single character

Mikko Rapeli mikko.rapeli at iki.fi
Sat Jul 14 07:56:20 UTC 2012


Should be faster than using a full string. Found by krazy.
---
 src/stopmotion/stopmotion.cpp |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/stopmotion/stopmotion.cpp b/src/stopmotion/stopmotion.cpp
index 8294c1e..f03fbb9 100644
--- a/src/stopmotion/stopmotion.cpp
+++ b/src/stopmotion/stopmotion.cpp
@@ -439,7 +439,7 @@ void StopmotionWidget::parseExistingSequences()
     QStringList sequences = dir.entryList(filters, QDir::Files, QDir::Name);
     //kDebug()<<"PF: "<<<<", sm: "<<sequences;
     foreach(QString sequencename, sequences) {
-        sequence_name->addItem(sequencename.section("_", 0, -2));
+        sequence_name->addItem(sequencename.section('_', 0, -2));
     }
 }
 
@@ -722,7 +722,7 @@ void StopmotionWidget::slotCreateThumbs(QImage img, int ix)
 QString StopmotionWidget::getPathForFrame(int ix, QString seqName)
 {
     if (seqName.isEmpty()) seqName = m_sequenceName;
-    return m_projectFolder.path(KUrl::AddTrailingSlash) + seqName + "_" + QString::number(ix).rightJustified(4, '0', false) + ".png";
+    return m_projectFolder.path(KUrl::AddTrailingSlash) + seqName + '_' + QString::number(ix).rightJustified(4, '0', false) + ".png";
 }
 
 void StopmotionWidget::slotShowFrame(const QString& path)
-- 
1.7.10.4





More information about the Kdenlive mailing list