The assert is wrong. We check the currentModel from QmlDesignerPlugin::hideDesigner()
and it can be null in case of a .ui/.qbs file.
Change-Id: Ifffa168f81bade757cc8d800150e4411c09915e7
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
CrumbleBarInfo contains the ModelNode to properly identify the node.
We cannot use the id, because no every component has an id.
If the crumble bar only contains one item it is hidden.
Change-Id: I4d421eaad8962aa9043567e1f27957b1aa089766
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
This function did nothing but call EditorManager::openEditor(), so we can
call it directly instead. It was not used consistently anyway.
Change-Id: I639ef346164be9260e887faac5dc6651ccfd92c5
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
This function is highly confusing as a member of DesignDocument
and the logic can be implemented directly in the ShortcutManager.
Change-Id: Id722dcb71b542b4780614c9f895f06150ccb67ca
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
The ModelNodeOperations are an implementation detail of our
DesignerActions and should not be used in other places.
Change-Id: I495bfd043a6b1dd89952b0e7d2318e429678640b
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
The TextModifers for the sub component and the document
are now assigned to the model. This simplfifies the code.
The member variables to the TextModifers are only kept for ownership.
The DesignDocument still owns the two TextModifers.
Change-Id: Idc84a2ba718666ce54683a67635a93352784dddd
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
And use NodeInstanceView directly. There is still more cleanup required
for the view handling.
Change-Id: I62417644ceefb25fb9f3bb93a894b71ae0929cb0
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
To improve the readability of the source methods should be used.
Change-Id: I839e448369a03dc42b3649baed033daa20c4d49a
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
This StackedWidget is a leftover from the stand alone version.
In the context of Qt Creator this makes no sense anymore.
Change-Id: I6660dd4b43bdc12fa3329d333158fa759bee4d88
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
We remove m_currentModel and replace it by currentModel().
If m_inFileComponentModel is nil the current model is the document
model, otherwise the current model is the inFileComponentModel.
No need to keep m_currentModel around explicitly.
Change-Id: I590e02dc03c2319cbf713b880cf43d740d64e942
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
That is what it actually is, wrt how Qt API calls it.
Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
This is already called in changeToSubComponentAndPushOnCrumblePath()
Change-Id: Ia101144cc33407b0c6268cf7c3717502211654c6
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
This change
* Removes IMode::type, ModeManager::activateModeType, and
IEditor::preferredModeType, and adds IEditor::isDesignModePreferred
instead
* Adapts the mode switching code in EditorManager to handle multiple
windows, for example switching to edit mode should only happen if
the editor/view is in the main window. Otherwise the editor window
should be raised and focused
* Renames EditorManager::NoActivate --> DoNotChangeCurrentEditor
* Reverts the EditorManager::ModeSwitch logic to switch mode or
make the current editor visible by default, introducing
DoNotMakeVisible flag instead
* Fixes a few instances where EditorManager::ModeSwitch should have been
used
One non-trivial problem left: If you open a .ui file and switch to an
external editor window, edit mode is activated, because the current
editor no longer is a .ui file, which means that the design mode gets
deactivated.
Change-Id: I76c5c2391eb4090143b778fb103acff3a5a1ff41
Reviewed-by: David Schulz <david.schulz@digia.com>
Ran script to remove inludes on a trial-and-error basis and
manually corrected it.
Change-Id: I8a2e9e35980198fc4162623db044c228bd209a0f
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
And PropertyName is a typedef for QByteArray. Because we don't use the
features of QString and the source would be cluttered with QLatin1Strings
we changed the property name to QByteArray.
Change-Id: Ib70ef136bbc411504b450456bd9bb705ae93dd25
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
There is a hot fix, which is using a timer. This patch is using the
improved approach of testing if a document exists in the new project.
Change-Id: I16ac049c2cc4c0a21ab82fc854c8a062df037f55
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
For deleting Items we need a QmlModelView to delete
dangling property changes.
In the past we "missused" the FormEditorView.
For now VewManager will expose the form editor as
a QmlModelView.
I also cleaned some includes and removed debugs.
Task-number: QTCREATORBUG-8650
Change-Id: I22ca7c5f741324532e81918571be39babd12d2e4
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
The subcomponent manager populates the item library.
This means the ItemLibraryView has to be properly
initialized before we call m_subComponentManager->update().
I added a helper function and call it from activateAutoSynchronization(),
after all views have been attached.
Change-Id: Ie802f93c7d0a76b42160d4a92e8448e900380b71
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
The document handling in the qml designer was complicated source
code, which was initially intended for a non creator application.
To integrate new views it has to be changed and cleaned up. This
is the first major step in that direction.
Change-Id: Ie26f0aad7a03946d18bdb4c0759b246c5439d922
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>