diff options
author | Simjees Abraham <simjees.abraham@nokia.com> | 2012-05-11 16:25:53 +0200 |
---|---|---|
committer | Kai Koehne <kai.koehne@nokia.com> | 2012-05-15 14:22:32 +0200 |
commit | d8e3121a6425fadb48f06ef7f41a4708e3d153db (patch) | |
tree | 843939a7e7ff8c7c7c8c201ef77661e07c01d6f7 /src/plugins/debugger/qml/qmllivetextpreview.h | |
parent | f1d3b432d59b076122e1c5beec9329ed1d8f8d1f (diff) |
Debugger:Apply Changes on Save modified for unsync. changes.
The user is given an option to reload the QML app if he has done
any unsynchronizable change. If the user opts to reload the QML,
Inspector informs the qtdevlarative to do so.
Change-Id: Iefc044e64380e64415630b051a60d6fe9fedfe04
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
Diffstat (limited to 'src/plugins/debugger/qml/qmllivetextpreview.h')
-rw-r--r-- | src/plugins/debugger/qml/qmllivetextpreview.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/plugins/debugger/qml/qmllivetextpreview.h b/src/plugins/debugger/qml/qmllivetextpreview.h index ef4936cf0c..adebbf2fd4 100644 --- a/src/plugins/debugger/qml/qmllivetextpreview.h +++ b/src/plugins/debugger/qml/qmllivetextpreview.h @@ -65,15 +65,19 @@ public: 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; } signals: 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(); + void reloadQml(); private slots: void changeSelectedElements(const QList<QmlJS::AST::UiObjectMember *> offsets, @@ -84,7 +88,8 @@ private: enum UnsyncronizableChangeType { NoUnsyncronizableChanges, AttributeChangeWarning, - ElementChangeWarning + ElementChangeWarning, + JSChangeWarning }; bool changeSelectedElements(const QList<int> offsets, const QString &wordAtCursor); @@ -92,6 +97,7 @@ private: void showSyncWarning(UnsyncronizableChangeType unsyncronizableChangeType, const QString &elementName, unsigned line, unsigned column); + void removeOutofSyncInfo(); private: QHash<QmlJS::AST::UiObjectMember*, QList<int> > m_debugIds; @@ -108,6 +114,7 @@ private: QList<int> m_lastOffsets; QmlJS::AST::UiObjectMember *m_nodeForOffset; bool m_updateNodeForOffset; + bool m_changesUnsynchronizable; friend class UpdateInspector; }; |