aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Pinon <[email protected]>2015-07-31 13:08:24 +0200
committerVincent Pinon <[email protected]>2015-08-02 22:19:55 +0200
commit85838ab40c36a2ded22bc23b5218734683a45509 (patch)
tree6edea0faa200bcfb335fdbd9abccc4c6e759c5e7
parent4e68393d1b3fb9e7f481f59c52471801a6eb8edf (diff)
fix cppcheck warnings (obsolete code)
-rw-r--r--src/bin/abstractprojectitem.cpp8
-rw-r--r--src/bin/abstractprojectitem.h1
-rw-r--r--src/bin/bin.cpp9
-rw-r--r--src/bin/bin.h1
-rw-r--r--src/doc/documentvalidator.cpp15
-rw-r--r--src/doc/documentvalidator.h8
-rw-r--r--src/lib/external/kiss_fft/kiss_fft.c6
-rw-r--r--src/mltcontroller/clipcontroller.cpp7
-rw-r--r--src/mltcontroller/clipcontroller.h1
-rw-r--r--src/renderer.cpp3
-rw-r--r--src/timeline/abstractclipitem.cpp3
11 files changed, 22 insertions, 40 deletions
diff --git a/src/bin/abstractprojectitem.cpp b/src/bin/abstractprojectitem.cpp
index e7248b8..fa70282 100644
--- a/src/bin/abstractprojectitem.cpp
+++ b/src/bin/abstractprojectitem.cpp
@@ -114,14 +114,6 @@ QPixmap AbstractProjectItem::roundedPixmap(const QPixmap &source)
return pix;
}
-void AbstractProjectItem::finishInsert(AbstractProjectItem* parent)
-{
- /*if (m_parent && !m_parent->contains(this)) {
- m_parent->addChild(this);
- }*/
- //bin()->emitItemReady(this);
-}
-
void AbstractProjectItem::addChild(AbstractProjectItem* child)
{
if (child && !contains(child)) {
diff --git a/src/bin/abstractprojectitem.h b/src/bin/abstractprojectitem.h
index 0034f25..108694c 100644
--- a/src/bin/abstractprojectitem.h
+++ b/src/bin/abstractprojectitem.h
@@ -79,7 +79,6 @@ public:
AbstractProjectItem *parent() const;
/** @brief Removes the item from its current parent and adds it as a child to @param parent. */
virtual void setParent(AbstractProjectItem *parent);
- void finishInsert(AbstractProjectItem* parent);
/**
* @brief Adds a new child item and notifies the bin model about it (before and after).
diff --git a/src/bin/bin.cpp b/src/bin/bin.cpp
index fb57b9b..b85dac3 100644
--- a/src/bin/bin.cpp
+++ b/src/bin/bin.cpp
@@ -1284,13 +1284,6 @@ void Bin::reloadClip(const QString &id)
if (!xml.isNull()) m_doc->renderer()->getFileProperties(xml, id, 150, true);
}
-void Bin::refreshEditedClip()
-{
- const QString id = m_propertiesPanel->property("clipId").toString();
- /*m_doc->bin()->refreshThumnbail(id);
- m_doc->binMonitor()->refresh();*/
-}
-
void Bin::slotThumbnailReady(const QString &id, const QImage &img, bool fromFile)
{
ProjectClip *clip = m_rootFolder->clip(id);
@@ -1714,8 +1707,8 @@ void Bin::slotItemDropped(QStringList ids, const QModelIndex &parent)
void Bin::slotEffectDropped(QString effect, const QModelIndex &parent)
{
- AbstractProjectItem *parentItem;
if (parent.isValid()) {
+ AbstractProjectItem *parentItem;
parentItem = static_cast<AbstractProjectItem *>(parent.internalPointer());
if (parentItem->itemType() != AbstractProjectItem::ClipItem) {
// effect only supported on clip items
diff --git a/src/bin/bin.h b/src/bin/bin.h
index 5a99e65..c48b4c2 100644
--- a/src/bin/bin.h
+++ b/src/bin/bin.h
@@ -458,7 +458,6 @@ private slots:
void selectProxyModel(const QModelIndex &id);
void autoSelect();
void closeEditing();
- void refreshEditedClip();
void slotSaveHeaders();
void slotItemDropped(QStringList ids, const QModelIndex &parent);
void slotItemDropped(const QList<QUrl>&urls, const QModelIndex &parent);
diff --git a/src/doc/documentvalidator.cpp b/src/doc/documentvalidator.cpp
index 88395e1..293ecd0 100644
--- a/src/doc/documentvalidator.cpp
+++ b/src/doc/documentvalidator.cpp
@@ -147,9 +147,8 @@ bool DocumentValidator::validate(const double currentVersion)
return true;
/*
- * Check the syntax (this will be replaced by XSD validation with Qt 4.6)
- * and correct some errors
- */
+ // Check the syntax (this will be replaced by XSD validation with Qt 4.6)
+ // and correct some errors
{
// Return (or create) the tractor
QDomElement tractor = mlt.firstChildElement("tractor");
@@ -163,10 +162,9 @@ bool DocumentValidator::validate(const double currentVersion)
mlt.appendChild(tractor);
}
- /*
- * Make sure at least one track exists, and they're equal in number to
- * to the maximum between MLT and Kdenlive playlists and tracks
- */
+ // Make sure at least one track exists, and they're equal in number to
+ // to the maximum between MLT and Kdenlive playlists and tracks
+ //
// In older Kdenlive project files, one playlist is not a real track (the black track), we have: track count = playlist count- 1
// In newer Qt5 Kdenlive, the Bin playlist should not appear as a track. So we should have: track count = playlist count- 2
int trackOffset = 1;
@@ -261,6 +259,7 @@ bool DocumentValidator::validate(const double currentVersion)
updateEffects();
return true;
+ */
}
bool DocumentValidator::upgrade(double version, const double currentVersion)
@@ -1358,6 +1357,7 @@ bool DocumentValidator::isModified() const
return m_modified;
}
+/*
void DocumentValidator::updateEffects()
{
// WARNING: order by findDirs will determine which js file to use (in case multiple scripts for the same filter exist)
@@ -1484,6 +1484,7 @@ bool DocumentValidator::updateEffectParameters(const QDomNodeList &parameters, c
}
return updated;
}
+*/
bool DocumentValidator::checkMovit()
{
diff --git a/src/doc/documentvalidator.h b/src/doc/documentvalidator.h
index 1def80f..e2d4637 100644
--- a/src/doc/documentvalidator.h
+++ b/src/doc/documentvalidator.h
@@ -46,11 +46,13 @@ private:
bool upgrade(double version, const double currentVersion);
QStringList getInfoFromEffectName(const QString &oldName);
QString colorToString(const QColor& c);
- /** @brief Updates effects that were created using a different version of the underlaying filter than the one installed. */
+ /*
+ /// @brief Updates effects that were created using a different version of the underlaying filter than the one installed.
void updateEffects();
- /** @brief Updates the parameters according to the updateRules.
- * @see the related in README in effects/update */
+ /// @brief Updates the parameters according to the updateRules.
+ /// @see the related in README in effects/update
bool updateEffectParameters(const QDomNodeList &parameters, const QScriptValue *updateRules, const double serviceVersion, const double effectVersion);
+ */
QString factorizeGeomValue(QString value, double factor);
};
diff --git a/src/lib/external/kiss_fft/kiss_fft.c b/src/lib/external/kiss_fft/kiss_fft.c
index bd8af6e..643a3dd 100644
--- a/src/lib/external/kiss_fft/kiss_fft.c
+++ b/src/lib/external/kiss_fft/kiss_fft.c
@@ -208,7 +208,7 @@ static void kf_bfly_generic(
kiss_fft_cpx t;
int Norig = st->nfft;
- kiss_fft_cpx * scratch = (kiss_fft_cpx*)KISS_FFT_TMP_ALLOC(sizeof(kiss_fft_cpx)*p);
+ kiss_fft_cpx scratch[p];
for ( u=0; u<m; ++u ) {
int k=u;
@@ -231,7 +231,6 @@ static void kf_bfly_generic(
k += m;
}
}
- KISS_FFT_TMP_FREE(scratch);
}
static
@@ -373,10 +372,9 @@ void kiss_fft_stride(kiss_fft_cfg st,const kiss_fft_cpx *fin,kiss_fft_cpx *fout,
if (fin == fout) {
//NOTE: this is not really an in-place FFT algorithm.
//It just performs an out-of-place FFT into a temp buffer
- kiss_fft_cpx * tmpbuf = (kiss_fft_cpx*)KISS_FFT_TMP_ALLOC( sizeof(kiss_fft_cpx)*st->nfft);
+ kiss_fft_cpx tmpbuf[st->nfft];
kf_work(tmpbuf,fin,1,in_stride, st->factors,st);
memcpy(fout,tmpbuf,sizeof(kiss_fft_cpx)*st->nfft);
- KISS_FFT_TMP_FREE(tmpbuf);
}else{
kf_work( fout, fin, 1,in_stride, st->factors,st );
}
diff --git a/src/mltcontroller/clipcontroller.cpp b/src/mltcontroller/clipcontroller.cpp
index a0aeebe..01fd11a 100644
--- a/src/mltcontroller/clipcontroller.cpp
+++ b/src/mltcontroller/clipcontroller.cpp
@@ -71,6 +71,8 @@ ClipController::ClipController(BinController *bincontroller) : QObject()
, m_properties(NULL)
, m_audioInfo(NULL)
, m_effectList(true)
+ , m_audioIndex(0)
+ , m_videoIndex(0)
, m_clipType(Unknown)
, m_hasLimitedDuration(true)
, m_binController(bincontroller)
@@ -177,11 +179,6 @@ Mlt::Producer *ClipController::masterProducer()
return new Mlt::Producer(*m_masterProducer);
}
-Mlt::Producer *ClipController::zoneProducer(int in, int out)
-{
- return m_masterProducer->cut(in, out);
-}
-
bool ClipController::isValid()
{
if (m_masterProducer == NULL) return false;
diff --git a/src/mltcontroller/clipcontroller.h b/src/mltcontroller/clipcontroller.h
index 371db21..dd27db0 100644
--- a/src/mltcontroller/clipcontroller.h
+++ b/src/mltcontroller/clipcontroller.h
@@ -73,7 +73,6 @@ public:
/** @brief Returns a clone of our master producer. Delete after use! */
Mlt::Producer *masterProducer();
- Mlt::Producer *zoneProducer(int in, int out);
/** @brief Returns the MLT's producer id */
const QString clipId();
diff --git a/src/renderer.cpp b/src/renderer.cpp
index 3d88f86..3cb819d 100644
--- a/src/renderer.cpp
+++ b/src/renderer.cpp
@@ -1363,7 +1363,8 @@ int Render::setSceneList(QString playlist, int position)
}
else {
// pass basic info, the others (folder, etc) will be taken from the producer itself
- requestClipInfo info;
+ requestClipInfo info;
+ info.binIndex = 0; info.imageHeight = 0;
info.clipId = id;
info.replaceProducer = true;
emit gotFileProperties(info, m_binController->getController(id));
diff --git a/src/timeline/abstractclipitem.cpp b/src/timeline/abstractclipitem.cpp
index 6930086..eb72818 100644
--- a/src/timeline/abstractclipitem.cpp
+++ b/src/timeline/abstractclipitem.cpp
@@ -37,10 +37,11 @@ AbstractClipItem::AbstractClipItem(const ItemInfo &info, const QRectF& rect, dou
, m_info(info)
, m_editedKeyframe(-1)
, m_selectedKeyframe(0)
+ , m_keyframeType(KEYFRAMETYPE::NoKeyframe)
, m_keyframeFactor(1)
, m_keyframeOffset(0)
, m_keyframeDefault(0)
- , m_visibleParam(0)
+ , m_visibleParam(0)
, m_fps(fps)
, m_isMainSelectedClip(false)
{