This fixes a tack overflow caused by an exponential
number of combination tested.
We try to find the optimal solution for line breaks by brute force.
Unfortunately this leads to a stack overflow, if two many
line breaks are possible.
This patch limits the number of possible line break positions to 11.
If there are more possible line breaks we remove every second one.
This seems to be a reasonable enough heuristic and we deal with
a corner case anyway.
Task-number: QTCREATORBUG-17331
Change-Id: I1b80fc3eaa0e148aec30fc57ac75824181f2d883
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
The Math. function like Math.max() are quite useful
to define more complex layouts. Therefore we allow them.
Change-Id: Ia95dcbcc1b8e96c117650dc8643da4a9de0ecdba
Reviewed-by: J-P Nurmi <jpnurmi@qt.io>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
Left brace wasn't handled in the expression_maybe_continuation state
of qml/js code formatter. It led to expression_or_objectdefinition
could not be continued on a new line.
Task-number: QTCREATORBUG-12326
Change-Id: Id8fcaa586000008fce72c7c0c03ed1739b1c7aa1
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
If we have a pure QML plugin with a qmldir file,
then the code model ends up without a version number.
This is bad, since the version is required for graphical tooling.
What we can do is to take the highest version number from all
components that are defined in the plugin.
Change-Id: Idb4206201efac91250100740e287676031d3016a
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
Inside a Connections item JavaScript blocks should be allowed.
Change-Id: Ia6a08fc575a72980bd53a32249bf302b7a426266
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
When rescanning imports we generally get a new version of the parent
document. When replacing the cached documents we want to release the
old ones, not the new ones. Failing to do so leads to types
disappearing from the QML code model and to leaking memory.
Task-number: QTCREATORBUG-17175
Change-Id: I3994444ac0a6cd87f9d9d0b47ab3d6015660e416
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Certain ids can be ambiguous and have name clashes with properties.
Those ids are not supported in the designer.
Change-Id: Ida293d24611c467df6ef813a541e8abfc06b51cb
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
while untypical, it's perfectly legitimate to have absolute paths in qrc
files. auto-generated files (like the ones created by resources.prf when
shadow-building) can make good use of them.
Change-Id: I59da260b5241096f7c44b9de5ee04f65e8c1218c
Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
Use the plugin's parent path as working directory for the qmlplugindump
process. This should be more reliable with regards to paths that
include symbolic links to shared or remote volumes.
Using the plugin's parent path will also be needed in order to handle
relative paths passed to the dumper (ie: with the -dependencies
option). This feature is not yet implemented in QtCreator.
Change-Id: I9c863a95d03fc7d03c84e704e39f2e0520aaa01e
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
You cannot use the variable itself in its initializer...
Change-Id: Ibaf64b717b0ad5523b4ef8cf20ce4bf967a64a43
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
The warnings for Javascript follows the rules of JsLint, that can be
non-obvious to the user. This patch add a reference to the relevant
section in QtCreator documentation.
Task-number: QTCREATORBUG-16771
Change-Id: I64ce331c6adf4b45c2510e35d68a6ce7e37ed6d5
Reviewed-by: Mitch Curtis <mitch.curtis@qt.io>
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io>
Use a regular expression to get the module name, major version and
minor version from a string representing the module import.
Change-Id: I99f85ff4844cdfba142b45b4881241a1d40b772e
Reviewed-by: Erik Verbruggen <erik.verbruggen@qt.io>
This overload of error is deprecated in 5.6.
Replace with errorOccurred, which was introduced in 5.6.
Change-Id: Iccfba7e7103b7ce377471696f1f2ec217e52c840
Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
If the document that FindExportedCppTypes is to search is not in the
snapshot, skip over it (instead of passing the shared pointer with a
null-value inside).
Change-Id: I462e3d22aa4e1cc51e710c75ae0f9399c151240b
Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
Reviewed-by: Nikolai Kosjar <nikolai.kosjar@qt.io>
- Add full stop to the end of messages.
- Use double quotes for emphasis (instead of single quotes).
Change-Id: I5b0bd2cecda115735b67ceaab202c36ca5d81b43
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
Previously the code model would only get updated when the document that
contains the qmlRegisterType changed. If the actual component exported
to QML lives in a different file, any updates to that component would
be lost. With this change we keep track of the header files the
components are declared in and rescan if any of them changes.
This is still not the greatest way to do it as there are a number of
ways to introduce dependencies the system cannot detect. It's better
than before, though.
Change-Id: Ic077c516dca3ac720f78973c84e5e6e91b6a5c07
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
This is a real bottle neck on Windows
and I do not know of a case where it is required.
Change-Id: I99ebf3bfdd22cfb0ed82d6d39eeb83f079f654d6
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
States can of course contain PropertyChanges.
Change-Id: Ie78be1db58c6820a49356b1cd70102e10211030b
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
These checks slow down linking for big projects.
Change-Id: I76a8897528b03ae3a31d5919be85c5ae7c3543a8
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
- Use the entire Export block when creating a module, not just the
Depends items. Adapt references to the product source directory
and the "share" directory so that they point to the respective
locations in the install tree.
- Install dev headers for some more plugins.
- Bug fixes & polishing.
Create a "dev installation" like this:
$ qbs qtc.make_dev_package:true qbs.installRoot:<install root>
Then build your plugin against it like this:
$ qbs qtc.make_dev_package:true qbs.installRoot:<install root>
project.qbsSearchPaths:<install root>/qbs-resources
(Using qbs from 1.5 branch; 1.5.1 requires a trivial wrapper project.)
That's all. Successfully tested with all commercial plugins on Linux.
Change-Id: Ie39c4717dafcd431c533421a15f2f898783d8521
Reviewed-by: Jake Petroules <jake.petroules@qt.io>
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
In standalone tests there is no instance of ExtensionSystem::PluginManager.
Change-Id: I890016c4e0d2fbb41cfc0a5614e936d31e43cd0f
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
The module lookup used to not consider the undefined version (-1.-1) a
valid version number. This caused QtCreator to crash because of a
failing assertion. This patch makes the assertion more permissive and
handle the lookup of an undefined version by substituting it with an
empty string.
Task-number: QTCREATORBUG-16220
Change-Id: Iac574cfc04b4718b0d0809352e5c9456e4392e83
Reviewed-by: Orgad Shaneh <orgads@gmail.com>