summaryrefslogtreecommitdiff
path: root/src/libs/qmljs/qmljscheck.cpp
Commit message (Collapse)AuthorAgeFilesLines
* qmljs: Fix variable nameKai Koehne2019-03-071-2/+2
| | | | | Change-Id: I8ea8d18e0471071f3a7a22760c041ecf77dbbe8c Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* Fix warningThomas Hartmann2019-01-181-1/+1
| | | | | Change-Id: I646cf0d1c1e7dec7f44baf50a586ff22044cb7f0 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* QmlDesigner: Allow more JavaScript functionsThomas Hartmann2019-01-161-13/+17
| | | | | | Task-number: QDS-355 Change-Id: I0f330216b0120857f21b804236d2e3338c812749 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* qmljs: Use C++11’s override and remove virtual where applicableAlessandro Portale2018-06-261-22/+22
| | | | | | | | Fixes warning: prefer using 'override' or (rarely) 'final' instead of 'virtual' [modernize-use-override] Change-Id: I17955fd0fdb052678228f1bda32cd8d3b4298998 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* qmljs: remove remaining references to QtQuick1Marco Benelli2018-04-031-7/+0
| | | | | | | | This patch removes all references to QtQuick1 in qml library, plugin, designer, profiler and tests. Change-Id: Ie286fad96060299caae3ef328330597cf53e90d3 Reviewed-by: Ulf Hermann <ulf.hermann@qt.io>
* QmlJS: Allow NumberAnimation for ui.qml filesThomas Hartmann2018-03-071-1/+0
| | | | | Change-Id: I12836a2d7708d50278715139f0cfba5fa221f8eb Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* qmljs: relax checks for qbs filesMarco Benelli2018-02-271-0/+4
| | | | | | | | | | | Types information for qbs is more limited that qml; this causes qtcreator to raise false positives. This patch relax the checks and provide some type information needed by qbs files generated by the wizards. Task-number: QTCREATORBUG-19757 Change-Id: I07a1dd9d8fedaf4c5c751c2f00643f15ae39127a Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
* QmlJS: Add error message for dynamic property called "data"Thomas Hartmann2017-11-061-6/+11
| | | | | | | | | The default property of most QtQuick items is data and therefore "data" should not be used as a property name. Task-number: QTCREATORBUG-19225 Change-Id: I54d1b72ce984debd4c366b7261e93b7a81b8c940 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* qmljs: better handling of attached propertiesMarco Benelli2017-09-191-6/+16
| | | | | | | | | | Attached properties used to cause false positives in the highlighter, because when using qualified ids, only the first part was checked as candidate for being at attached property. Task-number: QTCREATORBUG-18707 Change-Id: I6b1b569bc1766325decbc5d100c16a4e0dc3634f Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Merge remote-tracking branch 'origin/4.4'Eike Ziller2017-08-151-0/+3
|\ | | | | | | | | | | | | | | | | Conflicts: src/tools/clangbackend/ipcsource/clangiasyncjob.cpp src/tools/clangbackend/ipcsource/clangjobrequest.cpp src/tools/clangbackend/ipcsource/clangjobrequest.h Change-Id: Ib8602530663813ade418f995dfd2a736908cfe75
| * QmlJs: fix false positives for propertiesMarco Benelli2017-08-101-0/+3
| | | | | | | | | | | | | | | | Resolve references while looking up for object members. Task-number: QTCREATORBUG-18362 Change-Id: I9d2b2457fb3488c723a41e4e8ba1fc0ea9fe800f Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | QmlJs: Initialize membersRobert Loehning2017-08-111-1/+1
|/ | | | | Change-Id: I15a3ec660608266595a8b7a12b59016cc28331af Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* Merge remote-tracking branch 'origin/4.3' into masterOrgad Shaneh2017-05-231-1/+0
|\ | | | | | | Change-Id: I01ab8c85ea3372b6dce4142ddb9cf92d903ffca6
| * QmlJS: Allow Loaders in ui.qml filesThomas Hartmann2017-05-221-1/+0
| | | | | | | | | | | | | | | | Loader are working in the designer and we will add more support for them in the future. Change-Id: Ied62d65b0eb9933b44a7833ccafcb934d4ae6fba Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | QmlJs: use initilizer_lists for pairsTim Jenssen2017-04-271-3/+3
| | | | | | | | | | Change-Id: I0386d57ad3549814ab197c4e24549705e061c95a Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* | Merge remote-tracking branch 'origin/4.3'Eike Ziller2017-04-191-3/+2
|\ \ | |/ | | | | | | | | | | | | | | | | Conflicts: src/plugins/genericprojectmanager/genericproject.cpp src/plugins/genericprojectmanager/genericproject.h src/plugins/genericprojectmanager/genericprojectnodes.cpp src/plugins/genericprojectmanager/genericprojectnodes.h Change-Id: Ie0c870f68c8d200a75489b75860987655b2f6175
| * Use QFileInfo::exists(...) which is faster that QFileInfo(..).existsMontel Laurent2017-04-141-1/+1
| | | | | | | | | | Change-Id: I0d2e61d84c74e60ef4f54074a4ca00f2d0835562 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
| * QmlDesigner: Allow Dialog in .ui.qml filesThomas Hartmann2017-03-311-2/+1
| | | | | | | | | | | | | | | | The support is not perfect, but I see no reason to excplitly not allow it. Change-Id: I6b1d825acde156cc7b50160060e89bb964667ab8 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* | QmlJs: sync qmljs parserMarco Benelli2017-03-231-3/+2
|/ | | | | | | | | | The last version of the grammar contains some constructs that the code model needs to know. Task-number: QTCREATORBUG-17842 Change-Id: I6250f96431acc05b19f3fd1b6cc268a07485cf0f Reviewed-by: Leena Miettinen <riitta-leena.miettinen@qt.io> Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* Merge remote-tracking branch 'origin/4.2' into 4.3Orgad Shaneh2017-03-141-0/+1
|\ | | | | | | Change-Id: I4931dcc81be872d7712e67123e94d15ee696459f
| * QRegExp include cleanupSamuel Gaist2017-03-131-0/+1
| | | | | | | | | | | | | | This patch adds the missing include statements for QRegExp. Change-Id: Ibb03b929940adb84ae190b5090cb6b88653cc14c Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* | Remove spaces in initializer listsTim Jenssen2017-02-221-49/+49
| | | | | | | | | | | | | | Format initializer lists code style like. Change-Id: Ib82c235e4ba7dc75ee96a7abc0c47eff7b0a9013 Reviewed-by: hjk <hjk@qt.io>
* | QmlDesigner: Allow qsTranslate in .ui.qml filesThomas Hartmann2017-02-131-3/+6
|/ | | | | | | | Also adding the NoOp functions. They can be used in models. Task-number: QTCREATORBUG-17714 Change-Id: Ide9745613850580f0098d2fa7f8889809d18bd45 Reviewed-by: Thomas Hartmann <thomas.hartmann@qt.io>
* QmlJSCheck: Allow Math. function in ui.qml filesThomas Hartmann2016-11-171-2/+19
| | | | | | | | | 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>
* QMlJSCheck: Add missed types of State changesDmitry V. Tchoomak2016-11-091-0/+2
| | | | | Change-Id: I08ed689dfa92477e35961b7b0b1d407f0c974979 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
* QmlJSCheck: Adding more unsupported in designer typesThomas Hartmann2016-11-081-14/+23
| | | | | | | Using initializer lists looks much better. Change-Id: I314d846a9d383dbda432cd67010d79b492f40915 Reviewed-by: Tim Jenssen <tim.jenssen@qt.io>
* QmlDesigner: Allow JavaScrip blocks in Connections in .ui.qmlThomas Hartmann2016-10-281-1/+6
| | | | | | | Inside a Connections item JavaScript blocks should be allowed. Change-Id: Ia6a08fc575a72980bd53a32249bf302b7a426266 Reviewed-by: Marco Benelli <marco.benelli@qt.io>
* QmlJSCheck: Add error for ambiguous idsThomas Hartmann2016-10-261-0/+43
| | | | | | | | 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>
* QmlDesigner: A StateChangeScript can be the child of a StateThomas Hartmann2016-07-011-1/+2
| | | | | | | I found this while testing our demos. Change-Id: I575e1d2f487a2ba137ac8181f4980c30b171f726 Reviewed-by: Alessandro Portale <alessandro.portale@qt.io>
* QmlDesigner: Fix regression caused by semantic checkThomas Hartmann2016-06-281-1/+2
| | | | | | | States can of course contain PropertyChanges. Change-Id: Ie78be1db58c6820a49356b1cd70102e10211030b Reviewed-by: Christian Stenger <christian.stenger@qt.io>
* QmlJSEditor: Do not allow child items for statesThomas Hartmann2016-06-221-0/+3
| | | | | | Task-number: QTCREATORBUG-13003 Change-Id: I30bcee12803d2b3af804625ffdf417316e3d6c32 Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
* QmlJS: Don't crash if the type stack is emptyUlf Hermann2016-05-311-1/+2
| | | | | Change-Id: If4e0155e8167f3edee1890dee5fd8b19623bba17 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
* QmlDesigner: allow adding connections in ui.qml filesTim Jenssen2016-05-271-2/+5
| | | | | Change-Id: Ia4d9f01f41ca2bca1eca0df3cf121ae2800e31d4 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
* QmlJS: Fix possible crashThomas Hartmann2016-04-131-0/+4
| | | | | | | | | For a valid AST id should be never empty. A crash has been reported. though. Most likely the parser injected a UiQualifiedId for an incomplete document. Change-Id: Id2f1b25cf9d78982524d7aaff2b43210e1ae2a3b Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
* 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>
* QmlDesigner: Adding qsTrId() supportTakumi ASAKI2015-12-151-1/+1
| | | | | | Task-number: QTBUG-48850 Change-Id: I16a0612ec29b552a3d46f2563fdc2a043b9dec7e Reviewed-by: Thomas Hartmann <Thomas.Hartmann@theqtcompany.com>
* Clean headers in lib qmljs and plugins qmljstools, qmljseditor.Friedemann Kleint2015-03-051-0/+1
| | | | | Change-Id: I3256db8f4d42b6326d986d754b45e6c6c2030839 Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Update LicenseEike Ziller2015-01-161-6/+6
| | | | | Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* qmljs: do not warn for QT_TR* functionsFawzi Mohamed2014-11-061-1/+4
| | | | | | | | Change-Id: If5cf78434458ae639b4ebd0cb156110b5a291613 Task-number: QTCREATORBUG-12494 Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com> Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* QmlJS: Distinguish between erros for ui.qml files and designer warningsThomas Hartmann2014-10-151-8/+15
| | | | | | | | | | We properly distinguish between warnings in the Qt Quick Designer and error in a .ui.qml file. The warnings are a subset of the errors anyway. Change-Id: Ib3b21a845436381df10863b464c975b0b39fc063 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* QmlJS:: Allow qsTr() for .ui.qml filesThomas Hartmann2014-10-151-1/+4
| | | | | Change-Id: I8ccae13653bbb010853d99be9136bf364b823c3d Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* QmlJS: Adding checks for .ui.qml filesThomas Hartmann2014-10-151-8/+67
| | | | | Change-Id: I88eab65e1c1187ffd5a88fb5c9780d0156a17729 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* Merge "Merge remote-tracking branch 'origin/3.2'"Eike Ziller2014-10-141-7/+8
|\
| * Merge remote-tracking branch 'origin/3.2'Eike Ziller2014-10-141-7/+8
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/libs/utils/ipaddresslineedit.cpp src/libs/utils/logging.h src/plugins/analyzerbase/AnalyzerBase.pluginspec.in src/plugins/android/Android.pluginspec.in src/plugins/android/androiddeploystep.cpp src/plugins/android/androiddeploystep.h src/plugins/android/androiddeploystepfactory.cpp src/plugins/android/androiddeploystepwidget.cpp src/plugins/android/androidpackagecreationfactory.cpp src/plugins/android/androidpackagecreationstep.cpp src/plugins/android/androidpackagecreationstep.h src/plugins/android/androidpackagecreationwidget.cpp src/plugins/android/androidpackagecreationwidget.h src/plugins/android/javafilewizard.cpp src/plugins/autotoolsprojectmanager/AutotoolsProjectManager.pluginspec.in src/plugins/baremetal/BareMetal.pluginspec.in src/plugins/bazaar/Bazaar.pluginspec.in src/plugins/beautifier/Beautifier.pluginspec.in src/plugins/bineditor/BinEditor.pluginspec.in src/plugins/bookmarks/Bookmarks.pluginspec.in src/plugins/clangcodemodel/ClangCodeModel.pluginspec.in src/plugins/clangcodemodel/clanghighlightingsupport.cpp src/plugins/clangcodemodel/clangsymbolsearcher.cpp src/plugins/classview/ClassView.pluginspec.in src/plugins/clearcase/ClearCase.pluginspec.in src/plugins/cmakeprojectmanager/CMakeProjectManager.pluginspec.in src/plugins/cmakeprojectmanager/cmakeeditorfactory.cpp src/plugins/cmakeprojectmanager/cmakehighlighter.cpp src/plugins/coreplugin/Core.pluginspec.in src/plugins/cpaster/CodePaster.pluginspec.in src/plugins/cppeditor/CppEditor.pluginspec.in src/plugins/cppeditor/cppfilewizard.cpp src/plugins/cpptools/CppTools.pluginspec.in src/plugins/cpptools/cpphighlightingsupportinternal.cpp src/plugins/cpptools/cppmodelmanagerinterface.cpp src/plugins/cpptools/cppmodelmanagerinterface.h src/plugins/cvs/CVS.pluginspec.in src/plugins/debugger/Debugger.pluginspec.in src/plugins/designer/Designer.pluginspec.in src/plugins/diffeditor/DiffEditor.pluginspec.in src/plugins/emacskeys/EmacsKeys.pluginspec.in src/plugins/fakevim/FakeVim.pluginspec.in src/plugins/genericprojectmanager/GenericProjectManager.pluginspec.in src/plugins/git/Git.pluginspec.in src/plugins/git/gitorious/gitorious.cpp src/plugins/git/gitorious/gitorious.h src/plugins/git/gitorious/gitoriousclonewizard.cpp src/plugins/git/gitorious/gitorioushostwidget.cpp src/plugins/git/gitorious/gitorioushostwidget.h src/plugins/git/gitorious/gitorioushostwizardpage.cpp src/plugins/git/gitorious/gitoriousprojectwidget.cpp src/plugins/git/gitorious/gitoriousprojectwidget.h src/plugins/git/gitorious/gitoriousprojectwizardpage.cpp src/plugins/git/gitorious/gitoriousprojectwizardpage.h src/plugins/git/gitorious/gitoriousrepositorywizardpage.cpp src/plugins/git/gitorious/gitoriousrepositorywizardpage.h src/plugins/glsleditor/GLSLEditor.pluginspec.in src/plugins/glsleditor/glsleditorfactory.cpp src/plugins/glsleditor/glslfilewizard.cpp src/plugins/helloworld/HelloWorld.pluginspec.in src/plugins/help/Help.pluginspec.in src/plugins/imageviewer/ImageViewer.pluginspec.in src/plugins/ios/Ios.pluginspec.in src/plugins/macros/Macros.pluginspec.in src/plugins/mercurial/Mercurial.pluginspec.in src/plugins/perforce/Perforce.pluginspec.in src/plugins/projectexplorer/ProjectExplorer.pluginspec.in src/plugins/pythoneditor/PythonEditor.pluginspec.in src/plugins/pythoneditor/pythoneditorwidget.cpp src/plugins/pythoneditor/wizard/pythonfilewizard.cpp src/plugins/qbsprojectmanager/QbsProjectManager.pluginspec.in src/plugins/qbsprojectmanager/defaultpropertyprovider.cpp src/plugins/qmakeprojectmanager/QmakeProjectManager.pluginspec.in src/plugins/qmakeprojectmanager/profileeditorfactory.cpp src/plugins/qmldesigner/QmlDesigner.pluginspec.in src/plugins/qmljseditor/QmlJSEditor.pluginspec.in src/plugins/qmljseditor/qmljseditorfactory.cpp src/plugins/qmljstools/QmlJSTools.pluginspec.in src/plugins/qmlprofiler/QmlProfiler.pluginspec.in src/plugins/qmlprojectmanager/QmlProjectManager.pluginspec.in src/plugins/qnx/Qnx.pluginspec.in src/plugins/qtsupport/QtSupport.pluginspec.in src/plugins/remotelinux/RemoteLinux.pluginspec.in src/plugins/resourceeditor/ResourceEditor.pluginspec.in src/plugins/resourceeditor/resourcewizard.h src/plugins/subversion/Subversion.pluginspec.in src/plugins/tasklist/TaskList.pluginspec.in src/plugins/texteditor/TextEditor.pluginspec.in src/plugins/texteditor/basetexteditor_p.h src/plugins/texteditor/basetextmark.cpp src/plugins/texteditor/codeassist/basicproposalitemlistmodel.h src/plugins/texteditor/codeassist/defaultassistinterface.h src/plugins/texteditor/codeassist/iassistproposalitem.cpp src/plugins/texteditor/itexteditor.cpp src/plugins/texteditor/itexteditor.h src/plugins/texteditor/itextmark.cpp src/plugins/texteditor/plaintexteditor.cpp src/plugins/texteditor/plaintexteditor.h src/plugins/texteditor/texteditoractionhandler.cpp src/plugins/todo/Todo.pluginspec.in src/plugins/updateinfo/UpdateInfo.pluginspec.in src/plugins/valgrind/Valgrind.pluginspec.in src/plugins/vcsbase/VcsBase.pluginspec.in src/plugins/welcome/Welcome.pluginspec.in src/plugins/winrt/WinRt.pluginspec.in tests/auto/debugger/temporarydir.h Change-Id: I254af8be8119fe9855287909e17d4b8ca9d2fc2f
| | * License updateEike Ziller2014-10-091-7/+8
| | | | | | | | | | | | | | | Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082 Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
* | | QmlJSEditor: warn when editing .ui.qml, activate designer checksThomas Hartmann2014-10-141-6/+38
|/ / | | | | | | | | | | Change-Id: I2f6d39633341bd1197d16c5c097573d4ab090896 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* | Add ui.qml support to code mode and editorFawzi Mohamed2014-10-141-5/+13
|/ | | | | Change-Id: I6d818ddad1e7467578c63161c278455ef6ac743e Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* QmlJS: Add error message for invalid root item in the designerThomas Hartmann2014-09-101-0/+22
| | | | | | | | | Documents with those types do crash the qmlpuppet and confuse the users. With this patch we give a clear error message and such files are not supported anymore. Change-Id: Iba19def2751d4dc81d90684c0c63c0274fdf49cf Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* QmlJS: Don't use QDir::separator() for internal pathsKai Koehne2014-09-031-1/+1
| | | | | | | We use forward slashes in all internal paths, even on Windows. Change-Id: Ie0b418c770dad96829dd357fe425616b6d3a5b82 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* qmljs: switch to the new category loggingFawzi Mohamed2014-07-011-1/+0
| | | | | Change-Id: Id4e43779590939e9d6dd2d0dab536f70e721f097 Reviewed-by: Kai Koehne <kai.koehne@digia.com>