Commit 2810b4ce authored by Vincent PINON's avatar Vincent PINON

fix scan-build warnings (2)

parent fbe31bde
......@@ -416,13 +416,8 @@ void CustomRuler::paintEvent(QPaintEvent *e)
const int zoneEnd = (int)(m_zoneEnd * m_factor);
p.fillRect(zoneStart - m_offset, LABEL_SIZE + 2, zoneEnd - zoneStart, MAX_HEIGHT - LABEL_SIZE - 2, m_zoneColor);
int minval = (paintRect.left() + m_offset) / FRAME_SIZE - 1;
const int maxval = (paintRect.right() + m_offset) / FRAME_SIZE + 1;
if (minval < 0)
minval = 0;
double f, fend;
const int offsetmax = maxval * FRAME_SIZE;
const int offsetmax = ((paintRect.right() + m_offset) / FRAME_SIZE + 1) * FRAME_SIZE;
int offsetmin;
p.setPen(palette().text().color());
......
......@@ -3271,16 +3271,18 @@ void CustomTrackView::lockTrack(int ix, bool lock, bool requestUpdate)
}
AbstractClipItem * child = static_cast <AbstractClipItem *>(children.at(j));
if (child == m_dragItem)
m_dragItem = NULL;
if (child) {
if (child == m_dragItem)
m_dragItem = NULL;
// only unlock group, if it is not locked by another track too
if (!lock && child->track() != ix && m_document->trackInfoAt(m_document->tracksCount() - child->track() - 1).isLocked)
changeGroupLock = false;
// only (un-)lock if at least one clip is on the track
if (child->track() == ix)
hasClipOnTrack = true;
// only unlock group, if it is not locked by another track too
if (!lock && child->track() != ix && m_document->trackInfoAt(m_document->tracksCount() - child->track() - 1).isLocked)
changeGroupLock = false;
// only (un-)lock if at least one clip is on the track
if (child->track() == ix)
hasClipOnTrack = true;
}
}
if (changeGroupLock && hasClipOnTrack)
static_cast<AbstractGroupItem*>(selection.at(i))->setItemLocked(lock);
......@@ -4082,7 +4084,7 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
}
}
m_document->renderer()->doRefresh();
} else if (m_operationMode == ResizeStart && m_dragItem->startPos() != m_dragItemInfo.startPos) {
} else if (m_operationMode == ResizeStart && m_dragItem && m_dragItem->startPos() != m_dragItemInfo.startPos) {
// resize start
if (!m_controlModifier && m_dragItem->type() == AVWidget && m_dragItem->parentItem() && m_dragItem->parentItem() != m_selectionGroup) {
AbstractGroupItem *parent = static_cast <AbstractGroupItem *>(m_dragItem->parentItem());
......@@ -4107,7 +4109,7 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
prepareResizeClipStart(m_dragItem, m_dragItemInfo, m_dragItem->startPos().frames(m_document->fps()));
if (m_dragItem->type() == AVWidget) static_cast <ClipItem*>(m_dragItem)->slotUpdateRange();
}
} else if (m_operationMode == ResizeEnd && m_dragItem->endPos() != m_dragItemInfo.endPos) {
} else if (m_operationMode == ResizeEnd && m_dragItem && m_dragItem->endPos() != m_dragItemInfo.endPos) {
// resize end
if (!m_controlModifier && m_dragItem->type() == AVWidget && m_dragItem->parentItem() && m_dragItem->parentItem() != m_selectionGroup) {
AbstractGroupItem *parent = static_cast <AbstractGroupItem *>(m_dragItem->parentItem());
......@@ -4133,7 +4135,7 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
prepareResizeClipEnd(m_dragItem, m_dragItemInfo, m_dragItem->endPos().frames(m_document->fps()));
if (m_dragItem->type() == AVWidget) static_cast <ClipItem*>(m_dragItem)->slotUpdateRange();
}
} else if (m_operationMode == FadeIn) {
} else if (m_operationMode == FadeIn && m_dragItem) {
// resize fade in effect
ClipItem * item = static_cast <ClipItem *>(m_dragItem);
int ix = item->hasEffect("volume", "fadein");
......@@ -4176,7 +4178,7 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
emit clipItemSelected(item);
}
}
} else if (m_operationMode == FadeOut) {
} else if (m_operationMode == FadeOut && m_dragItem) {
// resize fade out effect
ClipItem * item = static_cast <ClipItem *>(m_dragItem);
int ix = item->hasEffect("volume", "fadeout");
......@@ -4224,7 +4226,7 @@ void CustomTrackView::mouseReleaseEvent(QMouseEvent * event)
emit clipItemSelected(item);
}
}
} else if (m_operationMode == KeyFrame) {
} else if (m_operationMode == KeyFrame && m_dragItem) {
// update the MLT effect
ClipItem * item = static_cast <ClipItem *>(m_dragItem);
QDomElement oldEffect = item->selectedEffect().cloneNode().toElement();
......
......@@ -597,7 +597,6 @@ void DocClipBase::setProducer(Mlt::Producer *producer, bool reset, bool readProp
}
if (m_audioTrackProducers.at(pos) == NULL) {
m_audioTrackProducers[pos] = producer;
updated = true;
}
else delete producer;
return;
......@@ -612,7 +611,6 @@ void DocClipBase::setProducer(Mlt::Producer *producer, bool reset, bool readProp
}
if (m_videoTrackProducers.at(pos) == NULL) {
m_videoTrackProducers[pos] = producer;
updated = true;
}
else delete producer;
return;
......
......@@ -810,12 +810,10 @@ void DvdWizardMenu::loadXml(DVDFORMAT format, const QDomElement &xml)
if (buttons.count() > 0) {
// Clear existing buttons
QList<QGraphicsItem *> list = m_scene->items();
for (int i = 0; i < list.count(); ++i) {
if (list.at(i)->type() == DvdButtonItem) {
delete list.at(i);
--i;
foreach (QGraphicsItem *item, m_scene->items()) {
if (item->type() == DvdButtonItem) {
m_scene->removeItem(item);
delete item;
}
}
}
......
......@@ -219,7 +219,7 @@ ParameterContainer::ParameterContainer(const QDomElement &effect, const ItemInfo
} else if (type == "geometry") {
if (KdenliveSettings::on_monitor_effects()) {
m_needsMonitorEffectScene = true;
m_geometryWidget = new GeometryWidget(m_metaInfo->monitor, m_metaInfo->timecode, 0, true, effect.hasAttribute("showrotation"), parent);
m_geometryWidget = new GeometryWidget(m_metaInfo->monitor, m_metaInfo->timecode, 0, effect.hasAttribute("showrotation"), parent);
m_geometryWidget->setFrameSize(m_metaInfo->frameSize);
connect(m_geometryWidget, SIGNAL(parameterChanged()), this, SLOT(slotCollectAllParameters()));
if (minFrame == maxFrame) {
......
......@@ -432,14 +432,3 @@ void KisCubicCurve::fromString(const QString& string)
setPoints(points);
}
QVector<quint16> KisCubicCurve::uint16Transfer(int size) const
{
d->data->updateTransfer<quint16, int>(&d->data->u16Transfer, d->data->validU16Transfer, 0x0, 0xFFFF, size);
return d->data->u16Transfer;
}
QVector<qreal> KisCubicCurve::floatTransfer(int size) const
{
d->data->updateTransfer<qreal, qreal>(&d->data->fTransfer, d->data->validFTransfer, 0.0, 1.0, size);
return d->data->fTransfer;
}
......@@ -14,8 +14,7 @@
#include <QString>
#include <cstdlib>
AudioInfo::AudioInfo(Mlt::Producer *producer) :
m_producer(NULL)
AudioInfo::AudioInfo(Mlt::Producer *producer)
{
// Since we already receive an MLT producer, we do not need to initialize MLT:
// Mlt::Factory::init(NULL);
......
......@@ -27,7 +27,6 @@ public:
void dumpInfo() const;
private:
Mlt::Producer *m_producer;
QList<AudioStreamInfo*> m_list;
};
......
......@@ -4803,9 +4803,11 @@ void MainWindow::slotOpenBackupDialog(const KUrl &url)
m_activeDocument->backupLastSavedVersion(projectFile.path());
closeCurrentDocument(false);
doOpenFile(KUrl(requestedBackup), NULL);
m_activeDocument->setUrl(projectFile);
m_activeDocument->setModified(true);
setCaption(m_activeDocument->description());
if (m_activeDocument) {
m_activeDocument->setUrl(projectFile);
m_activeDocument->setModified(true);
setCaption(m_activeDocument->description());
}
}
delete dia;
}
......
......@@ -54,7 +54,6 @@ Monitor::Monitor(Kdenlive::MonitorId id, MonitorManager *manager, QString profil
, render(NULL)
, m_currentClip(NULL)
, m_overlay(NULL)
, m_scale(1)
, m_length(2)
, m_dragStarted(false)
, m_loopClipAction(NULL)
......
......@@ -123,7 +123,6 @@ private:
DocClipBase *m_currentClip;
SmallRuler *m_ruler;
Overlay *m_overlay;
double m_scale;
int m_length;
bool m_dragStarted;
KIcon m_playIcon;
......
......@@ -219,12 +219,14 @@ void RecMonitor::slotUpdateCaptureFolder(const QString &currentProjectFolder)
{
if (KdenliveSettings::capturetoprojectfolder()) m_capturePath = currentProjectFolder;
else m_capturePath = KdenliveSettings::capturefolder();
if (m_captureProcess) m_captureProcess->setWorkingDirectory(m_capturePath);
if (m_captureProcess->state() != QProcess::NotRunning) {
if (device_selector->currentIndex() == Firewire)
KMessageBox::information(this, i18n("You need to disconnect and reconnect in the capture monitor to apply your changes"), i18n("Capturing"));
else KMessageBox::information(this, i18n("You need to stop capture before your changes can be applied"), i18n("Capturing"));
} else slotVideoDeviceChanged(device_selector->currentIndex());
if (m_captureProcess) {
m_captureProcess->setWorkingDirectory(m_capturePath);
if (m_captureProcess->state() != QProcess::NotRunning) {
if (device_selector->currentIndex() == Firewire)
KMessageBox::information(this, i18n("You need to disconnect and reconnect in the capture monitor to apply your changes"), i18n("Capturing"));
else KMessageBox::information(this, i18n("You need to stop capture before your changes can be applied"), i18n("Capturing"));
} else slotVideoDeviceChanged(device_selector->currentIndex());
}
// update free space info
slotUpdateFreeSpace();
......@@ -636,7 +638,6 @@ void RecMonitor::slotRecord()
if (rec_video->isChecked()) slotActivateMonitor();
path = KStandardDirs::locateLocal("appdata", "profiles/video4linux");
profile = ProfilesDialog::getVideoProfile(path);
//m_videoBox->setRatio((double) profile.display_aspect_num / profile.display_aspect_den);
buildMltDevice(path);
playlist = getV4lXmlPlaylist(profile, &isXml);
......@@ -699,7 +700,6 @@ void RecMonitor::slotRecord()
slotActivateMonitor();
path = KdenliveSettings::current_profile();
profile = ProfilesDialog::getVideoProfile(path);
//m_videoBox->setRatio((double) profile.display_aspect_num / profile.display_aspect_den);
buildMltDevice(path);
playlist = QString("<producer id=\"producer0\" in=\"0\" out=\"99999\"><property name=\"mlt_type\">producer</property><property name=\"length\">100000</property><property name=\"eof\">pause</property><property name=\"resource\">%1</property><property name=\"mlt_service\">decklink</property></producer>").arg(KdenliveSettings::decklink_capturedevice());
......@@ -902,17 +902,19 @@ void RecMonitor::slotProcessStatus(QProcess::ProcessState status)
m_recAction->setChecked(false);
m_stopAction->setEnabled(false);
device_selector->setEnabled(true);
if (m_captureProcess && m_captureProcess->exitStatus() == QProcess::CrashExit) {
showWarningMessage(i18n("Capture crashed, please check your parameters"), true);
} else {
if (device_selector->currentIndex() != ScreenBag) {
video_frame->setText(i18n("Not connected"));
if (m_captureProcess) {
if (m_captureProcess->exitStatus() == QProcess::CrashExit) {
showWarningMessage(i18n("Capture crashed, please check your parameters"), true);
} else {
int code = m_captureProcess->exitCode();
if (code != 0 && code != 255) {
showWarningMessage(i18n("Capture crashed, please check your parameters"), true);
if (device_selector->currentIndex() != ScreenBag) {
video_frame->setText(i18n("Not connected"));
} else {
video_frame->setPixmap(mergeSideBySide(KIcon("video-display").pixmap(QSize(50, 50)), i18n("Press record button\nto start screen capture\nFiles will be saved in:\n%1", m_capturePath)));
int code = m_captureProcess->exitCode();
if (code != 0 && code != 255) {
showWarningMessage(i18n("Capture crashed, please check your parameters"), true);
} else {
video_frame->setPixmap(mergeSideBySide(KIcon("video-display").pixmap(QSize(50, 50)), i18n("Press record button\nto start screen capture\nFiles will be saved in:\n%1", m_capturePath)));
}
}
}
}
......@@ -984,7 +986,7 @@ void RecMonitor::manageCapturedFiles()
void RecMonitor::mousePressEvent(QMouseEvent *event)
{
if (m_freeSpace->underMouse()) slotUpdateFreeSpace();
else QWidget::mousePressEvent(event);//m_videoBox->mousePressEvent(event);
else QWidget::mousePressEvent(event);
}
void RecMonitor::slotUpdateFreeSpace()
......
......@@ -104,9 +104,7 @@ private:
QAction *m_stopAction;
QAction *m_discAction;
MonitorManager *m_manager;
MltDeviceCapture *m_captureDevice;
VideoContainer *m_videoBox;
QAction *m_addCapturedClip;
QAction *m_previewSettings;
QString m_error;
......
......@@ -29,9 +29,8 @@
#include <mlt++/Mlt.h>
OnMonitorPathItem::OnMonitorPathItem(double dar, QGraphicsItem* parent) :
OnMonitorPathItem::OnMonitorPathItem(QGraphicsItem* parent) :
QGraphicsPathItem(parent),
m_dar(dar),
m_modified(false),
m_view(NULL),
m_activePoint(-1)
......
......@@ -35,7 +35,7 @@ class OnMonitorPathItem : public QObject, public QGraphicsPathItem
{
Q_OBJECT
public:
OnMonitorPathItem(double dar, QGraphicsItem *parent = 0);
OnMonitorPathItem(QGraphicsItem *parent = 0);
void setPoints(Mlt::Geometry *geometry);
void getMode(const QPointF &pos);
void rebuildShape();
......@@ -55,7 +55,6 @@ protected:
void hoverEnterEvent(QGraphicsSceneHoverEvent *event);
private:
double m_dar;
QList <QPointF> m_points;
QPointF m_lastPoint;
bool m_modified;
......
......@@ -217,8 +217,8 @@ static int FindRoots(Point2 *w, int degree, double *t, int depth)
Right[W_DEGREE+1]; /* control polygons */
int left_count, /* Solution count from */
right_count; /* children */
double left_t[W_DEGREE+1], /* Solutions from kids */
right_t[W_DEGREE+1];
double left_t[W_DEGREE+1] = {0}, /* Solutions from kids */
right_t[W_DEGREE+1] = {0};
switch (CrossingCount(w, degree)) {
case 0 : /* No solutions here */
......@@ -247,10 +247,10 @@ static int FindRoots(Point2 *w, int degree, double *t, int depth)
/* Gather solutions together */
for (i = 0; i < left_count; ++i) {
t[i] = left_t[i]; /* FIXME: static analyzer says left_t can be undefined */
t[i] = left_t[i];
}
for (i = 0; i < right_count; ++i) {
t[i+left_count] = right_t[i]; /* FIXME: static analyzer says right_t can be undefined */
t[i+left_count] = right_t[i];
}
/* Send back total number of solutions */
......
......@@ -820,27 +820,30 @@ void ProjectList::slotClipSelected()
m_extractAudioAction->setEnabled(false);
m_transcodeAction->setEnabled(false);
m_clipsActionsMenu->setEnabled(false);
} else {
if (item->type() == ProjectSubclipType) {
// this is a sub item, use base clip
m_deleteButton->defaultAction()->setEnabled(true);
clip = static_cast <ProjectItem*>(item->parent());
if (clip == NULL) {
kDebug() << "-----------ERROR";
return;
}
SubProjectItem *sub = static_cast <SubProjectItem*>(item);
if (clip->referencedClip()->getProducer() == NULL) m_render->getFileProperties(clip->referencedClip()->toXML(), clip->clipId(), m_listView->iconSize().height(), true);
emit clipSelected(clip->referencedClip(), sub->zone());
m_extractAudioAction->setEnabled(false);
m_transcodeAction->setEnabled(false);
m_clipsActionsMenu->setEnabled(false);
m_reloadAction->setEnabled(false);
adjustProxyActions(clip);
} else if (item->type() == ProjectSubclipType) {
// this is a sub item, use base clip
m_deleteButton->defaultAction()->setEnabled(true);
clip = static_cast <ProjectItem*>(item->parent());
if (clip == NULL) {
kDebug() << "-----------ERROR";
return;
}
SubProjectItem *sub = static_cast <SubProjectItem*>(item);
if (clip->referencedClip()->getProducer() == NULL) m_render->getFileProperties(clip->referencedClip()->toXML(), clip->clipId(), m_listView->iconSize().height(), true);
emit clipSelected(clip->referencedClip(), sub->zone());
m_extractAudioAction->setEnabled(false);
m_transcodeAction->setEnabled(false);
m_clipsActionsMenu->setEnabled(false);
m_reloadAction->setEnabled(false);
adjustProxyActions(clip);
return;
} else {
clip = static_cast <ProjectItem*>(item);
if (clip && clip->referencedClip())
if (clip == NULL) {
kDebug() << "-----------ERROR";
return;
}
if (clip->referencedClip())
emit clipSelected(clip->referencedClip());
if (clip->referencedClip()->getProducer() == NULL) m_render->getFileProperties(clip->referencedClip()->toXML(), clip->clipId(), m_listView->iconSize().height(), true);
m_editButton->defaultAction()->setEnabled(true);
......@@ -849,10 +852,10 @@ void ProjectList::slotClipSelected()
m_extractAudioAction->setEnabled(true);
m_transcodeAction->setEnabled(true);
m_clipsActionsMenu->setEnabled(true);
if (clip && clip->clipType() == Image && !KdenliveSettings::defaultimageapp().isEmpty()) {
if (clip->clipType() == Image && !KdenliveSettings::defaultimageapp().isEmpty()) {
m_openAction->setIcon(KIcon(KdenliveSettings::defaultimageapp()));
m_openAction->setEnabled(true);
} else if (clip && clip->clipType() == Audio && !KdenliveSettings::defaultaudioapp().isEmpty()) {
} else if (clip->clipType() == Audio && !KdenliveSettings::defaultaudioapp().isEmpty()) {
m_openAction->setIcon(KIcon(KdenliveSettings::defaultaudioapp()));
m_openAction->setEnabled(true);
} else {
......@@ -1171,7 +1174,7 @@ void ProjectList::updateButtons() const
if (item && item->type() == ProjectClipType) {
m_editButton->defaultAction()->setEnabled(true);
m_openAction->setEnabled(true);
m_reloadAction->setEnabled(true);
if (m_reloadAction) m_reloadAction->setEnabled(false);
m_transcodeAction->setEnabled(true);
m_clipsActionsMenu->setEnabled(true);
return;
......@@ -3010,11 +3013,7 @@ void ProjectList::slotTranscodeClipJob(const QString &condition, QString params,
else dest = ui.file_url->url().path();
QStringList jobParams;
jobParams << dest << src << QString() << QString();
double clipFps = item->referencedClip()->getProperty("fps").toDouble();
if (clipFps == 0) clipFps = m_fps;
int max = item->clipMaxDuration();
QString duration = QString::number(max);
jobParams << duration;
jobParams << QString::number(item->clipMaxDuration());
jobParams << QString::number(KdenliveSettings::add_new_clip());
jobParams << params;
CutClipJob *job = new CutClipJob(item->clipType(), i.key(), jobParams);
......
......@@ -1035,7 +1035,6 @@ void Render::processFileProperties()
int variance;
QImage img;
do {
variance = 100;
img = KThumb::getFrame(frame, imageWidth, fullWidth, info.imageHeight);
variance = KThumb::imageVariance(img);
if (frameNumber == -1 && variance< 6) {
......@@ -2899,9 +2898,8 @@ bool Render::addFilterToService(Mlt::Service service, EffectsParameterList param
} else for (int i = 0; i < keyFrames.size() - 1; ++i) {
Mlt::Filter *filter = new Mlt::Filter(*m_mltProfile, qstrdup(tag.toUtf8().constData()));
if (filter && filter->is_valid()) {
int offset = 0;
filter->set("kdenlive_id", qstrdup(params.paramValue("id").toUtf8().constData()));
int x1 = keyFrames.at(i).section(':', 0, 0).toInt() + offset;
int x1 = keyFrames.at(i).section(':', 0, 0).toInt();
double y1 = keyFrames.at(i).section(':', 1, 1).toDouble();
int x2 = keyFrames.at(i + 1).section(':', 0, 0).toInt();
double y2 = keyFrames.at(i + 1).section(':', 1, 1).toDouble();
......@@ -2917,7 +2915,6 @@ bool Render::addFilterToService(Mlt::Service service, EffectsParameterList param
filter->set(starttag, m_locale.toString(((min + y1) - paramOffset) / factor).toUtf8().data());
filter->set(endtag, m_locale.toString(((min + y2) - paramOffset) / factor).toUtf8().data());
service.attach(*filter);
offset = 1;
} else {
delete[] starttag;
delete[] endtag;
......@@ -3018,14 +3015,12 @@ bool Render::mltEditEffect(int track, const GenTime &position, EffectsParameterL
if (!params.paramValue("keyframes").isEmpty() || (tag == "affine" && params.hasParam("background")) || tag.startsWith("ladspa") || tag == "sox" || tag == "autotrack_rectangle") {
// This is a keyframe effect, to edit it, we remove it and re-add it.
bool success = mltRemoveEffect(track, position, index, false);
// if (!success) kDebug() << "// ERROR Removing effect : " << index;
if (position < GenTime())
success = mltAddTrackEffect(track, params);
else
success = mltAddEffect(track, position, params);
// if (!success) kDebug() << "// ERROR Adding effect : " << index;
return success;
if (mltRemoveEffect(track, position, index, false)) {
if (position < GenTime())
return mltAddTrackEffect(track, params);
else
return mltAddEffect(track, position, params);
}
}
if (position < GenTime()) {
return mltEditTrackEffect(track, params);
......
......@@ -47,7 +47,6 @@ void tracking_finished(mlt_service *owner, RotoWidget *self, char *data)
RotoWidget::RotoWidget(const QString &data, Monitor *monitor, const ItemInfo &info, const Timecode &t, QWidget* parent) :
QWidget(parent),
m_monitor(monitor),
m_showScene(true),
m_in(info.cropStart.frames(KdenliveSettings::project_fps())),
m_out((info.cropStart + info.cropDuration).frames(KdenliveSettings::project_fps()) - 1),
m_filter(NULL)
......
......@@ -67,7 +67,6 @@ private:
SimpleKeyframeWidget *m_keyframeWidget;
Monitor *m_monitor;
MonitorScene *m_scene;
bool m_showScene;
QVariant m_data;
SplineItem *m_item;
int m_in;
......
......@@ -215,12 +215,6 @@ bool SmallRuler::slotNewValue(int value)
if (value == m_cursorFramePosition) return false;
if (value == m_lastSeekPosition) m_lastSeekPosition = SEEK_INACTIVE;
m_cursorFramePosition = value;
/*int oldPos = m_cursorPosition;
m_cursorPosition = value * m_scale;
const int offset = 6;
const int x = qMin(oldPos, m_cursorPosition);
const int w = qAbs(oldPos - m_cursorPosition);
update(x - offset, 0, w + 2 * offset, height());*/
update();
return true;
}
......
......@@ -51,7 +51,6 @@ protected:
void mouseReleaseEvent(QMouseEvent * event);
private:
int m_cursorPosition;
int m_cursorFramePosition;
double m_scale;
int m_medium;
......
......@@ -55,12 +55,9 @@ StatusBarMessageLabel::StatusBarMessageLabel(QWidget* parent) :
m_queueTimer.setSingleShot(true);
bool b = true;
b &= connect(&m_queueTimer, SIGNAL(timeout()), this, SLOT(slotMessageTimeout()));
b &= connect(m_closeButton, SIGNAL(clicked()), this, SLOT(confirmErrorMessage()));
b &= connect(&m_timer, SIGNAL(timeout()), this, SLOT(timerDone()));
Q_ASSERT(b);
connect(&m_queueTimer, SIGNAL(timeout()), this, SLOT(slotMessageTimeout()));
connect(m_closeButton, SIGNAL(clicked()), this, SLOT(confirmErrorMessage()));
connect(&m_timer, SIGNAL(timeout()), this, SLOT(timerDone()));
}
StatusBarMessageLabel::~StatusBarMessageLabel()
......
......@@ -51,8 +51,6 @@ protected:
void wheelEvent(QWheelEvent * event);
private:
Ui::UnicodeWidget_UI m_view;
enum Direction { Forward, Backward };
/** Selected input method */
......
......@@ -39,7 +39,6 @@ inline int lerp( const int a, const int b, double t )
CornersWidget::CornersWidget(Monitor *monitor, const QDomElement& e, int minFrame, int maxFrame, const Timecode &tc, int activeKeyframe, QWidget* parent) :
KeyframeEdit(e, minFrame, maxFrame, tc, activeKeyframe, parent),
m_monitor(monitor),
m_showScene(true),
m_pos(0)
{
MonitorEditWidget *edit = monitor->getEffectEdit();
......
......@@ -53,7 +53,6 @@ private:
Monitor *m_monitor;
MonitorScene *m_scene;
OnMonitorCornersItem *m_item;
bool m_showScene;
int m_pos;
/** @brief Returns the corner positions set in the row of @param keyframe. */
......
......@@ -32,8 +32,7 @@
DoubleParameterWidget::DoubleParameterWidget(const QString &name, double value, double min, double max, double defaultValue, const QString &comment, int id, const QString &suffix, int decimals, QWidget *parent)
: QWidget(parent),
m_commentLabel(NULL)
: QWidget(parent)
{
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Maximum);
QGridLayout *layout = new QGridLayout(this);
......
......@@ -75,7 +75,6 @@ private slots:
private:
DragValue *m_dragVal;
QLabel *m_commentLabel;
signals:
void valueChanged(double);
......
......@@ -38,20 +38,17 @@
GeometryWidget::GeometryWidget(Monitor* monitor, const Timecode &timecode, int clipPos, bool isEffect, bool showRotation, QWidget* parent):
GeometryWidget::GeometryWidget(Monitor* monitor, const Timecode &timecode, int clipPos, bool showRotation, QWidget* parent):
QWidget(parent),
m_monitor(monitor),
m_timePos(new TimecodeDisplay(timecode)),
m_clipPos(clipPos),
m_inPoint(0),
m_outPoint(1),
m_isEffect(isEffect),
m_rect(NULL),
m_geomPath(NULL),
m_previous(NULL),
m_geometry(NULL),
m_showScene(true),
m_showRotation(showRotation)
m_geometry(NULL)
{
m_ui.setupUi(this);
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Maximum);
......@@ -368,7 +365,7 @@ void GeometryWidget::setupParam(const QDomElement &elem, int minframe, int maxfr
m_rect->setZValue(0);
m_scene->addItem(m_rect);
connect(m_rect, SIGNAL(changed()), this, SLOT(slotUpdateGeometry()));
m_geomPath = new OnMonitorPathItem(m_monitor->render->dar());
m_geomPath = new OnMonitorPathItem();
connect(m_geomPath, SIGNAL(changed()), this, SLOT(slotUpdatePath()));
m_geomPath->setPen(QPen(Qt::red));
m_geomPath->setPoints(m_geometry);
......
......@@ -45,10 +45,8 @@ public:
* @param monitor Project monitor
* @param timecode Timecode needed by timecode display widget
* @param clipPos Position of the clip in timeline
* @param isEffect true if used in an effect, false if used in a transition
* @param showRotation Should we show or hide the rotation sliders
* @param parent (optional) Parent widget */
explicit GeometryWidget(Monitor *monitor, const Timecode &timecode, int clipPos, bool isEffect, bool showRotation, QWidget* parent = 0);
explicit GeometryWidget(Monitor *monitor, const Timecode &timecode, int clipPos, bool showRotation, QWidget* parent = 0);
virtual ~GeometryWidget();