summaryrefslogtreecommitdiff
path: root/src/plugins/qmljstools/qmljsmodelmanager.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Rename QString ITextEditorDocument::contents --> plainTextEike Ziller2013-12-101-1/+1
| | | | | | | To differentiate it from the byte array based IDocument::setContents Change-Id: Icc9600732c2742fb79254a0697870bacce3a59ee Reviewed-by: David Schulz <david.schulz@digia.com>
* qmljs: delay import scan until at least one qml file is parsedFawzi Mohamed2013-11-261-0/+17
| | | | | | Task-number: QTCREATORBUG-10899 Change-Id: I5dca739a89434c7b5813c7a79a76ab7c22e3d71d Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* qmljs: avoid double parsing of importsFawzi Mohamed2013-11-261-8/+22
| | | | | Change-Id: Ib45a63e3175924158dc2cff60a7b1964f491c375 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* QmlJS: Fixing warningsThomas Hartmann2013-11-261-1/+1
| | | | | | | | | | Correcting ImportKey::compare(). The compare function was not stable and QMap did not work properly. Done with: Fawzi Change-Id: I11790215cba6944bf9f04be0c3844b35ea54ea70 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* QmlJsTools: Fix compilation with Qt4Nikolai Kosjar2013-11-201-1/+1
| | | | | Change-Id: I76e067ec8223c42b480ad9d296cd3b7357831aab Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* qmljs: scan importsFawzi Mohamed2013-11-201-27/+164
| | | | | Change-Id: Ied59f5d56c5816d9da57f23a619d604acec76000 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* qmljs: new import/dep trackingFawzi Mohamed2013-11-201-0/+28
| | | | | Change-Id: I9f4de2a06aad3afb80372a4b80e56db658683575 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* Braces cleanupOrgad Shaneh2013-11-141-4/+2
| | | | | Change-Id: I8413252c90a1487d291f15d92837c30ab697b245 Reviewed-by: hjk <hjk121@nokiamail.com>
* qml: solve race condition when deleting while indexingFawzi Mohamed2013-11-121-0/+2
| | | | | | | | Task-number: QTCREATORBUG-10734 Change-Id: I521ac0881ff83a44846b133de5c292af8cda9d4e Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com> Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* qmljs: added qmljsconstants.hFawzi Mohamed2013-10-231-16/+16
| | | | | | | | | | | | | | 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>
* MessageManager: General cleanup.hjk2013-09-051-3/+2
| | | | | | | Apply 'static' pattern, rename 'printToOutputPane' to 'write' Change-Id: I6f31f1a8c914661e2a2182c0b6256b41ead28de7 Reviewed-by: David Schulz <david.schulz@digia.com>
* SessionManager: Apply 'static' patternhjk2013-09-051-4/+2
| | | | | Change-Id: I370f72fcf7a24216ee189979ce6b5c8bfc5f4140 Reviewed-by: David Schulz <david.schulz@digia.com>
* ProjectManager: Use Core::Id for progress typeshjk2013-09-041-2/+1
| | | | | Change-Id: I72993fda50ad70ad2d7c2f449923ac6e34b9e737 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* Apply 'static' pattern to MimeDatabasehjk2013-09-031-17/+10
| | | | | | | | Also adjust and streamline using and surrounding code. Change-Id: I6a8b05126bdcbb74ff611b21c7cb3c5902a2d5ca Reviewed-by: Tobias Hunger <tobias.hunger@digia.com> Reviewed-by: Orgad Shaneh <orgads@gmail.com>
* Core: Static pattern for ProgressManager, clean up all usershjk2013-09-021-33/+34
| | | | | Change-Id: I4af8793ca69a3af9e99baeb7c31dad3864266f91 Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
* KitManager: Use static API as other singletons doTobias Hunger2013-08-211-2/+2
| | | | | Change-Id: Ia49c6552a5aae72870687ef9c64f2642fbe24155 Reviewed-by: hjk <hjk121@nokiamail.com>
* Merge remote-tracking branch 'origin/2.8'Oswald Buddenhagen2013-08-211-1/+1
|\ | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/cpptools/cppcompletion_test.cpp src/plugins/cpptools/cpptoolsplugin.h src/plugins/projectexplorer/customtoolchain.cpp src/plugins/vcsbase/command.cpp Change-Id: Ie7b3c9e136c0748b41320227c757471259339b48
| * qmljs: avoid ecessive updating when cxx types might have changedFawzi Mohamed2013-07-301-1/+1
| | | | | | | | | | | | | | | | perform an update of the qml code model only if a cpp file exporting qml types has not changed for at least 15 seconds. Change-Id: I674eed8dd5a68f2d74a8794fd8a237c2d99a3185 Reviewed-by: Nikolai Kosjar <nikolai.kosjar@digia.com>
* | Update the Qml working copy from the documents, not editors.Eike Ziller2013-07-171-12/+9
| | | | | | | | | | | | | | Unfortunately the language is still checked by using an editor property. Change-Id: I3b54624e60b65c48b154c405f66d04b74be5be3e Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Rename IDocument::fileName --> filePathEike Ziller2013-07-091-1/+1
|/ | | | | | | That is what it actually is, wrt how Qt API calls it. Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* QmlJSTools: Fix language detection bug.Christian Kandeler2013-07-021-1/+1
| | | | | | | | | | Due to what looks like a copy/paste error, qbs files were detected as actual QML, resulting in a torrent of parser warnings for projects containing qbs files. Change-Id: I8f4886621641d42bb0b2aa066a0bbdc44b9d8221 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* qmljs: coalesce resets of code model triggered by cpp files updateFawzi Mohamed2013-07-021-1/+11
| | | | | | | | | Use a timer to avoid resetting the model too often. Change-Id: Iadf3ff3f03cfc91df44168243972b1e5a0ee5077 Reviewed-by: Daniel Teske <daniel.teske@digia.com> Reviewed-by: Eike Ziller <eike.ziller@digia.com> Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* qmljs: adding qrc supportFawzi Mohamed2013-06-031-1/+141
| | | | | | | | | | | | | | | | | | | | | 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>
* qmljstools: reset code model after update of exported cpp typesFawzi Mohamed2013-05-291-2/+8
| | | | | | Task-number: QTCREATORBUG-9105 Change-Id: Id0021902985da8e5e7faec23766bb37541d041c0 Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
* Merge remote-tracking branch 'origin/2.7'Eike Ziller2013-04-301-0/+2
|\ | | | | | | | | | | | | Conflicts: src/plugins/qmldesigner/components/formeditor/abstractcustomtool.cpp Change-Id: I4e0a85795e7f4bfcdc21d106517517b527f85104
| * qmljs: add explicit -relocatable flag to qmlplugindumper and use itFawzi Mohamed2013-04-251-0/+2
| | | | | | | | | | | | | | This will allow changing the default to nonrelocatable. Change-Id: I80746a3e70f94040a407cc25cec9ad6fac8b6fec Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Merge remote-tracking branch 'origin/2.7'Eike Ziller2013-04-181-1/+1
|\ \ | |/ | | | | | | | | | | Conflicts: src/plugins/pythoneditor/tools/lexical/pythonformattoken.h Change-Id: I7b921cd975aa755166a80d219ed5e8b69888aeb0
| * qmljs: update qt-creator builtins.qmltypes, and use them for qt<-4.8.5Fawzi Mohamed2013-04-161-1/+1
| | | | | | | | | | | | | | | | | | qmlplugindump of qt <= 4.8.5 does not output exportMetaObjectRevisions so do not use its output for the builtins. Task-number: QTCREATORBUG-9076 Change-Id: I82bdd325ef15f800c70c830ead4867787f6b7b0a Reviewed-by: Kai Koehne <kai.koehne@digia.com>
* | Mime: Use string comparisons instead of regexps for simple globbinghjk2013-04-171-5/+9
| | | | | | | | | | Change-Id: Ia894f3663f43088cdb2d8cb685bcebecaded8146 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* | CppTools: Rename files to comply with coding standardTobias Hunger2013-04-101-1/+1
| | | | | | | | | | | | | | | | Rename ModelManagerInterface.(h|cpp) to cppmodelmanagerinterface.(h|cpp). Rename TypeHierarchyBuilder.(h|cpp) to typehierarchybuilder.(h|cpp). Change-Id: I035d833fd205d7460819bd0fb7031294359032f9 Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | CppTools: Use namespace CppTools consistentlyTobias Hunger2013-04-081-4/+4
| | | | | | | | | | | | | | | | | | There were quite a few classes using CPlusPlus namespace in the CppTools plugin. Rename them and do some other small namespace related coding style fixups. Change-Id: I093fc1f3fc394fd9923e3f18d5f66522e288f21d Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
* | Clean headers in QmlJsTools.Friedemann Kleint2013-04-031-15/+0
| | | | | | | | | | | | | | | | Ran script to remove inludes on a trial-and-error basis and manually corrected it. Change-Id: I22fb33b8589dcd2f4b880eb320d7fa86de8a6f67 Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
* | QmlJsTools: Adjust to MessageManager api changeDaniel Teske2013-03-251-2/+2
|/ | | | | Change-Id: I68e662ea30b9c219e3a21e4f48a83c1ad24e2c58 Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
* qmljs: add infrastructure handling qml dialects betterFawzi Mohamed2013-02-211-0/+163
| | | | | | | | | | | | | | | | | | 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-4/+18
| | | | | | | | | | | | | | | | | | | | | | 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-4/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | #!/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>
* | QmlJSTools: Compile with QT_NO_CAST_FROM_ASCIIOrgad Shaneh2012-11-221-12/+12
| | | | | | | | | | Change-Id: I370075ce75682ea11790a8f91339a01fb3c247f9 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
* | Merge remote-tracking branch 'origin/2.6'Eike Ziller2012-10-051-21/+20
|\ \ | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.cpp share/qtcreator/qml/qmlpuppet/commands/endpuppetcommand.h src/plugins/debugger/qtmessageloghandler.cpp src/plugins/debugger/qtmessageloghandler.h src/plugins/debugger/qtmessagelogwindow.cpp src/plugins/madde/maemodeployconfigurationwidget.cpp src/plugins/madde/maemodeployconfigurationwidget.h src/plugins/remotelinux/deployablefilesperprofile.cpp src/plugins/remotelinux/deployablefilesperprofile.h src/plugins/remotelinux/deploymentinfo.cpp src/plugins/remotelinux/deploymentinfo.h src/plugins/remotelinux/deploymentsettingsassistant.cpp src/plugins/remotelinux/profilesupdatedialog.cpp src/plugins/remotelinux/remotelinuxdeploymentdatamodel.h tests/auto/icheckbuild/ichecklib.cpp tests/auto/icheckbuild/ichecklib_global.h tests/auto/icheckbuild/parsemanager.cpp tests/auto/icheckbuild/parsemanager.h tests/manual/ssh/tunnel/tunnel.h Change-Id: I04d7761df6bd936ad00e0547974284c967d39580
| * Adjust license headershjk2012-10-051-21/+20
| | | | | | | | | | Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825 Reviewed-by: Eike Ziller <eike.ziller@digia.com>
* | HostOsInfo: Add some more useful abstractions.Christian Kandeler2012-09-051-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | Namely: - path list separator - executable suffix - file name case sensitivity All of these are duplicated in various places in the current Creator code. Change-Id: I86eb4662fa3c2071759bd728cae1aaf7111ae686 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
* | Utils: Introduce HostOsInfo class.Christian Kandeler2012-08-271-8/+5
|/ | | | | | | | | | | | | The class' member functions are intended to be used instead of the Q_OS_* macros in all contexts where the latter are not syntactically required. This lowers the likelihood of changes made on one platform breaking the build on another, e.g. due to the code model missing symbols in #ifdef'ed out code when refactoring. Change-Id: I4a54788591b4c8f8d589b8368a6c683d4155c9fa Reviewed-by: hjk <qthjk@ovi.com>
* QmlJS: Update to latest QmlJS parser from Qt 5.Christian Kamm2012-07-311-2/+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>
* QmlJSInspector: Remove dependency to QmlJSEditorKai Koehne2012-04-161-0/+2
| | | | | Change-Id: I6f90bff623437b25887bdd288987c013a45029be Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
* Move the ModelManagerInterface out of the CPlusPlus library.Erik Verbruggen2012-03-141-1/+1
| | | | | Change-Id: Iffaa18f848a22f6961b49dff048672b194570df6 Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
* Rename IFile->IDocument and FileManager->DocumentManagerEike Ziller2012-02-201-1/+1
| | | | | | | | And adapt the other API respectively. Change-Id: I1e04e555409be09242db6890f9e013396f83aeed Reviewed-by: Bill King <bill.king@nokia.com> Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* Removed module names from #include directives.Erik Verbruggen2012-02-151-9/+9
| | | | | | | | Getting the #include directives ready for Qt5. This includes the new-project wizards. Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* Move QtConcurrent library into Utils.Friedemann Kleint2012-02-091-1/+1
| | | | | | | | It causes a conflict with the new QtConcurrent library of Qt 5 and is quite small. Change-Id: Ib97ab6daf8f67a88300cf03f044ba3593a4cd270 Reviewed-by: Eike Ziller <eike.ziller@nokia.com>