Commit Graph

789 Commits

Author SHA1 Message Date
Kai Koehne
d7ede938e1 Fix wrong header file name in QMLJS
Fix a qmake warning introduced in e1b44e870f .

Change-Id: I8f7913ceabc411044785634d1708fbc035b0a5c4
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-11-21 16:15:32 +01:00
Fawzi Mohamed
ca57a394f4 qmljs: fix import cache
correct update of m_importCache

Change-Id: I70a2c6777c8f0e8df7b130fcff96cd67f83ca3e4
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-11-21 14:56:52 +01:00
Friedemann Kleint
21dd4c8b1b QmlJS: Simplify code, fix MSVC-warning.
qmljsviewercontext.cpp:80: warning: C4715:
'QmlJS::ViewerContext::languageIsCompatible':
: not all control paths return a value.

Change-Id: I22279ef7a43873b9c8f3d73d3826b59d5abaa390
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-11-20 17:10:40 +01:00
Nikolai Kosjar
cae38634e1 QmlJS: Fix compilation with Qt4
Change-Id: I036f2ccf07b836ecff63a055e3204327d006c0d0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2013-11-20 14:48:58 +01:00
Fawzi Mohamed
2fc150b983 qmljs: scan imports
Change-Id: Ied59f5d56c5816d9da57f23a619d604acec76000
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-11-20 12:27:49 +01:00
Fawzi Mohamed
7fb87fbb06 qmljs: fingerprints for documents, libraries and FakeMetaObjects
Change-Id: Ib9c9b86fbed19539dc42696292bdb3b93dd1b575
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-11-20 12:27:31 +01:00
Fawzi Mohamed
e1b44e870f qmljs: new import/dep tracking
Change-Id: I9f4de2a06aad3afb80372a4b80e56db658683575
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-11-20 12:26:30 +01:00
Thomas Hartmann
f4aa51565b QmlJS: Add warning if we use a Qt Quick 1 code model for Qt Quick 2
In some cases we use a Qt Quick 1 code model for a file with Qt Quick 2
imports. This patch adds a warning for this, since
auto completion is incomplete.

Change-Id: I60888fd269c02f38da097104f5ecc982dd65573a
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-11-14 10:03:15 +01:00
Orgad Shaneh
4442a92729 Braces cleanup
Change-Id: I8413252c90a1487d291f15d92837c30ab697b245
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-11-14 08:13:52 +01:00
Fawzi Mohamed
e9c97aa1d1 qmljs: use new qml parser
adds support for singleton and getter/setter properties

Change-Id: Ia6691ac7799a46885db0df44617617dcc3c13189
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-11-06 17:06:15 +01:00
Fawzi Mohamed
eed81ea871 qmljs: simple tracking of used modules
Change-Id: Idc977a8c5a6c6caa3749599cb6f4a236046f53d7
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-10-23 00:35:52 +02:00
Fawzi Mohamed
0a4310d314 qmljs: added qmljsconstants.h
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>
2013-10-23 00:35:16 +02:00
Nikolai Kosjar
b8dbac0b9c Rename "[Mm]ethod(s)" to "[Ff]unction(s)"
Only methods as programming functions are affected. Besides renaming
some actions like "Switch Between Function Declaration/Definition" this
mostly touches (api) code comments.

This is a follow-up patch to commit 872bfb7.

Change-Id: Icb65e8d73b59a022f8885b14df497169543a3b92
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-10-10 15:56:12 +02:00
Christian Kandeler
f1da03c73b qbs project files: Make use of new qbsSearchPaths property.
Change-Id: I396d970fafea1fd0b4c4d73883796662a1d0064b
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-10-09 18:08:56 +02:00
Eike Ziller
63ff745213 Merge remote-tracking branch 'origin/2.8'
Conflicts:
	src/libs/extensionsystem/pluginmanager.cpp
	src/libs/extensionsystem/pluginspec.cpp
	src/plugins/coreplugin/basefilewizard.cpp
	src/plugins/coreplugin/coreplugin.pro
	src/plugins/coreplugin/coreplugin.qbs
	src/plugins/coreplugin/editormanager/ieditor.cpp
	src/plugins/coreplugin/externaltool.cpp
	src/plugins/coreplugin/icore.cpp
	src/plugins/cpptools/cppmodelmanager.cpp
	src/plugins/fakevim/fakevimhandler.cpp
	src/plugins/find/ifindfilter.cpp
	src/plugins/projectexplorer/buildstep.cpp
	src/plugins/projectexplorer/devicesupport/idevice.cpp
	src/plugins/projectexplorer/runconfiguration.cpp
	src/plugins/vcsbase/vcsbaseeditor.cpp
	tests/system/suite_debugger/tst_simple_analyze/test.py

Change-Id: I11dc9e60bfc14bad4f8af747d041fc7678a07c17
2013-09-27 10:44:32 +02:00
Leena Miettinen
e1fb42d94d Doc: edit qmljs docs
Use standard wording, fix capitalization, typos, and
style and grammar issues.

Change-Id: Iac3faa59ef32aa2a8ec1857aed0d861701cbfbe7
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-09-23 09:46:57 +02:00
Tobias Hunger
c3e5d3c772 QmlJs: Remove dead code
Change-Id: I87cfb48652ab747e14ddcc8b3c5da55f5fcaa48d
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-09-12 13:49:56 +02:00
Christian Kandeler
72d173829c Remove superfluous include paths from project files.
A lot of our build system files specify unneeded include
paths. These roughly fall into the following categories:
    a) Paths that are already set in more general files
       such as qtcreator.pri.
    b) Paths that serve no purpose at all, possibly
       left over from earlier versions of the project.
    c) Paths that act as workarounds for wrong include
       statements of the form '#include "xyz.h"', where
       xyz.h is not in the same directory as the including
      file.
This patch removes such path specifications and fixes the offending
include statements from case c).
Tested on Linux, Windows and OSX with qmake and qbs.

Change-Id: I039a8449f8a65df0d616b4c08081145c18ae4b15
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-09-02 17:28:17 +02:00
Friedemann Kleint
e43e466b5b Reduce usage of QStringRef::toString() in QmlJS/QmlJSTools.
Change-Id: I9db2a0b21bf430d6f450e1e860a0c2a02272536f
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-08-29 11:35:41 +02:00
Oswald Buddenhagen
4855871607 Merge remote-tracking branch 'origin/2.8' 2013-08-27 10:48:08 +02:00
Fawzi Mohamed
30ff6da868 qmljs: add vector*d, quaternion, and matrix4x4 to code model
Added vector2d vector4d, quaternion and matrix4x4 to basic types
and extended completions related to them in the code model.

Task-number: QTCREATORBUG-9929
Change-Id: Iafdbdf5792f640e8eb29d866a372542ee07159a5
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-08-22 15:55:54 +02:00
Christian Kandeler
0dab64b6cf Qbs project files: Use groups wherever applicable.
Provides better structuring of source files.

Change-Id: Ic2d0094312bb7c8da01a1f38270564407fdbefce
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-08-21 17:30:36 +02:00
Tobias Hunger
41c9a047b8 QmlJS: Fix grammar file
Do not reintroduce clang warnings when regenerating code from
the grammar file.

Change-Id: Ic065191b93e68d88792fedac9784e4fbeff08d6f
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-09 11:33:06 +02:00
Tobias Hunger
886e1a72d1 QmlJSParser: Fix build issue with clang
Erik promised to fix this upstream.

Change-Id: If78e7eee20188d3be77ca9e7e53714ea5740d4d8
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-09 11:21:19 +02:00
Tobias Hunger
c2f83e3265 Fix build with qbs
Change-Id: Iff654636522bd41e96dfae6183f95c4dfcb53829
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-08-06 13:42:23 +02:00
Erik Verbruggen
762099487c QML: add a memory pool to the Json* classes.
The memory pool is not too efficient, but will keep objects from
leaking.

Change-Id: I68a55bc7a6ea56463652245abeea8954b693c1d7
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-07-17 12:46:10 +02:00
Orgad Shaneh
ad9e7ccab6 Fix coding style for else statements
Change-Id: I1309db70e98d678e150388c76ce665e988fdf081
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-17 11:11:25 +02:00
Fawzi Mohamed
372fc608df qmljs: add console.warn,...
Task-number: QTCREATORBUG-7033
Change-Id: I100cd6759534e5e94246f999481f5217f9e51b31
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-07-10 10:11:00 +02:00
Leena Miettinen
41411165ba Doc: use standard wording in \brief commands
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>
2013-06-20 11:22:47 +02:00
Fawzi Mohamed
317d9d50cb qmljs: add qrc files that are not resources without warnings
Change-Id: I2e768b6f14c0099769cb8a4b13052c7f0b8f88a9
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-06-06 12:33:47 +02:00
Orgad Shaneh
81fc8ff210 Doc: Remove \fn lines adjacent to functions
They are unneeded, some of them are unmaintained

Change-Id: I0ad87e152d8e2328b486b2f904f7cf9613004afe
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-06-05 10:07:14 +02:00
Fawzi Mohamed
5a4cdc11cb qmljs: adding qrc support
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>
2013-06-03 10:32:13 +02:00
Eike Ziller
8d894aee02 Merge remote-tracking branch 'origin/2.7' into 2.8
Conflicts:
	src/plugins/analyzerbase/analyzerbase.qbs
	src/plugins/qmljseditor/qmljseditor.qbs
	src/plugins/qt4projectmanager/qt4projectmanager.qbs

Change-Id: If9db8894ed27401a9aa9b385a6117be4c38edd11
2013-05-28 18:28:00 +02:00
Christian Kandeler
24e81241a5 Remove duplicate module dependencies from qbs files.
These cause a warning now.

Change-Id: I4c4e9c3e11e7f97e66a4bcdd708489fafc8f0606
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2013-05-27 17:59:12 +02:00
Eike Ziller
45f8e241ba Merge remote-tracking branch 'origin/2.7' into 2.8
Conflicts:
	src/plugins/android/androiddebugsupport.cpp
	src/plugins/qtsupport/qtsupport.qbs

Change-Id: I0953ca21a9db05084a79b8a6019189ea982df0b1
2013-05-27 17:17:40 +02:00
Joerg Bornemann
3eba7e44e5 rename ProductModule into Export
This fixes a bunch of warning when building with the updated qbs
version.

Change-Id: I644b4a4d0225b2e23ff1d9e1bf6d9d0136d6bbb5
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
2013-05-27 09:59:53 +02:00
Thomas Hartmann
7d25b90908 TypeDescriptionReader: Check for files that are not UTF8 encoded
We had a qmltypes file that was encoded in UTF16 and did not work.
We should at least warn about it.

Change-Id: I42555782ee16ddd25552f919845aa85ff1f3f636
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-05-15 11:21:44 +02:00
Eike Ziller
bedc477943 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	src/plugins/qmldesigner/components/formeditor/abstractcustomtool.cpp

Change-Id: I4e0a85795e7f4bfcdc21d106517517b527f85104
2013-04-30 11:43:33 +02:00
Fawzi Mohamed
eac15b5e7d qmljs: add explicit -relocatable flag to qmlplugindumper and use it
This will allow changing the default to nonrelocatable.

Change-Id: I80746a3e70f94040a407cc25cec9ad6fac8b6fec
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-04-25 17:21:45 +02:00
Eike Ziller
9ff8979da3 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	src/plugins/cpptools/cppchecksymbols.h
	src/plugins/qmldesigner/components/formeditor/resizecontroller.cpp

Change-Id: I887ba071fa637ad44e39bcae581738fa078a6612
2013-04-11 18:27:52 +02:00
Thomas Hartmann
86ae825033 QmlJSStaticAnalysis: make PrototypeMessageData public
We need this in the rewriter to avoid warning.

Change-Id: Ia99583e080eed936d98517ce553294d3040f8cee
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-04-10 14:47:03 +02:00
Alan Alpert
30f2418926 Export TypeDescriptionReader
Allows use in external tools. Unsupported still, but possible.

Change-Id: I947adc6a6dbccf676112ac77e186134fb660efd2
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-04-08 19:08:18 +02:00
Friedemann Kleint
7dce2f9899 Clean headers in QmlJs.
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>
2013-04-04 10:08:07 +02:00
Oswald Buddenhagen
06acd82ada derive TARGET from QTC_{LIB,PLUGIN}_NAME
the information is redundant now

Change-Id: Icc8c8b4ace11538d45c6c9e1dbe5a7976f4743e1
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-03 14:37:56 +02:00
Oswald Buddenhagen
66a3553107 make library and plugin dependencies declarative
instead of directly including the respective pri files in
*_dependencies.pri, set variables and let qtcreator.pri resolve
them to includes.
this will allow us to re-use the dependency info elsewhere.

Change-Id: Iaa33924e428ac0409660f42df2f98a7978452d3e
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
2013-04-03 14:37:45 +02:00
Oswald Buddenhagen
9631fb88cf centralize assignment of TEMPLATE = lib
Change-Id: I4025539f3875e79f03743ba9ed3fd09cd31b998d
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-02 17:13:17 +02:00
Oswald Buddenhagen
750616f7ac remove unnecessary include paths
the #include statements are supposed to be written in a way that makes
these unnecessary.

Change-Id: I6c9c0c3b00377cb8438036c96e5321ffd493523f
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-02 17:10:37 +02:00
Oswald Buddenhagen
c61210089f define QT_CREATOR centrally
numerous "3rdparty" libraries have respective #ifdefs, and consequently
the define is added in several places. it's quite a mess with the .pr?
and .qbs files, though. solve the problem by sidestepping it.

Change-Id: I5a6b1ba7cfe96b44f0a4f4ef9738900906a44316
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-02 12:20:37 +02:00
Oswald Buddenhagen
7ce3362288 automatically include libs' and plugins' _dependencies.pri files
Change-Id: I25645bb625b467c6f9d895ff89a70acd6a25683e
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-04-02 12:19:31 +02:00
Oswald Buddenhagen
37a64fb867 factor out all library dependencies to _dependencies.pri files
this makes it uniform for all libraries

Change-Id: I7a7665a2c74c8f212248c0400de04ca3eed1440a
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-02 12:16:42 +02:00