bool MoveEffectCommand::mergeWith(const QUndoCommand * other)
{
return false;
+ /* dead code (flaged by coverity), was removed to avoid crash when dropping on group
if (other->id() != id()) return false;
if (m_track != static_cast<const MoveEffectCommand*>(other)->m_track) return false;
if (m_pos != static_cast<const MoveEffectCommand*>(other)->m_pos) return false;
m_oldindex = static_cast<const MoveEffectCommand*>(other)->m_oldindex;
m_newindex = static_cast<const MoveEffectCommand*>(other)->m_newindex;
return true;
+ */
}
// virtual
info.startPos = transitionClip->startPos();
} else {
GenTime transitionDuration(65, m_document->fps());
- if (m_dragItem->cropDuration() < transitionDuration) info.startPos = m_dragItem->startPos();
- else info.startPos = info.endPos - transitionDuration;
+ if (m_dragItem->cropDuration() < transitionDuration)
+ info.startPos = m_dragItem->startPos();
+ else
+ info.startPos = info.endPos - transitionDuration;
}
if (info.endPos == info.startPos) info.startPos = info.endPos - GenTime(65, m_document->fps());
QDomElement transition = MainWindow::transitions.getEffectByTag("luma", "dissolve").cloneNode().toElement();
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) :
+ m_commentLabel(NULL),
QWidget(parent)
{
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Maximum);
int result, iof = -1;
/* get fd settings */
- if ((iof = fcntl(fd, F_GETFL, 0)) != -1) {
- /* set fd non blocking */
- fcntl(fd, F_SETFL, iof | O_NONBLOCK);
- } else {
- fprintf(stderr, "Can't set Jog Shuttle FILE DESCRIPTOR to O_NONBLOCK and stop thread\n");
- return;
- }
+ if ((iof = fcntl(fd, F_GETFL, 0)) == -1) {
+ fprintf(stderr, "Can't get Jog Shuttle file status\n");
+ close(fd);
+ return;
+ } else if (fcntl(fd, F_SETFL, iof | O_NONBLOCK) == -1) {
+ fprintf(stderr, "Can't set Jog Shuttle FILE DESCRIPTOR to O_NONBLOCK and stop thread\n");
+ close(fd);
+ return;
+ }
/* enter thread loop */
while (!stop_me) {