First we try to find a project that contains the document.
We fallback to the current project.
If the kit of the active target is invalid we return 0.
Before any newly created qml file used the fallback puppet.
Change-Id: Ide3333455d85418459924e507f4f5e77afae4188
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
For some reason
setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding)
fixes a styling bug in the toolbar.
Change-Id: I8ac219a0896d36ce5632eee1542b37fc577673ff
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
The class is renamed to RewriterError and moved outside of RewriterView.
Reason: Inner classes cannot be forward declared in C++.
Changing RewriterView::Error to RewriterError, because inner
classes cannot be forward declared.
Change-Id: I51e3b08efeda44a8cd2abe84e833a5f8c190b84e
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
We collect all possible qrc path and the mappings provided by
the code model in the TextToModelMerger.
Then we set this mapping as environment variable for the puppet
in the PuppetCreator(QMLDESIGNER_RC_PATHS).
Change-Id: I4b4c7253af23d1f32a75394d04199e76f2e9efdd
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Demote previously auto-detected toolchains to manual detection if
the binary is still found but no longer auto-detected.
This should address the bug were toolchains stayed around after they
were deregistered with the sdktool (without de-installing the binaries).
Task-number: QTCREATORBUG-12751
Change-Id: Ifcc8de0691c0b0839b8bf887a2a934c41101febe
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This is the same as ToolChain::typeId(), so it should have the same
name.
Change-Id: Ifd344825be801aff3dab96bfe924a1984a77bbee
Reviewed-by: Daniel Teske <daniel.teske@theqtcompany.com>
This allows us to remove empty implementations in the views.
Change-Id: I65f815dc5bd699d3b8a782881a2cdd5b01fb76ee
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
If the id of a ModelNode is changed the expression of an exporting property
(property alias id: id) is changed but not the property name.
So we get property alias oldId: newId.
To keep the exports consistent this code adjusts the property name
to the new id.
Change-Id: Ibd9c9f4a2e755fbfb7beeed458ea45270db7f666
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Already cached items from a possible wrong
environment(kit, default kit, ...) have to be cleared.
Change-Id: Ibd0643a8508b791aa22e0197f7bed6cc9c521066
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Those import do not make sense in the designer.
So the user should not add them.
Change-Id: I253b2e0c4af942a8c697b1968c9656495e80f719
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
We know that TextInput and TextEdit are enum scopes. Currently
there is no other way (than hardcoding) to identify those scopes, if
they are used for controls (And the actual type is int).
Change-Id: I8eccc54d3b7a90428a71c882364a04e5d1030988
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This allows to use macros like __FUNCTION__ for the exceptions
if QT_NO_CAST_FROM_ASCII is defined.
Change-Id: Ib629482bb60502cb311cb2657f1a73c730daf6aa
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
If a child node id have an export alias property this one was not deleted.
Now we delete the export alias properties of all child nodes.
Change-Id: Ica66a199e8a8d6615208e56dc46ee3de807ddcaa
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
The version check was simply wrong.
The version of the used item might be higher then the version in the
item library. We can still use the icon.
I removed the version check completely. There is no reason to have different
icons for different versions. This just increases the complexity and
introduces bugs without any reason/use cases.
Change-Id: Ib6d2040490739ee903ffe8eb308cd942b96444aa
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
This are the "trivial" low risk fixes for QT_NO_CAST_FROM_ASCII
in the Qt Quick Designer.
Change-Id: Ife1542a61abbd1b323cecea46854d95de252f2bb
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>