From c8f050715fea96f66e548419371f2ecc5c8c5ec1 Mon Sep 17 00:00:00 2001
From: Christiaan Janssen <christiaan.janssen@nokia.com>
Date: Wed, 15 Dec 2010 16:12:10 +0100
Subject: [PATCH] QmlDebugger:  removed "Reload" button on live preview error

Reviewed-by:  Kai Koehne
---
 src/plugins/coreplugin/editormanager/editorview.cpp | 6 ++++++
 src/plugins/qmljsinspector/qmljslivetextpreview.cpp | 2 +-
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/src/plugins/coreplugin/editormanager/editorview.cpp b/src/plugins/coreplugin/editormanager/editorview.cpp
index 3bb73b635a8..611ec33f3b8 100644
--- a/src/plugins/coreplugin/editormanager/editorview.cpp
+++ b/src/plugins/coreplugin/editormanager/editorview.cpp
@@ -176,6 +176,12 @@ void EditorView::showEditorInfoBar(const QString &id,
     m_infoWidgetLabel->setText(infoText);
     m_infoWidgetButton->setText(buttonText);
 
+    if (object && !buttonText.isEmpty()) {
+        m_infoWidgetButton->show();
+    } else {
+        m_infoWidgetButton->hide();
+    }
+
     m_infoWidgetButton->disconnect();
     if (object && buttonPressMember)
         connect(m_infoWidgetButton, SIGNAL(clicked()), object, buttonPressMember);
diff --git a/src/plugins/qmljsinspector/qmljslivetextpreview.cpp b/src/plugins/qmljsinspector/qmljslivetextpreview.cpp
index ee660d28695..6abf9d66c40 100644
--- a/src/plugins/qmljsinspector/qmljslivetextpreview.cpp
+++ b/src/plugins/qmljsinspector/qmljslivetextpreview.cpp
@@ -584,7 +584,7 @@ void QmlJSLiveTextPreview::showSyncWarning(UnsyncronizableChangeType unsyncroniz
 
     errorMessage.append(tr("You can continue debugging, but behavior can be unexpected."));
 
-    em->showEditorInfoBar(Constants::INFO_OUT_OF_SYNC, errorMessage, tr("Reload"), this, SLOT(reloadQmlViewer()));
+    em->showEditorInfoBar(Constants::INFO_OUT_OF_SYNC, errorMessage);
 }
 
 void QmlJSLiveTextPreview::reloadQmlViewer()
-- 
GitLab