summaryrefslogtreecommitdiff
path: root/src/libs/qmljs/qmljsdocument.cpp
Commit message (Collapse)AuthorAgeFilesLines
* QmlJS: Fix compilation with Qt4Nikolai Kosjar2013-11-201-1/+1
| | | | | Change-Id: I036f2ccf07b836ecff63a055e3204327d006c0d0 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* qmljs: scan importsFawzi Mohamed2013-11-201-3/+24
| | | | | Change-Id: Ied59f5d56c5816d9da57f23a619d604acec76000 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* qmljs: fingerprints for documents, libraries and FakeMetaObjectsFawzi Mohamed2013-11-201-2/+116
| | | | | Change-Id: Ib9c9b86fbed19539dc42696292bdb3b93dd1b575 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* qmljs: new import/dep trackingFawzi Mohamed2013-11-201-0/+19
| | | | | Change-Id: I9f4de2a06aad3afb80372a4b80e56db658683575 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* qmljs: added qmljsconstants.hFawzi Mohamed2013-10-231-36/+37
| | | | | | | | | | | | | | Moved Document::Language, Import::Type and StaticAnalysis::Severity enums to qmljsconstants.h and renamed values removing the redundant part. Thus the effective length changed little or improved (Document::QmlLanguage => Language::Qml). The separate file allows better reuse of enum values without introducing circular dependencies. Change-Id: I5186d7c04f5d3f6c289068b919be5ff1ff118326 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* Doc: edit qmljs docsLeena Miettinen2013-09-231-1/+1
| | | | | | | | Use standard wording, fix capitalization, typos, and style and grammar issues. Change-Id: Iac3faa59ef32aa2a8ec1857aed0d861701cbfbe7 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* Doc: use standard wording in \brief commandsLeena Miettinen2013-06-201-5/+4
| | | | | | | | | QDoc does some magic with the \class and \namespaces and \brief commands, so the following wording must be used: "The xxx class yyy ..." Change-Id: Id231f30e8464898b776888d5423523de404aae34 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* qmljs: adding qrc supportFawzi Mohamed2013-06-031-0/+16
| | | | | | | | | | | | | | | | | | | | | Qmljs now keeps a cache of parsed qrc files, and can resolve "qrc:" links. This breaks the assumption that the name that the qml files has on the filesystem is the one that qml sees, and that contents of directories can be found just looking at file whose path starts with the directory path. Currently the first file is used when multiple qrc files contain the same path, but support for strict and weak path resolving is already there. At the moment only qrc files for projects that call updateQmljsCodeModel are updated. ChangeLog: QmljsSupport: Imports using qrc links are resolved. Task-number: QTCREATORBUG-8953 Change-Id: I695fac2692af2417d49c192c580a1c2e7b4873f4 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* Clean headers in QmlJs.Friedemann Kleint2013-04-041-2/+1
| | | | | | | | 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>
* qmljs: do not show warnings for not fully supported languagesFawzi Mohamed2013-03-051-0/+18
| | | | | Change-Id: Ie153caefcbb0f5d6d627697fd324d0cd0e3fa31f Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
* qmljs: add infrastructure handling qml dialects betterFawzi Mohamed2013-02-211-0/+5
| | | | | | | | | | | | | | | | | | QmlBundles enables us to treat the different qml dialects differently. Add imports completion. Change-log: [Qml/JS Support] Corrected handling of QtQuick2 only features. Change-log: [Qml/JS Support] Added import completion in editor. Task-number: QTCREATORBUG-8750 Task-number: QTCREATORBUG-8624 Task-number: QTCREATORBUG-8584 Task-number: QTCREATORBUG-8583 Task-number: QTCREATORBUG-8429 Change-Id: I1384b1b23136a85b4d077895ea86f92960da9e71 Reviewed-by: Kai Koehne <kai.koehne@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>
* | qmljs: differnt language constants for the different qml flavorsFawzi Mohamed2013-01-311-3/+20
| | | | | | | | | | | | | | | | | | | | | | Added separated qbs, qmltypes, QtQuick1, and QtQuick2 and "generic" Qml languages. Cleaned up the mime types a bit, preparing for registered mime types. Change-Id: I0e484c93e003176cd659acc546baa6d024defa19 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* | Remove braces for single lines of conditionsOrgad Shaneh2013-01-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #!/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>
* | QmlJS: Compile with QT_NO_CAST_FROM_ASCIIOrgad Shaneh2012-11-281-3/+3
|/ | | | | | Change-Id: I0c5654a978f47a4db5428936fd44633f21394830 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* Adjust license headershjk2012-10-051-21/+20
| | | | | Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* QmlJS: Update to latest QmlJS parser from Qt 5.Christian Kamm2012-07-311-1/+1
| | | | | | | Using qtdeclarative revision c9b7582a2e7ad9fcd03dd999c3b7a16b72803238 Change-Id: I9c942fa04c3fab5ef57b38e13471d0a4e2e8a2bf Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Contact -> qt-project.orgEike Ziller2012-07-191-3/+1
| | | | | Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* Removed module names from #include directives.Erik Verbruggen2012-02-151-1/+1
| | | | | | | | Getting the #include directives ready for Qt5. This includes the new-project wizards. Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* Long live the king!hjk2012-01-261-1/+1
| | | | | Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2 Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
* QmlJS: Add documentation for QmlJS::Value.Christian Kamm2011-11-151-9/+9
| | | | | | | | | Also: * Remove unnecessary QmlJS:: qualifications in existing documentation. * Remove unnecessary explicit links in the documentation. Change-Id: Icb41941d98b5cfe9d2fb3b3887fafee16635eb13 Reviewed-by: Leandro Melo <leandro.melo@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: Make Document::Ptr point to a const Document.Christian Kamm2011-11-081-6/+6
| | | | | | | | | | Change-Id: I15a36c3f918c0ee16f30bc8366df505e0afac949 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
* | QmlJS: Documentation.Christian Kamm2011-11-071-3/+7
| | | | | | | | | | | | Change-Id: I2a095e38b7d79a5fb39a16d8f32b48c8e28132f6 Reviewed-by: Leena Miettinen <riitta-leena.miettinen@nokia.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
* | QmlJS: Improve tests/tools/qml-ast2dot.Christian Kamm2011-10-201-0/+11
| | | | | | | | | | Change-Id: Ifd06745ec823d09ae7b42318d418fa1adb01824b Reviewed-by: Christian Kamm <christian.d.kamm@nokia.com>
* | Json: Use the javascript editor for json files.Christian Kamm2011-10-121-5/+0
|/ | | | | | | | Task-number: QTCREATORBUG-4639 Change-Id: Icd0fda434d5ca66056d784dd87240db76e8a442c Reviewed-on: http://codereview.qt-project.org/6035 Sanity-Review: Qt Sanity Bot <qt_sanity_bot@ovi.com> Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
* QmlJS: Support .import directives in js files.Christian Kamm2011-09-281-6/+32
| | | | | | | | | | | * Allow .import... * Fix parsing of JS files when using Lexer::scanDirectives() * Clean up ImportInfo construction. * Rename ImportInfo::id to ImportInfo::as. Change-Id: I888da248f06dc6184db99aa74c3b50d7f2f5e491 Reviewed-on: http://codereview.qt-project.org/5625 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* QmlJS: Use new Lexer::scanDirectives.Christian Kamm2011-09-191-83/+6
| | | | | | Change-Id: Id9f4cd6a53dc0d3f4cf0a0b3c846eca0e48372fc Reviewed-on: http://codereview.qt-project.org/5144 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* QmlJS: Adjust existing code for updated QML parser.Christian Kamm2011-09-141-8/+1
| | | | | | Change-Id: I153723eeb9973be025daf47e317f7b9d076a3c72 Reviewed-on: http://codereview.qt-project.org/4733 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@nokia.com>
* QmlJS: Use mime types to distinguish qml and js files.Christian Kamm2011-09-121-13/+16
| | | | | | | | | This allows adding patterns to the qml mime type in the options dialog. Previously they were always parsed as js. Change-Id: Ifa344fb6ab8cbcda02becef991cf6807615a1caa Reviewed-on: http://codereview.qt-project.org/4515 Reviewed-by: Leandro T. C. Melo <leandro.melo@nokia.com>
* QmlJS: Honor typeinfo lines in qmldir files.Christian Kamm2011-09-081-0/+1
| | | | | | Change-Id: I1ddad1eb031bc4b95671be4a474b5e8e72f6e350 Reviewed-on: http://codereview.qt-project.org/4137 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
* QmlJS: Fix semantic and non-semantic QML error reporting.Christian Kamm2011-08-181-2/+2
| | | | | | | | | | | | | The QML snapshot only ever contains valid Documents; to compile a list of parser problems we need to get at the invalid documents. To do that, the model manager now provides a Snapshot with up to date, but potentially invalid documents. That should also be useful for other things. Change-Id: I67892f63771c221bf2fe2c2bf0240a0f4e523227 Reviewed-on: http://codereview.qt.nokia.com/3012 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@nokia.com>
* QmlJS: Allow for QML modules with version subdirectories.Christian Kamm2011-05-301-3/+3
| | | | | | | | | | | | | | That means import Foo 2.1 can resolve to /path/Foo.2.1 or /path/Foo.2 or /path/Foo Task-number: QTCREATORBUG-4607 Change-Id: Ie1efc5be2ca2ed3ccc130e8a662f94aed11bec1a Reviewed-on: http://codereview.qt.nokia.com/194 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* QmlJS: Add tooltips to imports.Christian Kamm2011-05-121-2/+2
| | | | Task-number: QTCREATORBUG-4814
* Fix/add copyright headersTobias Hunger2011-05-061-1/+1
| | | | Change-Id: I8b73d583be1ee7183f4074bce49d5390e38631a2
* QmlJS: Fix type detection for alias properties.Christian Kamm2011-05-041-0/+6
| | | | Task-number: QTCREATORBUG-2306
* Update license.hjk2011-04-131-14/+13
|
* 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: Improve error reporting for failed plugin dumps.Christian Kamm2010-11-251-1/+2
| | | | | | | | 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: Fix plugin dumpers running all the time if dump fails.Christian Kamm2010-10-141-0/+1
| | | | | Task-number: QTCREATORBUG-2733 Reviewed-by: Kai Koehne
* QmlJS: Speed up Link significantly, provide more info on imports.Christian Kamm2010-09-161-1/+1
| | | | | | | | | | | | Link now caches imports. That means importing the same library (say, Qt) from more than one file no longer creates an importing namespace for each one. Instead, a single one is created for the instance of Link. To make this work, the type environment in ScopeChain has been given its own type: Interpreter::TypeEnvironment. That has the added benefit of being able to carry meta-information about imports. You can use TypeEnvironment::importInfo(qmlComponentName) to get information about the import node that caused the import of the component.
* QmlJS: Add initial documentation for the base classes of the code model.Christian Kamm2010-09-151-0/+41
|
* QmlJS: Fix performance problem in Snapshot.Christian Kamm2010-08-311-3/+8
| | | | | | | Don't use QMultiHash::values(key), it rebuilds the values list from scratch for each lookup. Reviewed-by: Roberto Raggi
* Renamed QmlJS::Document::documentRevision().Roberto Raggi2010-07-071-6/+6
|
* QmlJS: Remove unused functions from Snapshot.Christian Kamm2010-06-211-41/+0
| | | | Reviewed-by: Erik Verbruggen