Commit Graph

90 Commits

Author SHA1 Message Date
Ulf Hermann
424005c911 QmlJS: Release the same documents we keep before
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>
2016-10-28 11:39:18 +00:00
Orgad Shaneh
670e54345c Remove use of deprecated Qt algorithms
Change-Id: Ib35cffa2d5762874feea9b1d4df7f569c0e5f496
Reviewed-by: Eike Ziller <eike.ziller@qt.io>
2016-08-09 13:41:25 +00:00
Erik Verbruggen
b47b9ea951 QML: Band-aid fix to prevent a crash
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>
2016-07-25 06:22:18 +00:00
Ulf Hermann
1e7bf7f721 QmlJS: Reparse cpp types when component headers change
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>
2016-07-15 16:22:42 +00:00
Orgad Shaneh
7609e56ee3 QmlJS[|Editor|Tools]: Use Qt5-style connects
The heavy lifting was done by clazy.

Change-Id: I56550546b341d486d321329e9a90b9369d56af40
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2016-06-28 08:47:26 +00:00
Tim Jenssen
a6d21cc1f7 Qmljs: small QHash improvements
Change-Id: I79a5504c8471b66540aac8047fbcf760ceb6b10f
Reviewed-by: Marco Benelli <marco.benelli@qt.io>
2016-06-20 14:08:43 +00:00
Ulf Hermann
35bafd3952 QmlJS: Fix resolution of "alias" directives in qrc files
Previously qrc paths of QML/JS documents were not considered for
implicit imports. Only the path of the document in the file system
was considered. The QML engine, however, doesn't know the original
path at all and only uses the qrc paths for import resolution. This
created a mismatch between what the QML engine could recognize and
what the code model suggested.

Without alias directives, any files imported from a qrc file would
have to reside in the same directory as the one implicitly importing
them, so this arrangement happened to work, most of the time.

In order to support aliases we have to search the files in the same
qrc path to figure out the imports. To do that, we keep a reverse
map of qrc paths to files in the QrcParser and iterate that when
resolving imports.

Change-Id: I84baae6cbfbe96ddd5322c81494c1e4a3f473f3f
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-03-29 11:20:57 +00:00
Eike Ziller
72af6b7834 runAsync: Remove ResultType template parameter.
It is now deduced from either the type of the
QFutureInterface<ResultType> function argument, or the return type.

Change-Id: Iddab3cc329206c649a6e55a44b2de2d406701dee
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-02-10 10:58:55 +00:00
Eike Ziller
9074a8c310 QmlJS: Change yet another call of QtConcurrent::run
Change-Id: I417c4dbdf8216e8372578775efe97a0510756520
Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-02-01 08:21:22 +00:00
Orgad Shaneh
a6e6c88ed8 Revert "QmlJS: Exchange unsafe meta calls with QTimer::singleShot"
QTimer::singleShot with a member function pointer or a lambda does
not schedule the invocation directly on the receivers event loop,
even if the timeout is 0. It actually creates a timer in the thread
where QTimer::singleShot is called, which requires an event dispatcher
to be available. Only the timer's timeout() signal then schedules the
invocation on the receivers thread.

We do not want to actually run an event loop here until a timer fires.
Even if a timer with timeout 0 might directly schedule the timeout
event on the event dispatcher without involving actual timers, and
even if that event dispatcher makes sure all events are handled before
deleting itself, it would feel like relying on an implementation
detail.

This reverts commit a2e19ba1be.

Task-number: QTCREATORBUG-15681
Change-Id: I19846ce089d72c971d3cc5927c2ddf563e06de14
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-01-28 11:50:18 +00:00
Eike Ziller
acdfb09687 QmlJS: Use Utils::runAsync and add some more progress information
runAsync avoids the globally shared thread pool.
updateCppQmlTypes missed some kind of progress information.

Change-Id: I8739761326c2f2a5364c0c1552b3c43b00f1ff28
Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-01-27 12:27:59 +00:00
Eike Ziller
a2e19ba1be QmlJS: Exchange unsafe meta calls with QTimer::singleShot
Change-Id: I5596c3f506f1fb873536c03ed5b8f5df88f5ea06
Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-01-27 08:24:14 +00:00
Eike Ziller
265fa13bdb QmlJSModelManager: Use Utils::runAsync instead of QtConcurrent::run
To get rid of the shared thread pool (and to use the API with the less
ugly implementation).

Change-Id: Ia93977b8b394aff8e410d6d81446c23e32b7aed5
Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-01-22 13:34:57 +00:00
Eike Ziller
a30c1adc96 QmlJSModelManager: Cleanup uses of QFuture
- Use simple list instead of QFutureSynchronizer (no feature of that was
  used)
- Avoid duplicate code cleaning up the current list of running futures
- Clean list of running futures after waiting for them all to finish

Change-Id: Ia13ee25ab7835fc4f4970d23d20b16cfe6bf6dfb
Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2016-01-22 13:28:55 +00:00
Tobias Hunger
f72370f20a Update License according to agreement with Free Qt Foundation
* Update remaining files in src

Change-Id: I1896f17fcf34f71c3310c87899fb5171b8e4afb1
Reviewed-by: Tobias Hunger <tobias.hunger@theqtcompany.com>
2016-01-19 15:59:41 +00:00
Denis Kormalev
2105115fdf QmlJS: allProjectsInfosForPath method
Method that returns list of all project infos where this file belongs (similar to methods in cpp module).

Change-Id: I94eb86ffa5bdbee8d794377a03160418b7340662
Reviewed-by: Marco Benelli <marco.benelli@theqtcompany.com>
Reviewed-by: Kai Koehne <kai.koehne@theqtcompany.com>
2015-05-19 08:00:50 +00:00
Friedemann Kleint
1b9be30371 Clean headers in lib qmljs and plugins qmljstools, qmljseditor.
Change-Id: I3256db8f4d42b6326d986d754b45e6c6c2030839
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
2015-03-05 08:17:10 +00:00
Eike Ziller
56aadc407d Merge remote-tracking branch 'origin/3.3'
Conflicts:
	src/plugins/debugger/watchhandler.cpp
	src/plugins/projectexplorer/kitmodel.cpp
	src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
	src/shared/qbs

Change-Id: I6a68090993a264e93ac7850858cc24ba6bdb5602
2015-02-12 17:36:29 +01:00
Eike Ziller
9926fc2ab1 Merge commit '3c85058694ee2e41658d17f524fb48f0b187d2fe'
Conflicts:
	src/libs/utils/tooltip/tipcontents.cpp
	src/libs/utils/tooltip/tipcontents.h
	src/plugins/android/androiddeployqtstep.cpp
	src/plugins/baremetal/baremetalconstants.h
	src/plugins/baremetal/baremetaldevice.cpp
	src/plugins/baremetal/baremetaldevice.h
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwidget.h
	src/plugins/baremetal/baremetaldeviceconfigurationwizard.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.cpp
	src/plugins/baremetal/baremetaldeviceconfigurationwizardpages.h
	src/plugins/baremetal/baremetalplugin.cpp
	src/plugins/baremetal/baremetalplugin.h
	src/plugins/baremetal/baremetalruncontrolfactory.cpp
	src/plugins/baremetal/baremetalruncontrolfactory.h
	src/plugins/cppeditor/cppcodemodelinspectordialog.cpp
	src/plugins/cppeditor/cppdoxygen_test.cpp
	src/plugins/cppeditor/cppdoxygen_test.h
	src/plugins/debugger/breakpointmarker.cpp
	src/plugins/debugger/debuggeritemmodel.cpp
	src/plugins/debugger/debuggeritemmodel.h
	src/plugins/debugger/loadcoredialog.cpp
	src/plugins/genericprojectmanager/cppmodelmanagerhelper.cpp
	src/plugins/projectexplorer/addnewmodel.cpp
	src/plugins/projectexplorer/addnewmodel.h
	src/plugins/projectexplorer/jsonwizard/jsonfieldpage.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.cpp
	src/plugins/qmlprofiler/abstracttimelinemodel.h
	src/plugins/qmlprofiler/notesmodel.cpp
	src/plugins/qmlprofiler/qml/CategoryLabel.qml
	src/plugins/qmlprofiler/qml/MainView.qml
	src/plugins/qmlprofiler/qml/Overview.js
	src/plugins/qmlprofiler/qml/Overview.qml
	src/plugins/qmlprofiler/qml/TimeDisplay.qml
	src/plugins/qmlprofiler/qml/TimeMarks.qml
	src/plugins/qmlprofiler/qmlprofilertimelinemodelproxy.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.cpp
	src/plugins/qmlprofiler/sortedtimelinemodel.h
	src/plugins/qmlprofiler/timelinemodelaggregator.cpp
	src/plugins/qmlprofiler/timelinemodelaggregator.h
	src/plugins/qmlprofiler/timelinerenderer.cpp
	src/plugins/qmlprofiler/timelinerenderer.h
	src/plugins/qmlprojectmanager/QmlProjectManager.json.in
	src/plugins/texteditor/findinfiles.cpp
	src/plugins/vcsbase/vcsconfigurationpage.cpp
	src/shared/qbs
	src/shared/scriptwrapper/interface_wrap_helpers.h
	src/shared/scriptwrapper/wrap_helpers.h
	tests/auto/qmlprofiler/abstracttimelinemodel/tst_abstracttimelinemodel.cpp
	tests/system/suite_debugger/tst_debug_empty_main/test.py
	tests/system/suite_debugger/tst_qml_js_console/test.py
	tests/system/suite_debugger/tst_qml_locals/test.py

Change-Id: I67540b648f8b162496f4aa606b04d50c7c9125c6
2015-02-12 17:29:21 +01:00
Fawzi Mohamed
73a9bea51d qmljs: do not rely on future.isCanceled to be sticky
Change-Id: I92f32b9cbea1ddb1660895264f853068c31af4cd
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2015-01-22 11:37:26 +01:00
Eike Ziller
3c85058694 Update License
Change-Id: I711d5fb475ef814a1dc9d2822740e827f3f67125
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2015-01-16 12:37:56 +01:00
Eike Ziller
541d00453a Merge remote-tracking branch 'origin/3.3'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/projectexplorer/projectexplorer.cpp
	src/shared/qbs

Change-Id: I6d91042bb48314d00be721099aed19feca74e0ce
2014-12-10 13:20:02 +01:00
Fawzi Mohamed
b02904597b qmljs: lookup libraries in the correct place
This lead some libraries to be “lost”, typically QtQuick

Change-Id: I44e8fd12f53ce1371a2d4bd094fe5b67cad30676
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
2014-12-04 13:36:28 +01:00
Fawzi Mohamed
cfe29cc936 qmljs: fix projectInfoForPath and fileToPath mapping
m_fileToPath was not always updated correctly which lead
projectInfoForPath to return a wrong/invalid project info,
messing up the paths used by the code model.

Change-Id: If5e144f1ef2c7353b9077deb1b9c9aa9d1708651
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
2014-12-03 11:53:50 +01:00
Eike Ziller
938326ef2c Merge remote-tracking branch 'origin/3.3' 2014-11-26 11:11:46 +01:00
Fawzi Mohamed
addb1c171a qmljs: phase out qtImportPaths
builtins were always using qtimportPath, which is now being removed,
so prefer qtQmlPath.

Change-Id: I99d9214c2188507859f27b729c027aaf77eb579e
Reviewed-by: Tim Jenssen <tim.jenssen@theqtcompany.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
2014-11-25 14:30:17 +01:00
Fawzi Mohamed
9c3f5dd3a4 qmljs: avoid storing qmltypes and qmlproject
qmltypes files were stored in the snapshot during scan, this is wrong
and bloats the memory usage.

Task-number: QTCREATORBUG-13369
Change-Id: Ie8c3970ad7a8d732230f3dc73a9ba65ab62ea4e9
Reviewed-by: Eike Ziller <eike.ziller@theqtcompany.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
2014-11-25 11:05:47 +01:00
Eike Ziller
a47fbb8309 Merge remote-tracking branch 'origin/3.3'
Conflicts:
	src/plugins/coreplugin/coreplugin.cpp
	src/plugins/coreplugin/themesettingswidget.cpp
	src/plugins/qbsprojectmanager/qbsprojectmanager.cpp
	src/plugins/qbsprojectmanager/qbsprojectmanager.h
	src/plugins/qmlprofiler/qml/Overview.js
	src/shared/qbs

Change-Id: Ibe92c166fc5bfbcb4d6964e50ca7298d8459d60e
2014-11-24 15:43:48 +01:00
Christian Stenger
8f546fee37 QmlJS: Allow scan of files
Change-Id: I25fd0d76cf69fa144112de96cc677d6f316da736
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
2014-11-19 10:52:37 +01:00
Fawzi Mohamed
7e1b512f31 qmljs: add isIdle method to detect background parsing/scannig
If the qmljsmodel has no background task, then isIdle returns true

Change-Id: I31420343c560c5ed118f371f7be347eadb6622f4
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-11-18 10:04:54 +01:00
Eike Ziller
ea27143239 Merge remote-tracking branch 'origin/3.2'
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
2014-10-14 15:36:16 +02:00
Fawzi Mohamed
419d4e4411 Add ui.qml support to code mode and editor
Change-Id: I6d818ddad1e7467578c63161c278455ef6ac743e
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-10-14 14:46:32 +02:00
Eike Ziller
8295b503be License update
Change-Id: I3c22ef2685d7aa589f5d0ab74d693653a4c32082
Reviewed-by: Alessandro Portale <alessandro.portale@digia.com>
2014-10-09 11:41:44 +02:00
Eike Ziller
914adeab82 Merge remote-tracking branch 'origin/3.2'
Conflicts:
	src/plugins/qmldesigner/designercore/model/plaintexteditmodifier.cpp
	src/plugins/qmldesigner/designercore/model/texttomodelmerger.cpp

Change-Id: I1627f6aa98a442413f8b08b579ecaf9647dc887b
2014-09-16 15:17:21 +02:00
Daniel Teske
109228fa62 QmlJsCodeModel: Respect QT_NO_CODE_INDEXER environment variable
setting QT_NO_CODE_INDEXER = 1 disables the qmljs code model,
as consequence the qml designer will not work with this setting.

Change-Id: I71a2989b14e55e4d130463edd4a6459dee3cbd3d
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-09-10 12:18:34 +02:00
Christian Kandeler
847f10e9cc Remove Qt version checks.
Qt 5.3 is the minimum requirement these days. Remove all fallback code
from sources and project files.

Change-Id: If6188a471197acadda4d6baee71804ba1a8026c6
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-09-08 10:33:25 +02:00
Fawzi Mohamed
0a611e7ce1 qmljs: always add environment paths to the qml vContexts
Change-Id: Ib2c0650aa4dcf1b5365c8521e5145003faf216ac
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2014-09-08 09:47:42 +02:00
Eike Ziller
49db3a450a Merge remote-tracking branch 'origin/3.2'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/coreplugin/editormanager/editormanager.cpp
	src/plugins/cppeditor/cppeditor.cpp
	src/plugins/remotelinux/remotelinuxdebugsupport.cpp
	src/plugins/texteditor/basetexteditor.cpp

Change-Id: I0da7c1cf2506b12d0563795aa8177fc45e97050f
2014-09-03 16:08:02 +02:00
Kai Koehne
9e62375b71 QmlJS: Use canonical paths for matching of import directories
We rely on string comparison for detection of QML import paths. Therefore
make sure that all paths are canonical.

Change-Id: I416bc31915644a888c416d726049668b0e71f29a
Task-number: QTCREATORBUG-12902
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2014-09-03 09:41:48 +02:00
Oswald Buddenhagen
f3a61e8bf7 Merge remote-tracking branch 'origin/3.2'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/android/androidglobal.h

Change-Id: I3367bf2ea47c088989175dddeed2210294346f4c
2014-08-05 14:24:23 +02:00
Fawzi Mohamed
02bdf30f45 qmljs: improve handling of qml dialects
Language::Enum -> QmlDialect
 * class instead of enum
 * moved Language specific operations to it (from Document)
 * nicer handling
QStringList -> PathsAndLanguages
 * store language along with path, to perform a correct scan and improve
   path handling

Change-Id: If69d35c63cfeb48aa670b51870916cd0c40f1916
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-07-30 15:07:35 +02:00
Fawzi Mohamed
281161c242 qmljs: improve multithreading safety
ensure that the QSet copy operation of the scannedPaths in importScan
is atomic.

Change-Id: Ifb3566a86d1d6ac6abf29f1b4cbe19868947d0cc
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-07-30 13:24:43 +02:00
Fawzi Mohamed
6763352340 qmljs: move defaultProjectInfoForProject to the qmljs library
This removes qmakeprojectmanager and qmlprojectmanager dependency on
qmljstools.
Qmlprojectmanager still imports qmltoolsconstants.h for a constant
but that gives no runtime dependency.

Change-Id: Ifd2e76500a3b27a21937603925f03a70049900e1
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-07-24 16:54:42 +02:00
Alessandro Portale
35d6394523 "foreach (QString" -> "foreach (const QString &"
Change-Id: Idb866407347722766edbc85ce20799b088ce36dd
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
2014-07-24 12:15:49 +02:00
Fawzi Mohamed
06dc8140ff qmljs: disable console warnings for failed dumping
Change-Id: I7905dedb15ae7d84bf55013abdd822dd40984588
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2014-07-23 11:00:11 +02:00
Fawzi Mohamed
d83aa93780 qmljs: fix import search paths collecting
Change-Id: I0b977d3186d8a0ab8f48e1d689e0ab9d045b46e3
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
2014-07-22 14:50:56 +02:00
Fawzi Mohamed
cd92b70f65 qmljs: avoid reset if C++ types did not really change
Change-Id: I00b59a6b140eb33e2f3206f11e6ab0f9b470dff0
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2014-07-15 17:05:27 +02:00
Fawzi Mohamed
52cb3d5a7a qmljs: improve handling of default values for AnyLanguage
Change-Id: I97ae24c386a6316b32b8213ab5fc5cb5c6800c65
Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2014-07-07 09:29:51 +02:00
Fawzi Mohamed
c44cffa49d qmljs: eagerly import library typeinfo
Change-Id: I599b84e9938d021343cca1cdb7d54d53155eaf91
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2014-07-04 14:00:20 +02:00
Fawzi Mohamed
4dc438db5e qmljs: switch to the new category logging
Change-Id: Id4e43779590939e9d6dd2d0dab536f70e721f097
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-07-01 11:31:12 +02:00