Commit 3bf81efb authored by Kai Koehne's avatar Kai Koehne Committed by hjk

QML: Remove Apply on Save functionality

The feature has been actually been disabled since commit ac771eb5,
but now it's time to also remove the dead code ...

Fixing the feature and bringing it out of the experimental state
would require quite some effort that apparently nobody is willing
to spend. So it's better to remove it.

The enablers in the qmldebug library, as well as the QmlJSDelta utility
class in qmljs library, are left in though.

Change-Id: Idf98a2f946d0db86bef2f20d2349d6ffedba219c
Reviewed-by: default avatarKai Koehne <>
parent 6f7e7a8b
......@@ -168,17 +168,6 @@
\section1 Applying QML Changes at Runtime
// currently broken & disabled
If you change property values or add properties in the code editor, the
debugger can update the properties in the running application when you save
the file. This is enabled by default. To disable it, click the
\inlineimage qml-observer-bar-reload.png "Apply Changes on Save button"
(\uicontrol {Apply Changes on Save}) button on the toolbar.
When you change property values in the \uicontrol {QML/JS Console} or in the
\uicontrol {Locals and Expressions} view, they are immediately updated in the running
application, but not in the source code.
......@@ -153,7 +153,6 @@ QtcPlugin {
"qmlengine.cpp", "qmlengine.h",
"qmlinspectoradapter.cpp", "qmlinspectoradapter.h",
"qmlinspectoragent.cpp", "qmlinspectoragent.h",
"qmllivetextpreview.cpp", "qmllivetextpreview.h",
"qmlv8debuggerclient.cpp", "qmlv8debuggerclient.h",
"qscriptdebuggerclient.cpp", "qscriptdebuggerclient.h"
......@@ -655,11 +655,6 @@ DebuggerSettings::DebuggerSettings()
item->setSettingsKey(qmlInspectorGroup, QLatin1String("QmlInspector.ShowAppOnTop"));
insertItem(ShowAppOnTop, item);
item = new SavedAction(this);
item->setSettingsKey(qmlInspectorGroup, QLatin1String("QmlInspector.FromQml"));
insertItem(QmlUpdateOnSave, item);
......@@ -185,8 +185,7 @@ enum DebuggerActionCode
// QML Tools
} // namespace Internal
......@@ -63,7 +63,6 @@ const char RESET[] = "Debugger.Reset";
const char OPERATE_BY_INSTRUCTION[] = "Debugger.OperateByInstruction";
const char OPERATE_NATIVE_MIXED[] = "Debugger.OperateNativeMixed";
const char QML_SHOW_APP_ON_TOP[] = "Debugger.QmlShowAppOnTop";
const char QML_UPDATE_ON_SAVE[] = "Debugger.QmlUpdateOnSave";
const char QML_SELECTTOOL[] = "Debugger.QmlSelectTool";
const char QML_ZOOMTOOL[] = "Debugger.QmlZoomTool";
......@@ -958,9 +958,6 @@ public slots:
bool parseArguments(const QStringList &args, QString *errorMessage);
void parseCommandLineArguments();
void updateQmlActions() {
DebuggerMainWindow *m_mainWindow;
......@@ -2957,11 +2954,6 @@ void DebuggerPluginPrivate::extensionsInitialized()
connect(action(SettingsDialog), &QAction::triggered,
[] { ICore::showOptionsDialog(DEBUGGER_COMMON_SETTINGS_ID); });
// QML Actions
connect(action(ShowQmlObjectTree), &SavedAction::valueChanged,
this, &DebuggerPluginPrivate::updateQmlActions);
// Toolbar
QWidget *toolbarContainer = new QWidget;
......@@ -8,7 +8,6 @@ HEADERS += \
$$PWD/interactiveinterpreter.h \
$$PWD/qmlv8debuggerclientconstants.h \
$$PWD/qmlinspectoragent.h \
$$PWD/qmllivetextpreview.h \
......@@ -20,5 +19,4 @@ SOURCES += \
$$PWD/qmlv8debuggerclient.cpp \
$$PWD/interactiveinterpreter.cpp \
$$PWD/qmlinspectoragent.cpp \
$$PWD/qmllivetextpreview.cpp \
......@@ -40,6 +40,7 @@
#include <qmldebug/qdebugmessageclient.h>
#include <qmldebug/qmloutputparser.h>
#include <qmljs/iscriptevaluator.h>
#include <qmljs/qmljsdocument.h>
......@@ -35,9 +35,6 @@
#include <coreplugin/icontext.h>
#include <qmldebug/qmldebugclient.h>
#include <qmljs/qmljsdocument.h>
namespace Core { class IEditor; }
namespace QmlDebug {
class BaseEngineDebugClient;
......@@ -50,10 +47,8 @@ namespace Debugger {
namespace Internal {
class DebuggerEngine;
class WatchTreeView;
class QmlAdapter;
class QmlInspectorAgent;
class QmlLiveTextPreview;
class QmlInspectorAdapter : public QObject
......@@ -84,15 +79,9 @@ private slots:
void selectObjectsFromToolsClient(const QList<int> &debugIds);
void onObjectFetched(const QmlDebug::ObjectReference &ref);
void createPreviewForEditor(Core::IEditor *newEditor);
void removePreviewForEditor(Core::IEditor *editor);
void updatePendingPreviewDocuments(QmlJS::Document::Ptr doc);
void onSelectActionTriggered(bool checked);
void onZoomActionTriggered(bool checked);
void onShowAppOnTopChanged(bool checked);
void onUpdateOnSaveChanged(bool checked);
void onReload();
void onReloaded();
void onDestroyedObject(int);
void jumpToObjectDefinitionInEditor(const QmlDebug::FileReference &objSource, int debugId = -1);
......@@ -100,14 +89,12 @@ private slots:
void setActiveEngineClient(QmlDebug::BaseEngineDebugClient *client);
void initializePreviews();
void showConnectionStateMessage(const QString &message);
enum SelectionTarget { NoTarget, ToolTarget, EditorTarget };
void selectObject(
const QmlDebug::ObjectReference &objectReference,
SelectionTarget target);
void deletePreviews();
void enableTools(const bool enable);
......@@ -124,19 +111,12 @@ private:
int m_currentSelectedDebugId;
QString m_currentSelectedDebugName;
// Qml/JS editor integration
bool m_listeningToEditorManager;
QHash<QString, QmlLiveTextPreview *> m_textPreviews;
QmlJS::Snapshot m_loadedSnapshot; //the snapshot loaded by the viewer
QStringList m_pendingPreviewDocumentNames;
// toolbar
bool m_toolsClientConnected;
Core::Context m_inspectorToolsContext;
QAction *m_selectAction;
QAction *m_zoomAction;
QAction *m_showAppOnTopAction;
QAction *m_updateOnSaveAction;
bool m_engineClientConnected;
This diff is collapsed.
** Copyright (C) 2015 The Qt Company Ltd.
** Contact:
** This file is part of Qt Creator.
** Commercial License Usage
** Licensees holding valid commercial Qt licenses may use this file in
** accordance with the commercial license agreement provided with the
** Software or, alternatively, in accordance with the terms contained in
** a written agreement between you and The Qt Company. For licensing terms and
** conditions see For further information
** use the contact form at
** GNU Lesser General Public License Usage
** Alternatively, this file may be used under the terms of the GNU Lesser
** General Public License version 2.1 or version 3 as published by the Free
** Software Foundation and appearing in the file LICENSE.LGPLv21 and
** LICENSE.LGPLv3 included in the packaging of this file. Please review the
** following information to ensure the GNU Lesser General Public License
** requirements will be met: and
** In addition, as a special exception, The Qt Company gives you certain additional
** rights. These rights are described in The Qt Company LGPL Exception
** version 1.1, included in the file LGPL_EXCEPTION.txt in this package.
#include <texteditor/texteditor.h>
#include <qmljs/qmljsdocument.h>
namespace Core { class IEditor; }
namespace QmlJS { class ModelManagerInterface; }
namespace Debugger {
namespace Internal {
class UpdateInspector;
class QmlInspectorAdapter;
class QmlLiveTextPreview : public QObject
QmlLiveTextPreview(const QmlJS::Document::Ptr &doc,
const QmlJS::Document::Ptr &initDoc,
QmlInspectorAdapter *inspectorAdapter,
QObject *parent = 0);
void associateEditor(Core::IEditor *editor);
void unassociateEditor(Core::IEditor *editor);
void resetInitialDoc(const QmlJS::Document::Ptr &doc);
const QString fileName();
bool hasUnsynchronizableChange() { return m_changesUnsynchronizable; }
void selectedItemsChanged(const QList<int> &debugIds);
void fetchObjectsForLocation(const QString &file,
int lineNumber, int columnNumber);
void reloadRequest();
public slots:
void setApplyChangesToQmlInspector(bool applyChanges);
void updateDebugIds();
private slots:
void changeSelectedElements(const QList<QmlJS::AST::UiObjectMember *> offsets,
const QString &wordAtCursor);
void documentChanged(QmlJS::Document::Ptr doc);
void editorContentsChanged();
void onAutomaticUpdateFailed();
enum UnsyncronizableChangeType {
bool changeSelectedElements(const QList<int> offsets, const QString &wordAtCursor);
QList<int> objectReferencesForOffset(quint32 offset);
void showSyncWarning(UnsyncronizableChangeType unsyncronizableChangeType,
const QString &elementName,
unsigned line, unsigned column);
void removeOutofSyncInfo();
QHash<QmlJS::AST::UiObjectMember*, QList<int> > m_debugIds;
QHash<QmlJS::Document::Ptr, QSet<QmlJS::AST::UiObjectMember *> > m_createdObjects;
QmlJS::Document::Ptr m_previousDoc;
QmlJS::Document::Ptr m_initialDoc; //the document that was loaded by the server
QList<QPointer<TextEditor::TextEditorWidget> > m_editors;
bool m_applyChangesToQmlInspector;
QmlJS::Document::Ptr m_docWithUnappliedChanges;
QmlInspectorAdapter *m_inspectorAdapter;
QList<int> m_lastOffsets;
QmlJS::AST::UiObjectMember *m_nodeForOffset;
bool m_updateNodeForOffset;
bool m_changesUnsynchronizable;
bool m_contentsChanged;
friend class UpdateInspector;
} // namespace Internal
} // namespace Debugger
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