summaryrefslogtreecommitdiff
path: root/src/libs/qmljs/qmljsscopebuilder.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Update License according to agreement with Free Qt FoundationTobias Hunger2016-01-191-17/+12
| | | | | | | * Update remaining files in src Change-Id: I1896f17fcf34f71c3310c87899fb5171b8e4afb1 Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
* Update LicenseEike Ziller2015-01-161-6/+6
| | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* qmljsscopebuilder: avoid warning from clangRobert Loehning2014-11-041-19/+20
| | | | | Change-Id: I7ea4b8cd971bee1368dec3ce92ef27bf45d4c88b Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* License updateEike Ziller2014-10-091-7/+8
| | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* Incremented year in copyright infoRobert Loehning2014-01-081-1/+1
| | | | | | Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* Fix coding style for else statementsOrgad Shaneh2013-07-171-2/+2
| | | | | Change-Id: I1309db70e98d678e150388c76ce665e988fdf081 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Clean headers in QmlJs.Friedemann Kleint2013-04-041-1/+0
| | | | | | | | Ran script to remove inludes on a trial-and-error basis and manually corrected it (Parser excluded). Change-Id: I5ec6e1076430009bb72094411b2c3386f8bea548 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* Merge remote-tracking branch 'origin/2.6'Oswald Buddenhagen2013-01-311-1/+1
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in src/plugins/debugger/qtmessageloghandler.cpp src/plugins/debugger/qtmessagelogwindow.cpp src/plugins/madde/maemodeployconfigurationwidget.cpp src/plugins/qmldesigner/components/integration/designdocumentcontroller.cpp src/plugins/qmldesigner/designercore/include/widgetqueryview.h src/plugins/qmldesigner/designercore/metainfo/metainfoparser.cpp src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.cpp src/plugins/qmldesigner/designercore/model/modelnodecontextmenu.h src/plugins/qmlprojectmanager/qmlprojectapplicationwizard.cpp src/plugins/qnx/bardescriptormagicmatcher.h src/plugins/qt4projectmanager/profilekeywords.cpp src/plugins/remotelinux/deployablefilesperprofile.cpp src/plugins/remotelinux/deployablefilesperprofile.h src/plugins/remotelinux/deploymentinfo.cpp src/plugins/remotelinux/deploymentsettingsassistant.cpp src/plugins/remotelinux/profilesupdatedialog.cpp tests/auto/icheckbuild/ichecklib.cpp tests/auto/icheckbuild/parsemanager.cpp tests/auto/icheckbuild/parsemanager.h Change-Id: Ie465a578446a089e1c502d1cb1096e84ca058104
| * Incremented year in copyright infov2.6.2Robert Loehning2013-01-291-1/+1
| | | | | | | | | | Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205 Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Remove braces for single lines of conditionsOrgad Shaneh2013-01-081-10/+6
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | #!/usr/bin/env ruby Dir.glob('**/*.cpp') { |file| # skip ast (excluding paste, astpath, and canv'ast'imer) next if file =~ /ast[^eip]|keywords\.|qualifiers|preprocessor|names.cpp/i s = File.read(file) next if s.include?('qlalr') orig = s.dup s.gsub!(/\n *if [^\n]*{\n[^\n]*\n\s+}(\s+else if [^\n]* {\n[^\n]*\n\s+})*(\s+else {\n[^\n]*\n\s+})?\n/m) { |m| res = $& if res =~ /^\s*(\/\/|[A-Z_]{3,})/ # C++ comment or macro (Q_UNUSED, SDEBUG), do not touch braces res else res.gsub!('} else', 'else') res.gsub!(/\n +} *\n/m, "\n") res.gsub(/ *{$/, '') end } s.gsub!(/ *$/, '') File.open(file, 'wb').write(s) if s != orig } Change-Id: I3b30ee60df0986f66c02132c65fc38a3fbb6bbdc Reviewed-by: hjk <qthjk@ovi.com>
* Adjust license headershjk2012-10-051-21/+20
| | | | | Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* Contact -> qt-project.orgEike Ziller2012-07-191-3/+1
| | | | | Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Long live the king!hjk2012-01-261-1/+1
| | | | | Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
* Merge remote-tracking branch 'origin/2.4'Eike Ziller2011-11-111-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/qmljs/qmljsinterpreter.cpp src/libs/qmljs/qmljsinterpreter.h src/plugins/debugger/qml/scriptconsole.cpp src/plugins/git/gitplugin.cpp src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas.cpp src/plugins/qmlprofiler/canvas/qdeclarativetiledcanvas_p.h Change-Id: Iad59c8d87c72a21c79c047e374c0ab689998af39
| * all: s/info@qt.nokia.com/qt-info@nokia.com/hjk2011-11-031-2/+2
| | | | | | | | | | Change-Id: If18afb5d4665924e7d9250dccbc60a65e6daa75e Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* | QmlJS: Convert more dynamic_casts to value_casts.Christian Kamm2011-10-131-2/+2
| | | | | | | | | | | | | | | | And introduce a good error message for the case when someone forgets the specialization of the value_cast template. Change-Id: Iec55a839e8f5eef5872b1dab8601f66e0e0c88de Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
* | QmlJS: Add more value_casts.Christian Kamm2011-10-121-3/+3
| | | | | | | | | | | | | | | | | | | | And switch all existing dynamic_casts to value_casts. Change-Id: I93b89358e4802080f40b332074c64f4e91a2bc4c Reviewed-on: http://codereview.qt-project.org/6311 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
* | QmlJS: Compile fix.Christian Kamm2011-10-121-1/+1
| | | | | | | | | | | | | | Change-Id: Ie7d49f1dd54cd8316d660bc8ae6857dc2effc963 Reviewed-on: http://codereview.qt-project.org/6504 Sanity-Review: Christian Kamm <christian.d.kamm@nokia.com> Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* | QmlJS: Rename QmlObjectValue -> CppComponentValue.Christian Kamm2011-10-121-2/+2
| | | | | | | | | | | | | | | | | | Reviewed-by: Fawzi Mohamed Reviewed-by: Thomas Hartmann Change-Id: Ib89388d5a5678403e4637eec5829f3520637ee27 Reviewed-on: http://codereview.qt-project.org/6310 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com> Sanity-Review: Christian Kamm <christian.d.kamm@nokia.com>
* | QmlJS: Set correct scope in signal handlers.Christian Kamm2011-10-121-5/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This means the code model will now offer correct completion and highlighting for arguments of signals in their handlers, example: MouseArea { onClicked: { mou<complete> // now also completes 'mouse' } } Reviewed-by: Fawzi Mohamed Change-Id: I01838ef00e391b13e6e5a832c9ec3cd983689c5b Reviewed-on: http://codereview.qt-project.org/6147 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com> Sanity-Review: Christian Kamm <christian.d.kamm@nokia.com>
* | QmlJS: Move commonly used functions to qmlutils.h.Christian Kamm2011-10-101-5/+2
|/ | | | | | | Change-Id: I22376d96fe575bc00a55094c06af80e32a5587e6 Reviewed-on: http://codereview.qt-project.org/6238 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
* QmlJS: Fix saving and restoring QML scope objects.Christian Kamm2011-09-281-4/+11
| | | | | | Change-Id: I621d7c3dbc8d5613b5d9ffddd08acd582559990b Reviewed-on: http://codereview.qt-project.org/5720 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
* QmlJS: Rework exported C++ type registry.Christian Kamm2011-09-191-4/+4
| | | | | | | | | | | | | | | | The problem was that if you exported A 1.0, A 1.1 and B 1.0 where A is the prototype of B the code model had not enough information to know that, depending on the import, B 1.0's prototype should be A 1.1 or A 1.0. To solve this problem QmlObjectValues now store the import's version as well as the local component version. In the example above B 1.0 would have import version 1.1 if the 1.1 module was imported and thus be able to choose the right prototype. Change-Id: I7ef33f12ca5a528c62b2a8240f4b5720b0ebd4c3 Reviewed-on: http://codereview.qt-project.org/5129 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
* QmlJS: Adjust existing code for updated QML parser.Christian Kamm2011-09-141-4/+4
| | | | | | Change-Id: I153723eeb9973be025daf47e317f7b9d076a3c72 Reviewed-on: http://codereview.qt-project.org/4733 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
* QmlJS: Remove Interpreter namespace.Christian Kamm2011-08-081-1/+0
| | | | | | | | | The distinction between QmlJS and QmlJS::Interpreter has always been weak and the extra namespace just added an unnecessary complication. Change-Id: I4db8ef4bd91b5f6bf610a9d23fdbf55bd60250fc Reviewed-on: http://codereview.qt.nokia.com/2743 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
* QmlJS: Share Context.Christian Kamm2011-08-081-1/+1
| | | | | | | | | | | | Previously Context was not entirely thread safe and had to be copied locally. Now it is thread safe and its lifetime managed by QSharedPointer. The non-safe parts were moved into ScopeChain in a previous commit. Change-Id: I851a93de85cbd6391dbea0fe33b011e2e093addb Reviewed-on: http://codereview.qt.nokia.com/1695 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
* QmlJS: Split Context and ScopeChain.Christian Kamm2011-08-081-118/+35
| | | | | | | | | | | | Context is created by Link and has information about imports for all Documents in a Snapshot. ScopeChain represents how lookup is done at a specific place in a Document. Change-Id: I874102d57bbaf1a497fa3f27633bed6ee75dcf10 Reviewed-on: http://codereview.qt.nokia.com/1694 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
* QmlJS: Move Context to its own file.Christian Kamm2011-07-051-1/+1
| | | | | | Change-Id: I91331b7039e27e2f57cc19b985c8ed86c955ec9e Reviewed-on: http://codereview.qt.nokia.com/1042 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
* QmlJS: Rename Interpreter::Engine -> ValueOwnerChristian Kamm2011-07-051-2/+2
| | | | | | | | Also move to a separate file. Change-Id: I05910e8cf04a533b5d09a1c16e612e3b99b1d606 Reviewed-on: http://codereview.qt.nokia.com/1039 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
* Qmljs: added scope for blocks in UiScriptBindings and UiPublicMemberFawzi Mohamed2011-06-071-7/+26
| | | | | | | | | | correctly insert the scope for code blocks in UiScriptBindings and UiPublicMember, and improve find usages for types (correctly detecting variables in the same scope) Change-Id: Iaaf1a59f041f3831fbe04243b220fb85fde76479 Reviewed-on: http://codereview.qt.nokia.com/335 Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* QmlJS: Separate imported types and imported JS scopes.Christian Kamm2011-05-271-2/+3
| | | | | | | Task-number: QTCREATORBUG-4981 Change-Id: I06d3e428ca4928296a3d5977aeff29fc3217c37c Reviewed-on: http://codereview.qt.nokia.com/175 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
* QmlJS: Refactor ObjectValue members.Christian Kamm2011-05-241-1/+1
| | | | | | | | | | | * property -> lookupMember * setProperty -> setMember * removeProperty -> removeMember Change-Id: I638479ee2b90b684283e714630bdcab237f6b3f2 Done-with: Fawzi Mohamed Reviewed-on: http://codereview.qt.nokia.com/77 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
* Fix/add copyright headersTobias Hunger2011-05-061-1/+1
| | | | Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
* QmlJS: Stop doing significant work in constructors.Christian Kamm2011-05-061-2/+1
| | | | | | To avoid order-of-initialization problems. Reviewed-by: Thomas Hartmann
* QmlJS: Fix type detection for alias properties.Christian Kamm2011-05-041-7/+8
| | | | Task-number: QTCREATORBUG-2306
* Update license.hjk2011-04-131-14/+13
|
* QmlJS: Remove the strict separation of types and attached types.Christian Kamm2011-02-211-1/+0
| | | | | | | | | | | | | | | | The problem was that several lookup calls suddenly failed because the actual QML types were no longer in the default scope chain. However, the QML documentation says the type names are in the scope. Also, 'MyComponent.' in a JS-expression context only showed the attached properties of MyComponent and missed the enums. With this change completion now may offers too many options, but that's better than missing some. This reverts parts of 490f2797f636ff49ce0a778610a2532d1277e4d4 Reviewed-by: Leandro Melo
* QmlJS: Completion for attached properties.Christian Kamm2011-02-101-1/+3
|
* It's 2011 now.con2011-01-121-1/+1
| | | | Reviewed-by: hjk
* Merge branch '2.1'con2010-12-171-7/+11
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/coreplugin/basemode.cpp src/plugins/coreplugin/basemode.h src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.cpp src/plugins/coreplugin/scriptmanager/qworkbench_wrapper.h src/plugins/debugger/cdb/cdbsymbolpathlisteditor.cpp src/plugins/debugger/debuggeragents.cpp src/plugins/debugger/debuggeruiswitcher.cpp src/plugins/debugger/debuggeruiswitcher.h src/plugins/projectexplorer/buildconfigdialog.cpp src/plugins/qmldesigner/components/propertyeditor/colorwidget.cpp src/plugins/qmldesigner/components/propertyeditor/colorwidget.h src/plugins/qmldesigner/designercore/include/enumeratormetainfo.h src/plugins/qmldesigner/designercore/include/modelutilities.h src/plugins/qmldesigner/designercore/include/nodeinstance.h src/plugins/qmldesigner/designercore/include/propertymetainfo.h src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.cpp src/plugins/qmldesigner/designercore/instances/graphicsscenenodeinstance.h src/plugins/qmldesigner/designercore/instances/graphicsviewnodeinstance.cpp src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.cpp src/plugins/qmldesigner/designercore/instances/graphicswidgetnodeinstance.h src/plugins/qmldesigner/designercore/instances/nodeinstance.cpp src/plugins/qmldesigner/designercore/instances/qmlviewnodeinstance.cpp src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.cpp src/plugins/qmldesigner/designercore/instances/widgetnodeinstance.h src/plugins/qmldesigner/designercore/metainfo/enumeratormetainfo.cpp src/plugins/qmldesigner/designercore/metainfo/propertymetainfo.cpp src/plugins/qmldesigner/designercore/model/modelutilities.cpp src/plugins/snippets/inputwidget.cpp src/plugins/snippets/snippetscompletion.cpp src/plugins/snippets/snippetscompletion.h src/plugins/snippets/snippetspec.cpp src/plugins/snippets/snippetsplugin.cpp src/plugins/snippets/snippetswindow.cpp src/plugins/snippets/snippetswindow.h src/plugins/texteditor/snippetsparser.cpp src/tools/qml/qmldom/main.cpp tests/manual/trk/runner.cpp tests/manual/trk/trkolddevice.cpp tests/manual/trk/trkolddevice.h tests/manual/trk/trkserver.cpp
| * License headers.con2010-12-171-7/+11
| |
* | QmlJS: Fix binding and scoping function expressions.Christian Kamm2010-11-251-4/+6
| | | | | | | | Reviewed-by: Erik Verbruggen
* | QmlJS: Make evaluator understand expression statements.Christian Kamm2010-11-251-10/+7
| | | | | | | | Reviewed-by: Erik Verbruggen
* | QmlJS: Reactivate instantiating component scope detection.Christian Kamm2010-11-251-0/+5
| | | | | | | | | | | | | | | | | | | | * Bind::usesQmlPrototype is now significantly more performant * type environments are no longer hashed by filename, but rather by Document * * duplicate scope builds are avoided Task-number: QTCREATORBUG-2835 Reviewed-by: Erik Verbruggen
* | QmlJS: Avoid infinite loop with recursive prototypes.Christian Kamm2010-11-151-7/+8
|/
* QmlJS: Fix false-positive errors reported for ListElement, Connections.Christian Kamm2010-10-201-1/+2
| | | | | Task-number: QTCREATORBUG-2802 Reviewed-by: Roberto Raggi
* QmlJS: Fix several crashes when UiQualifiedId::name is 0.Christian Kamm2010-10-141-1/+3
| | | | | Task-number: QTCREATORBUG-2737 Reviewed-by: Kai Koehne
* QmlJS: Fix an instance of relying on the Qt package name.Christian Kamm2010-10-011-1/+2
| | | | Reviewed-by: Thomas Hartmann
* QmlJS: Add initial 'Find Usages' support.Christian Kamm2010-09-241-1/+82
|
* QmlJS: Allow lookups on const Contexts. Pass const Contexts where ok.Christian Kamm2010-08-251-1/+1
| | | | | | In preparation for caching Contexts. Reviewed-by: Erik Verbruggen