aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Pinon <[email protected]>2015-06-22 22:41:53 +0200
committerVincent Pinon <[email protected]>2015-06-22 22:42:01 +0200
commitcbde7bb38c68eb55a2ee94a1baa3194ef9132004 (patch)
tree29a474c227d15528854434dcff0394c55d9c5377
parent679f38bfe5bf23c83cfcd7e18a75adb09654f0d2 (diff)
fix compiler warnings
-rw-r--r--renderer/renderjob.cpp4
-rw-r--r--src/dvdwizard/dvdwizard.cpp6
-rw-r--r--src/effectstack/effectstackview2.cpp2
-rw-r--r--src/effectstack/widgets/colorwheel.cpp4
-rw-r--r--src/effectstack/widgets/geometrywidget.cpp1
-rw-r--r--src/mltcontroller/clipcontroller.cpp22
-rw-r--r--src/monitor/glwidget.cpp8
-rw-r--r--src/monitor/monitor.cpp13
-rw-r--r--src/monitor/recmanager.cpp2
-rw-r--r--src/project/jobs/jobmanager.cpp2
-rw-r--r--src/project/jobs/meltjob.cpp2
-rw-r--r--src/timeline/clipitem.cpp1
-rw-r--r--src/timeline/customtrackscene.cpp4
-rw-r--r--src/timeline/customtrackview.cpp12
-rw-r--r--src/timeline/timeline.cpp8
-rw-r--r--src/timeline/track.cpp3
16 files changed, 42 insertions, 52 deletions
diff --git a/renderer/renderjob.cpp b/renderer/renderjob.cpp
index cdb1604..8b03063 100644
--- a/renderer/renderjob.cpp
+++ b/renderer/renderjob.cpp
@@ -48,10 +48,10 @@ RenderJob::RenderJob(bool erase, bool usekuiserver, int pid, const QString& rend
m_kdenliveinterface(NULL),
m_usekuiserver(usekuiserver),
m_logfile(dest + ".txt"),
- m_pid(pid),
m_erase(erase),
m_seconds(0),
- m_frame(0)
+ m_frame(0),
+ m_pid(pid)
{
m_renderProcess = new QProcess;
m_renderProcess->setReadChannel(QProcess::StandardError);
diff --git a/src/dvdwizard/dvdwizard.cpp b/src/dvdwizard/dvdwizard.cpp
index 26cbe54..53bbf26 100644
--- a/src/dvdwizard/dvdwizard.cpp
+++ b/src/dvdwizard/dvdwizard.cpp
@@ -42,13 +42,13 @@
DvdWizard::DvdWizard(MonitorManager *manager, const QString &url, QWidget *parent) :
QWizard(parent)
- , m_dvdauthor(NULL)
- , m_mkiso(NULL)
- , m_vobitem(NULL)
, m_authorFile(QLatin1String("XXXXXX.xml"))
, m_menuFile(QLatin1String("XXXXXX.xml"))
, m_menuVobFile(QLatin1String("XXXXXX.mpg"))
, m_letterboxMovie(QLatin1String("XXXXXX.mpg"))
+ , m_dvdauthor(NULL)
+ , m_mkiso(NULL)
+ , m_vobitem(NULL)
, m_selectedImage(QLatin1String("XXXXXX.png"))
, m_selectedLetterImage(QLatin1String("XXXXXX.png"))
, m_highlightedImage(QLatin1String("XXXXXX.png"))
diff --git a/src/effectstack/effectstackview2.cpp b/src/effectstack/effectstackview2.cpp
index 5200405..d6be5f7 100644
--- a/src/effectstack/effectstackview2.cpp
+++ b/src/effectstack/effectstackview2.cpp
@@ -44,12 +44,12 @@
EffectStackView2::EffectStackView2(QWidget *parent) :
QWidget(parent),
m_clipref(NULL),
+ m_status(EMPTY),
m_trackindex(-1),
m_draggedEffect(NULL),
m_draggedGroup(NULL),
m_groupIndex(0),
m_monitorSceneWanted(false),
- m_status(EMPTY),
m_trackInfo()
{
m_effectMetaInfo.monitor = NULL;
diff --git a/src/effectstack/widgets/colorwheel.cpp b/src/effectstack/widgets/colorwheel.cpp
index d3d702e..000a3c0 100644
--- a/src/effectstack/widgets/colorwheel.cpp
+++ b/src/effectstack/widgets/colorwheel.cpp
@@ -24,12 +24,12 @@
ColorWheel::ColorWheel(QString id, QString name, QColor color, QWidget *parent)
: QWidget(parent)
, m_id(id)
- , m_name(name)
, m_isMouseDown(false)
, m_margin(5)
, m_color(color)
, m_isInWheel(false)
, m_isInSquare(false)
+ , m_name(name)
{
QFontInfo info(font());
m_unitSize = info.pixelSize();
@@ -145,6 +145,7 @@ void ColorWheel::mouseMoveEvent(QMouseEvent *event)
void ColorWheel::mouseReleaseEvent(QMouseEvent *event)
{
+ Q_UNUSED(event)
m_isMouseDown = false;
m_isInWheel = false;
m_isInSquare = false;
@@ -175,6 +176,7 @@ QString ColorWheel::getParamValues()
void ColorWheel::paintEvent(QPaintEvent *event)
{
+ Q_UNUSED(event)
QPainter painter(this);
// QStyleOption opt;
// opt.init(this);
diff --git a/src/effectstack/widgets/geometrywidget.cpp b/src/effectstack/widgets/geometrywidget.cpp
index 8312e25..c771642 100644
--- a/src/effectstack/widgets/geometrywidget.cpp
+++ b/src/effectstack/widgets/geometrywidget.cpp
@@ -394,7 +394,6 @@ void GeometryWidget::slotPositionChanged(int pos, bool seek)
//m_timeline->blockSignals(false);
Mlt::GeometryItem item;
- Mlt::GeometryItem previousItem;
if (!m_fixedGeom && (m_geometry->fetch(&item, pos) || item.key() == false)) {
// no keyframe
m_monitor->setEffectKeyframe(false);
diff --git a/src/mltcontroller/clipcontroller.cpp b/src/mltcontroller/clipcontroller.cpp
index 4d1b9ec..4174dc4 100644
--- a/src/mltcontroller/clipcontroller.cpp
+++ b/src/mltcontroller/clipcontroller.cpp
@@ -35,13 +35,13 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
ClipController::ClipController(BinController *bincontroller, Mlt::Producer& producer) : QObject()
- , m_binController(bincontroller)
- , m_snapMarkers(QList < CommentedTime >())
- , m_hasLimitedDuration(true)
- , m_properties(new Mlt::Properties(producer.get_properties()))
, selectedEffectIndex(1)
- , m_audioInfo(NULL)
, audioThumbCreated(false)
+ , m_properties(new Mlt::Properties(producer.get_properties()))
+ , m_audioInfo(NULL)
+ , m_hasLimitedDuration(true)
+ , m_binController(bincontroller)
+ , m_snapMarkers(QList < CommentedTime >())
{
m_masterProducer = &producer;
m_effectList = EffectsList(true);
@@ -63,14 +63,14 @@ ClipController::ClipController(BinController *bincontroller, Mlt::Producer& prod
}
ClipController::ClipController(BinController *bincontroller) : QObject()
- , m_binController(bincontroller)
- , m_snapMarkers(QList < CommentedTime >())
- , m_hasLimitedDuration(true)
- , m_clipType(Unknown)
- , m_properties(NULL)
, selectedEffectIndex(1)
- , m_audioInfo(NULL)
, audioThumbCreated(false)
+ , m_properties(NULL)
+ , m_audioInfo(NULL)
+ , m_clipType(Unknown)
+ , m_hasLimitedDuration(true)
+ , m_binController(bincontroller)
+ , m_snapMarkers(QList < CommentedTime >())
{
m_masterProducer = NULL;
m_effectList = EffectsList(true);
diff --git a/src/monitor/glwidget.cpp b/src/monitor/glwidget.cpp
index 1872f8e..83515a6 100644
--- a/src/monitor/glwidget.cpp
+++ b/src/monitor/glwidget.cpp
@@ -53,8 +53,11 @@ using namespace Mlt;
GLWidget::GLWidget()
: QQuickView(0)
+ , sendFrameForAnalysis(false)
, m_shader(0)
, m_glslManager(0)
+ , m_consumer(0)
+ , m_producer(0)
, m_initSem(0)
, m_isInitialized(false)
, m_threadStartEvent(0)
@@ -65,11 +68,8 @@ GLWidget::GLWidget()
, m_frameRenderer(0)
, m_zoom(1.0f)
, m_offset(QPoint(0, 0))
- , m_consumer(0)
- , m_producer(0)
, m_audioWaveDisplayed(false)
, m_fbo(NULL)
- , sendFrameForAnalysis(false)
{
qDebug() << "begin";
m_texture[0] = m_texture[1] = m_texture[2] = 0;
@@ -196,8 +196,6 @@ void GLWidget::resizeGL(int width, int height)
}
x = (width - w) / 2;
y = (height - h) / 2;
- int oldX = m_rect.left();
- int oldW = m_rect.width();
m_rect.setRect(x, y, w, h);
double scale = (double) m_rect.width() / m_consumer->profile()->width() * m_zoom;
QPoint center = m_rect.center();
diff --git a/src/monitor/monitor.cpp b/src/monitor/monitor.cpp
index 77beaf4..8bb8f26 100644
--- a/src/monitor/monitor.cpp
+++ b/src/monitor/monitor.cpp
@@ -57,20 +57,20 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QWidget *paren
AbstractMonitor(id, manager, parent)
, render(NULL)
, m_controller(NULL)
+ , m_glMonitor(NULL)
+ , m_splitEffect(NULL)
+ , m_splitProducer(NULL)
, m_length(2)
, m_dragStarted(false)
+ , m_recManager(NULL)
, m_loopClipAction(NULL)
+ , m_effectCompare(NULL)
, m_contextMenu(NULL)
, m_selectedClip(NULL)
, m_loopClipTransition(true)
, m_editMarker(NULL)
- , m_glMonitor(NULL)
- , m_rootItem(NULL)
- , m_splitEffect(NULL)
- , m_splitProducer(NULL)
- , m_effectCompare(NULL)
, m_forceSizeFactor(0)
- , m_recManager(NULL)
+ , m_rootItem(NULL)
{
QVBoxLayout *layout = new QVBoxLayout;
layout->setContentsMargins(0, 0, 0, 0);
@@ -493,6 +493,7 @@ void Monitor::slotShowMenu(const QPoint pos)
void Monitor::resizeEvent(QResizeEvent *event)
{
+ Q_UNUSED(event)
if (m_glMonitor->zoom() > 0.0f) {
float horizontal = float(m_horizontalScroll->value()) / m_horizontalScroll->maximum();
float vertical = float(m_verticalScroll->value()) / m_verticalScroll->maximum();
diff --git a/src/monitor/recmanager.cpp b/src/monitor/recmanager.cpp
index fc88e76..66d5f1c 100644
--- a/src/monitor/recmanager.cpp
+++ b/src/monitor/recmanager.cpp
@@ -40,9 +40,9 @@
RecManager::RecManager(int iconSize, Monitor *parent) :
QObject(parent)
, m_monitor(parent)
+ , m_captureProcess(NULL)
, m_recToolbar(new QToolBar(parent))
, m_screenCombo(NULL)
- , m_captureProcess(NULL)
{
m_recToolbar->setIconSize(QSize(iconSize, iconSize));
m_playAction = m_recToolbar->addAction(QIcon::fromTheme("media-playback-start"), i18n("Preview"));
diff --git a/src/project/jobs/jobmanager.cpp b/src/project/jobs/jobmanager.cpp
index d8fcc3d..e5c5fff 100644
--- a/src/project/jobs/jobmanager.cpp
+++ b/src/project/jobs/jobmanager.cpp
@@ -44,8 +44,8 @@ along with this program. If not, see <http://www.gnu.org/licenses/>.
JobManager::JobManager(Bin *bin, double fps): QObject()
, m_bin(bin)
- , m_fps(fps)
, m_abortAllJobs(false)
+ , m_fps(fps)
{
connect(this, SIGNAL(processLog(QString,int,int,QString)), this, SLOT(slotProcessLog(QString,int,int,QString)));
connect(this, SIGNAL(checkJobProcess()), this, SLOT(slotCheckJobProcess()));
diff --git a/src/project/jobs/meltjob.cpp b/src/project/jobs/meltjob.cpp
index 56ebf07..c3621f8 100644
--- a/src/project/jobs/meltjob.cpp
+++ b/src/project/jobs/meltjob.cpp
@@ -43,10 +43,10 @@ MeltJob::MeltJob(ClipType cType, const QString id, const QMap <QString, QString>
m_profile(NULL),
m_filter(NULL),
m_showFrameEvent(NULL),
- m_length(0),
m_producerParams(producerParams),
m_filterParams(filterParams),
m_consumerParams(consumerParams),
+ m_length(0),
m_extra(extraParams)
{
m_jobStatus = JobWaiting;
diff --git a/src/timeline/clipitem.cpp b/src/timeline/clipitem.cpp
index bc075ed..f9ddf6c 100644
--- a/src/timeline/clipitem.cpp
+++ b/src/timeline/clipitem.cpp
@@ -798,7 +798,6 @@ void ClipItem::paint(QPainter *painter,
QMap<int, QPainterPath > negativeChannelPaths;
for (int channel = 0; channel < channels; channel ++) {
int y = channelHeight * channel + channelHeight / 2;
- double v1 = m_binClip->audioFrameCache->at(qMin((startpixel + cropLeft) * channels + channel, audioLevelCount)).toDouble() / 256;
positiveChannelPaths[channel].moveTo(startx, mappedRect.bottom() - y);
negativeChannelPaths[channel].moveTo(startx, mappedRect.bottom() - y);
for (int i = startpixel + cropLeft; i < endpixel + cropLeft + offset; i += offset) {
diff --git a/src/timeline/customtrackscene.cpp b/src/timeline/customtrackscene.cpp
index 409f5f1..8da48f9 100644
--- a/src/timeline/customtrackscene.cpp
+++ b/src/timeline/customtrackscene.cpp
@@ -25,8 +25,8 @@ CustomTrackScene::CustomTrackScene(KdenliveDoc *doc, QObject *parent) :
QGraphicsScene(parent),
m_document(doc),
m_scale(1.0, 1.0),
- m_editMode(NormalEdit),
- isZooming(false)
+ isZooming(false),
+ m_editMode(NormalEdit)
{
}
diff --git a/src/timeline/customtrackview.cpp b/src/timeline/customtrackview.cpp
index 2cee41d..98353f4 100644
--- a/src/timeline/customtrackview.cpp
+++ b/src/timeline/customtrackview.cpp
@@ -74,11 +74,11 @@ bool sortGuidesList(const Guide *g1 , const Guide *g2)
CustomTrackView::CustomTrackView(KdenliveDoc *doc, Timeline *timeline, CustomTrackScene* projectscene, QWidget *parent) :
QGraphicsView(projectscene, parent)
- , m_timeline(timeline)
, m_tracksHeight(KdenliveSettings::trackheight())
, m_projectDuration(0)
, m_cursorPos(0)
, m_document(doc)
+ , m_timeline(timeline)
, m_scene(projectscene)
, m_cursorLine(NULL)
, m_operationMode(None)
@@ -2494,9 +2494,7 @@ ClipItem *CustomTrackView::cutClip(const ItemInfo &info, const GenTime &cutTime,
KdenliveSettings::setSnaptopoints(false);
m_waitingThumbs.removeAll(dup);
- bool selected = item->isSelected();
if (dup->isSelected()) {
- selected = true;
item->setSelected(true);
emit clipItemSelected(NULL);
}
@@ -3171,7 +3169,7 @@ void CustomTrackView::slotSwitchTrackAudio(int ix, bool enable)
void CustomTrackView::slotSwitchTrackLock(int ix, bool enable)
{
- int tracknumber = m_document->tracksCount() - ix - 1;
+ //int tracknumber = m_document->tracksCount() - ix - 1;
LockTrackCommand *command = new LockTrackCommand(this, ix, enable);
m_commandStack->push(command);
}
@@ -4544,7 +4542,6 @@ void CustomTrackView::addClip(const QString &clipId, ItemInfo info, EffectsList
item->setState(state);
item->setEffectList(effects);
scene()->addItem(item);
- int producerTrack = info.track;
int tracknumber = m_document->tracksCount() - info.track - 1;
bool isLocked = m_document->trackInfoAt(tracknumber).isLocked;
if (isLocked) item->setItemLocked(true);
@@ -4552,6 +4549,7 @@ void CustomTrackView::addClip(const QString &clipId, ItemInfo info, EffectsList
//TODO: notify bin ?
//baseclip->addReference();
//m_document->updateClip(baseclip->getId());
+ //int producerTrack = info.track;
//m_document->renderer()->mltInsertClip(info, xml, item->getProducer(producerTrack), overwrite, push);
//m_document->renderer()->mltInsertClip(info /*, xml*/, clipId, overwrite, push);
/*Mlt::Producer *prod = m_document->renderer()->getTrackProducer(item->getBinId(), info.track, item->isAudioOnly(), item->isVideoOnly());
@@ -4592,9 +4590,9 @@ void CustomTrackView::slotUpdateClip(const QString &clipId, bool reload)
if (list.at(i)->type() == AVWidget) {
clip = static_cast <ClipItem *>(list.at(i));
if (clip->getBinId() == clipId) {
- ItemInfo info = clip->info();
//TODO: get audio / video only producers
- /*if (clip->isAudioOnly()) prod = baseClip->getTrackProducer(info.track);
+ /*ItemInfo info = clip->info();
+ if (clip->isAudioOnly()) prod = baseClip->getTrackProducer(info.track);
else if (clip->isVideoOnly()) prod = baseClip->getTrackProducer(info.track);
else prod = baseClip->getTrackProducer(info.track);*/
if (reload) {
diff --git a/src/timeline/timeline.cpp b/src/timeline/timeline.cpp
index 11547f7..cc91396 100644
--- a/src/timeline/timeline.cpp
+++ b/src/timeline/timeline.cpp
@@ -45,8 +45,8 @@
Timeline::Timeline(KdenliveDoc *doc, const QList<QAction *> &actions, bool *ok, QWidget *parent) :
QWidget(parent),
- m_scale(1.0),
m_projectTracks(0),
+ m_scale(1.0),
m_doc(doc),
m_verticalZoom(1)
{
@@ -321,7 +321,6 @@ bool Timeline::isSlide(QString geometry) {
QString start = geometry.section('=', 0, 0).section(':', 0, -2) + ':';
start.append(geometry.section('=', 1, 1).section(':', 0, -2));
QStringList numbers = start.split(':', QString::SkipEmptyParts);
- bool isWipeTransition = true;
for (int i = 0; i < numbers.size(); ++i) {
int checkNumber = qAbs(numbers.at(i).toInt());
if (checkNumber != 0 && checkNumber != 100) {
@@ -354,14 +353,9 @@ void Timeline::parseDocument(const QDomDocument &doc)
QDomElement tractor = mlt.firstChildElement("tractor");
QDomNodeList tracks = tractor.elementsByTagName("track");
QDomNodeList playlists = doc.elementsByTagName("playlist");
- int duration = 1;
m_projectTracks = tracks.count();
- int trackduration = 0;
QDomElement e;
QDomElement p;
-
- int pos = m_projectTracks - 1;
-
m_trackview->setDuration(getTracks());
getTransitions();
diff --git a/src/timeline/track.cpp b/src/timeline/track.cpp
index 2563333..670b866 100644
--- a/src/timeline/track.cpp
+++ b/src/timeline/track.cpp
@@ -253,7 +253,6 @@ bool Track::needsDuplicate(const QString &service) const
bool Track::replaceAll(const QString &id, Mlt::Producer *original, Mlt::Producer *videoOnlyProducer)
{
- int startindex = 0;
bool found = false;
QString idForAudioTrack;
QString idForVideoTrack;
@@ -334,7 +333,7 @@ bool Track::replace(qreal t, Mlt::Producer *prod, PlaylistState::ClipState state
}
Mlt::Producer *Track::find(const QByteArray &name, const QByteArray &value, int startindex) {
- for (int i = 0; i < m_playlist.count(); i++) {
+ for (int i = startindex; i < m_playlist.count(); i++) {
if (m_playlist.is_blank(i)) continue;
Mlt::Producer *p = m_playlist.get_clip(i);
if (value == p->parent().get(name.constData())) return p;