Commit 4af5d70f authored by Orgad Shaneh's avatar Orgad Shaneh Committed by Orgad Shaneh

Timeline: Use Qt5-style connects

The heavy lifting was done by clazy.

Change-Id: I3b911a44d83650901eb486d20453cb079abef629
Reviewed-by: Ulf Hermann's avatarUlf Hermann <ulf.hermann@qt.io>
parent 172ea7aa
......@@ -161,10 +161,10 @@ void TimelineAbstractRenderer::setZoomer(TimelineZoomControl *zoomer)
Q_D(TimelineAbstractRenderer);
if (zoomer != d->zoomer) {
if (d->zoomer != 0)
disconnect(d->zoomer, SIGNAL(windowChanged(qint64,qint64)), this, SLOT(update()));
disconnect(d->zoomer, &TimelineZoomControl::windowChanged, this, &QQuickItem::update);
d->zoomer = zoomer;
if (d->zoomer != 0)
connect(d->zoomer, SIGNAL(windowChanged(qint64,qint64)), this, SLOT(update()));
connect(d->zoomer, &TimelineZoomControl::windowChanged, this, &QQuickItem::update);
emit zoomerChanged(zoomer);
update();
}
......
......@@ -74,7 +74,7 @@ signals:
void selectionLockedChanged(bool locked);
void selectedItemChanged(int itemIndex);
public slots:
public:
void setSelectedItem(int itemIndex);
void setSelectionLocked(bool locked);
......
......@@ -62,7 +62,7 @@ void TimelineModelAggregator::addModel(TimelineModel *m)
{
Q_D(TimelineModelAggregator);
d->modelList << m;
connect(m,SIGNAL(heightChanged()),this,SIGNAL(heightChanged()));
connect(m, &TimelineModel::heightChanged, this, &TimelineModelAggregator::heightChanged);
if (d->notesModel)
d->notesModel->addTimelineModel(m);
emit modelsChanged();
......
......@@ -51,7 +51,6 @@ public:
// TODO: We could add some Q_INVOKABLE functions to enable or disable render passes when the the
// need arises.
public slots:
void clearData();
protected:
......
......@@ -81,6 +81,11 @@ public:
virtual void clear();
void setTrace(qint64 start, qint64 end);
void setRange(qint64 start, qint64 end);
void setSelection(qint64 start, qint64 end);
void setWindowLocked(bool windowLocked);
signals:
void traceChanged(qint64 start, qint64 end);
void windowChanged(qint64 start, qint64 end);
......@@ -89,16 +94,11 @@ signals:
void windowLockedChanged(bool windowLocked);
void windowMovingChanged(bool windowMoving);
public slots:
void setTrace(qint64 start, qint64 end);
void setRange(qint64 start, qint64 end);
void setSelection(qint64 start, qint64 end);
void setWindowLocked(bool windowLocked);
protected slots:
protected:
void moveWindow();
void rebuildWindow();
void clampRangeToWindow();
protected:
qint64 m_traceStart;
qint64 m_traceEnd;
qint64 m_windowStart;
......@@ -110,9 +110,6 @@ protected:
QTimer m_timer;
bool m_windowLocked;
void rebuildWindow();
void clampRangeToWindow();
};
} // namespace Timeline
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment