]> git.sesse.net Git - kdenlive/commitdiff
Try to avoid locale errors when converting double
authorJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 16 Feb 2013 19:07:56 +0000 (20:07 +0100)
committerJean-Baptiste Mardelle <jb@kdenlive.org>
Sat, 16 Feb 2013 19:07:56 +0000 (20:07 +0100)
src/clipitem.cpp
src/monitor.cpp
src/projectlist.cpp

index 54b640719ec84ef5c6fab13c58cdaa76d74ee05f..0e5dd9dc34e894797d45e231e2553ab205db342b 100644 (file)
@@ -261,7 +261,7 @@ void ClipItem::initEffect(QDomElement effect, int diff, int offset)
         if (e.attribute("type") == "keyframe" || e.attribute("type") == "simplekeyframe") {
            if (e.attribute("keyframes").isEmpty()) {
                // Effect has a keyframe type parameter, we need to set the values
-               e.setAttribute("keyframes", QString::number(cropStart().frames(m_fps)) + ':' + e.attribute("default"));
+               e.setAttribute("keyframes", QString::number((int) cropStart().frames(m_fps)) + ':' + e.attribute("default"));
            }
            else if (offset != 0) {
                // adjust keyframes to this clip
@@ -272,8 +272,8 @@ void ClipItem::initEffect(QDomElement effect, int diff, int offset)
 
         if (e.attribute("type") == "geometry" && !e.hasAttribute("fixed")) {
             // Effects with a geometry parameter need to sync in / out with parent clip
-           effect.setAttribute("in", QString::number(cropStart().frames(m_fps)));
-           effect.setAttribute("out", QString::number((cropStart() + cropDuration()).frames(m_fps) - 1));
+           effect.setAttribute("in", QString::number((int) cropStart().frames(m_fps)));
+           effect.setAttribute("out", QString::number((int) (cropStart() + cropDuration()).frames(m_fps) - 1));
            effect.setAttribute("_sync_in_out", "1");
        }
     }
@@ -1659,8 +1659,8 @@ EffectsParameterList ClipItem::addEffect(QDomElement effect, bool /*animate*/)
         }
     }
     if (needInOutSync) {
-        parameters.addParam("in", QString::number(cropStart().frames(m_fps)));
-        parameters.addParam("out", QString::number((cropStart() + cropDuration()).frames(m_fps) - 1));
+        parameters.addParam("in", QString::number((int) cropStart().frames(m_fps)));
+        parameters.addParam("out", QString::number((int) (cropStart() + cropDuration()).frames(m_fps) - 1));
         parameters.addParam("_sync_in_out", "1");
     }
     m_effectNames = m_effectList.effectNames().join(" / ");
@@ -2002,7 +2002,7 @@ QMap<int, QDomElement> ClipItem::adjustEffectsToDuration(int width, int height,
                 if (in < cropStart().frames(m_fps)) {
                     if (!effects.contains(i))
                         effects[i] = effect.cloneNode().toElement();
-                    EffectsList::setParameter(effect, "in", QString::number(cropStart().frames(m_fps)));
+                    EffectsList::setParameter(effect, "in", QString::number((int) cropStart().frames(m_fps)));
                 }
                 if (effects.contains(i))
                     setFadeOut(out - in);
index 9763f6ae112a3c9c0e47e2a3d0ee82263250f290..33155581d036a1c4cb525b84bbf8ef80cd487ee1 100644 (file)
@@ -1154,7 +1154,7 @@ QString Monitor::getMarkerThumb(GenTime pos)
 {
     if (!m_currentClip) return QString();
     if (!m_currentClip->getClipHash().isEmpty()) {
-       QString url = m_monitorManager->getProjectFolder() + "thumbs/" + m_currentClip->getClipHash() + '#' + QString::number(pos.frames(m_monitorManager->timecode().fps())) + ".png";
+       QString url = m_monitorManager->getProjectFolder() + "thumbs/" + m_currentClip->getClipHash() + '#' + QString::number((int) pos.frames(m_monitorManager->timecode().fps())) + ".png";
         if (QFile::exists(url)) return url;
     }
     return QString();
index 181cb96d82d8a1bb3c5f2d53b55e02ee3b4991d3..881e194939d6cae00a03922cf725f3d50f24c458 100644 (file)
@@ -3567,8 +3567,8 @@ void ProjectList::slotStartFilterJob(ItemInfo info, const QString&id, const QStr
     ProjectItem *item = getItemById(id);
     if (!item) return;
     QStringList jobParams;
-    jobParams << QString::number(info.cropStart.frames(m_fps)) << QString::number((info.cropStart + info.cropDuration).frames(m_fps));
-    jobParams << QString() << filterName << filterParams << consumer << consumerParams << QString::number(info.startPos.frames(m_fps)) << QString::number(info.track);
+    jobParams << QString::number((int) info.cropStart.frames(m_fps)) << QString::number((int) (info.cropStart + info.cropDuration).frames(m_fps));
+    jobParams << QString() << filterName << filterParams << consumer << consumerParams << QString::number((int) info.startPos.frames(m_fps)) << QString::number(info.track);
     MeltJob *job = new MeltJob(item->clipType(), id, jobParams, extraParams);
     if (job->isExclusive() && hasPendingJob(item, job->jobType)) {
         delete job;