]> sigrok.org Git - pulseview.git/commitdiff
Don't use Q_EMIT, it's not needed anymore
authorSoeren Apel <redacted>
Sat, 3 Jun 2017 20:44:28 +0000 (22:44 +0200)
committerSoeren Apel <redacted>
Sat, 3 Jun 2017 20:44:28 +0000 (22:44 +0200)
The Q_EMIT macro (just like the regular Qt emit) is syntactic
sugar to let people who read the code know that a method call
placed somewhere is actually a signal.

We don't use Q_EMIT consistently throughout PV and I don't
think it's really needed anyway, so this patch removes the
few remaining instances.

pv/view/view.cpp
pv/widgets/timestampspinbox.cpp
pv/widgets/wellarray.cpp

index 17b9c1532cdea80da45e8fbce0e13ff7783a2a3d..4ac98114104a4eb603aea4c9000e825a8f99dc2c 100644 (file)
@@ -376,7 +376,7 @@ void View::set_scale(double scale)
 {
        if (scale_ != scale) {
                scale_ = scale;
-               Q_EMIT scale_changed();
+               scale_changed();
        }
 }
 
@@ -389,7 +389,7 @@ void View::set_offset(const pv::util::Timestamp& offset)
 {
        if (offset_ != offset) {
                offset_ = offset;
-               Q_EMIT offset_changed();
+               offset_changed();
        }
 }
 
@@ -419,7 +419,7 @@ void View::set_tick_prefix(pv::util::SIPrefix tick_prefix)
 {
        if (tick_prefix_ != tick_prefix) {
                tick_prefix_ = tick_prefix;
-               Q_EMIT tick_prefix_changed();
+               tick_prefix_changed();
        }
 }
 
@@ -432,7 +432,7 @@ void View::set_tick_precision(unsigned tick_precision)
 {
        if (tick_precision_ != tick_precision) {
                tick_precision_ = tick_precision;
-               Q_EMIT tick_precision_changed();
+               tick_precision_changed();
        }
 }
 
@@ -445,7 +445,7 @@ void View::set_tick_period(const pv::util::Timestamp& tick_period)
 {
        if (tick_period_ != tick_period) {
                tick_period_ = tick_period;
-               Q_EMIT tick_period_changed();
+               tick_period_changed();
        }
 }
 
@@ -458,7 +458,7 @@ void View::set_time_unit(pv::util::TimeUnit time_unit)
 {
        if (time_unit_ != time_unit) {
                time_unit_ = time_unit;
-               Q_EMIT time_unit_changed();
+               time_unit_changed();
        }
 }
 
index fd52c504e240d1d907d1e47cdeca0ad9d2c0ab79..21b3d0d7a50c1610a3365bcabbe16730dcca696b 100644 (file)
@@ -87,7 +87,7 @@ void TimestampSpinBox::setValue(const pv::util::Timestamp& val)
 
        value_ = val;
        updateEdit();
-       Q_EMIT valueChanged(value_);
+       valueChanged(value_);
 }
 
 void TimestampSpinBox::on_editingFinished()
index 433a7f5ec60c0f27e25e6e8245c5a6049c96c1e0..04a7ccec9723c999cea7b23bae94db1a25c03eee 100644 (file)
@@ -220,7 +220,7 @@ void WellArray::setSelected(int row, int col)
     updateCell(oldRow, oldCol);
     updateCell(selRow, selCol);
     if (row >= 0)
-        Q_EMIT selected(row, col);
+        selected(row, col);
 }
 
 void WellArray::focusInEvent(QFocusEvent*)