X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fdragvalue.cpp;h=21a99aa6f452690de7bdcd96c749438211c4dca4;hb=4fba89810f9bc0bbf7f3e1c286a1d868d88918f3;hp=c76c636af958b9279e51f8674136c30278a2ab61;hpb=4e160cdeedabfb381abed6dd3ac089823165b9f6;p=kdenlive diff --git a/src/dragvalue.cpp b/src/dragvalue.cpp index c76c636a..21a99aa6 100644 --- a/src/dragvalue.cpp +++ b/src/dragvalue.cpp @@ -43,7 +43,7 @@ #include -DragValue::DragValue(const QString &label, double defaultValue, int decimals, double min, double max, int id, const QString suffix, bool showSlider, QWidget* parent) : +DragValue::DragValue(const QString &label, double defaultValue, int decimals, double min, double max, int id, const QString &suffix, bool showSlider, QWidget* parent) : QWidget(parent), m_maximum(max), m_minimum(min), @@ -131,7 +131,7 @@ DragValue::DragValue(const QString &label, double defaultValue, int decimals, do m_menu->addAction(timeline); } - connect(this, SIGNAL(customContextMenuRequested(const QPoint&)), this, SLOT(slotShowContextMenu(const QPoint&))); + connect(this, SIGNAL(customContextMenuRequested(QPoint)), this, SLOT(slotShowContextMenu(QPoint))); connect(m_scale, SIGNAL(triggered(int)), this, SLOT(slotSetScaleMode(int))); connect(m_directUpdate, SIGNAL(triggered(bool)), this, SLOT(slotSetDirectUpdate(bool))); } @@ -139,8 +139,8 @@ DragValue::DragValue(const QString &label, double defaultValue, int decimals, do DragValue::~DragValue() { - if (m_intEdit) delete m_intEdit; - if (m_doubleEdit) delete m_doubleEdit; + delete m_intEdit; + delete m_doubleEdit; delete m_menu; //delete m_scale; //delete m_directUpdate; @@ -243,12 +243,12 @@ void DragValue::slotReset() void DragValue::slotSetValue(int value) { - setValue(value, KdenliveSettings::dragvalue_directupdate()); + setValue(value, true); } void DragValue::slotSetValue(double value) { - setValue(value, KdenliveSettings::dragvalue_directupdate()); + setValue(value, true); } void DragValue::setValueFromProgress(double value, bool final) @@ -302,7 +302,7 @@ void DragValue::slotEditingFinished() m_intEdit->blockSignals(true); m_intEdit->clearFocus(); m_intEdit->blockSignals(false); - if (!KdenliveSettings::dragvalue_directupdate()) emit valueChanged(value, true); + if (!KdenliveSettings::dragvalue_directupdate()) emit valueChanged((double) value, true); } else { double value = m_doubleEdit->value(); @@ -361,7 +361,7 @@ CustomLabel::CustomLabel(const QString &label, bool showSlider, int range, QWidg //m_precision(pow(10, precision)), { setFont(KGlobalSettings::toolBarFont()); - setFormat(" " + label); + setFormat(' ' + label); setFocusPolicy(Qt::StrongFocus); setCursor(Qt::PointingHandCursor); setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Maximum); @@ -370,7 +370,7 @@ CustomLabel::CustomLabel(const QString &label, bool showSlider, int range, QWidg setRange(0, range); QSize sh; const QFontMetrics &fm = fontMetrics(); - sh.setWidth(fm.width(" " + label + " ")); + sh.setWidth(fm.width(' ' + label + ' ')); setMaximumWidth(sh.width()); setObjectName("dragOnly"); }