diff --git a/src/plugins/qmlprofiler/qml/MainView.qml b/src/plugins/qmlprofiler/qml/MainView.qml
index 8d8fe25d69b1f247ef2c5507ed722bf5ecb32570..bc40aa5437233be7f14ed9570758412633bc47df 100644
--- a/src/plugins/qmlprofiler/qml/MainView.qml
+++ b/src/plugins/qmlprofiler/qml/MainView.qml
@@ -514,8 +514,6 @@ Rectangle {
         x: 0
         y: 0
 
-        function toggleEnabled() {enabled = !enabled}
-        function toggleVisible() {visible = !visible}
         function updateZoomLevel() {
             zoomSlider.externalUpdate = true;
             zoomSlider.value = Math.pow((view.endTime - view.startTime) / qmlProfilerModelProxy.traceDuration(), 1 / zoomSlider.exponent) * zoomSlider.maximumValue;
diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
index 645c17b60b0b724d56b7c9f1d8958b814f2b44fe..395be21696550e16b67c40cb601fd65cb626ccc7 100644
--- a/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
+++ b/src/plugins/qmlprofiler/qmlprofilertraceview.cpp
@@ -192,10 +192,22 @@ void QmlProfilerTraceView::reset()
     connect(this, SIGNAL(jumpToNext()), rootObject, SLOT(nextEvent()));
     connect(rootObject, SIGNAL(selectedEventChanged(int)), this, SIGNAL(selectedEventChanged(int)));
     connect(rootObject, SIGNAL(changeToolTip(QString)), this, SLOT(updateToolTip(QString)));
+    connect(this, SIGNAL(enableToolbar(bool)), this, SLOT(setZoomSliderEnabled(bool)));
+    connect(this, SIGNAL(showZoomSlider(bool)), this, SLOT(setZoomSliderVisible(bool)));
+}
 
-    QObject *zoomSlider = rootObject->findChild<QObject*>(QLatin1String("zoomSliderToolBar"));
-    connect(this, SIGNAL(enableToolbar(bool)), zoomSlider, SLOT(toggleEnabled()));
-    connect(this, SIGNAL(showZoomSlider(bool)), zoomSlider, SLOT(toggleVisible()));
+void QmlProfilerTraceView::setZoomSliderEnabled(bool enabled)
+{
+    QQuickItem *zoomSlider = d->m_mainView->rootObject()->findChild<QQuickItem*>(QLatin1String("zoomSliderToolBar"));
+    if (zoomSlider->isEnabled() != enabled)
+        zoomSlider->setEnabled(enabled);
+}
+
+void QmlProfilerTraceView::setZoomSliderVisible(bool visible)
+{
+    QQuickItem *zoomSlider = d->m_mainView->rootObject()->findChild<QQuickItem*>(QLatin1String("zoomSliderToolBar"));
+    if (zoomSlider->isVisible() != visible)
+        zoomSlider->setVisible(visible);
 }
 
 QWidget *QmlProfilerTraceView::createToolbar()
diff --git a/src/plugins/qmlprofiler/qmlprofilertraceview.h b/src/plugins/qmlprofiler/qmlprofilertraceview.h
index da8f66966a738f50f818399d5988c258858658d4..d027a4dabf4ca2820619802d85efb83aa5280546 100644
--- a/src/plugins/qmlprofiler/qmlprofilertraceview.h
+++ b/src/plugins/qmlprofiler/qmlprofilertraceview.h
@@ -102,6 +102,8 @@ private slots:
     void profilerStateChanged();
     void clientRecordingChanged();
     void serverRecordingChanged();
+    void setZoomSliderEnabled(bool enabled);
+    void setZoomSliderVisible(bool visible);
 
 signals:
     void gotoSourceLocation(const QString &fileUrl, int lineNumber, int columNumber);