Commit Graph

909 Commits

Author SHA1 Message Date
Fawzi Mohamed
d24cb60d48 qml: moving most of ModelManager logic to ModelManageInterface
Currently ModelManager contains lot logic, but as it sits in QmlJSTools
it is not possible to use it in standalone tests.
Moving most of the logic to ModelManagerInterface (and cleanup)
to allow better testing, and refactoring.
This introduces a dependency of the qmljs lib on the cplusplus lib
Also a (small) part of the CppTool::ModelManagerInterface has been
moved to CPlusPlus::CppModelManagerBase to remove the dependency on
CppTools to gather the Qml types exposed from C++.

Change-Id: Icad7fe96dfd0f1a2b1058d82bd98c77c40aa5e9d
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2014-02-19 21:18:58 +01:00
Fawzi Mohamed
f2ae69b1bf qmljs: qmltypes, added isCreatable, isSingleton, isComposite
Change-Id: I62cd3736de46b25107e5ea5f6d8e8dcafaa5e11a
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2014-02-18 05:41:16 +01:00
Fawzi Mohamed
1ff5faacea qmljs: improve qmltype parsing error messages
add filename to each error message.

Change-Id: I2b9f550147acfe6993f1e7d878fdda863182a2a0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2014-02-18 05:40:34 +01:00
Fawzi Mohamed
10fa9c5c77 qmljs: correctly set Warnings
WarnImperativeCodeNotEditableInVisualDesigner and
WarnReferenceToParentItemNotSupportedByVisualDesigner were still
declared as errors, which made files having them no editable in
designer.

Task-number: QTCREATORBUG-10940
Change-Id: I6edc03634c2d05b74ab0adf62e48fc6d03049d7e
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-02-17 17:15:18 +01:00
Orgad Shaneh
7ed1576083 Clean up single namespace forward-declarations
Done using the following ruby script:

Dir.glob('**/*.h').each { |file|
  if File.file?(file)
    s = File.read(file)
    t = s.gsub(/^namespace .+ \{\n\s*class .*;\n\s*\}.*$/) { |m| m.gsub(/\n\s*/, ' ').gsub(/\s*\/\/.*$/, '') }
    if t != s
      puts file
      File.open(file, 'w').write(t)
    end
  end
}

Change-Id: Iffcb966e90eb8e1a625eccd5dd0b94f000ae368e
Reviewed-by: hjk <hjk121@nokiamail.com>
2014-02-12 09:30:37 +01:00
Eike Ziller
39a29dcfd9 Fix build with msvc2010
override on destructors are not very useful anyhow, but also msvc2010
doesn't like them at all.

Change-Id: I2d5f4b0d6148c5e66d2cba604d305707269d12e0
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2014-02-07 09:26:22 +01:00
Fawzi Mohamed
cbf760686f qmljs: using QTC_OVERRIDE consistently
Change-Id: I37c96397014b7b710aeec629c5e715bba4997766
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-02-06 14:03:12 +01:00
Eike Ziller
f8461fbbdf QmlJSEditor: Move semantic info updating to document
Change-Id: I804dbd887af1786e7554ec79f94fc8e59db1de5b
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2014-01-29 10:16:10 +01:00
Fawzi Mohamed
a8ea0a0736 qmljs: generalize language treatement
* better support qbs and similar non QtQuick qml languages
* begin to clean and migrate things from ModelManager to
  ModelManagerInterface

Change-Id: Ifa39dc1e4c568e9e21307f4913dcb5989e80420f
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2014-01-28 15:01:00 +01:00
Eike Ziller
cdd19fe6ad Merge remote-tracking branch 'origin/3.0'
Conflicts:
	src/plugins/qmldesigner/components/componentcore/modelnodeoperations.cpp

Change-Id: If62ec06ea069a7eba6735101e5334b0c1f66861f
2014-01-20 14:21:46 +01:00
Fawzi Mohamed
6d3939dbfd qml: accept qmltypeinfo with larger minor version
Change-Id: I56559f6d9bd128069e2c270e033c958a6a239c3a
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-16 12:54:22 +01:00
Fawzi Mohamed
8772e6e85b qml/parser: update parser to Qt version 5.2.0
Change-Id: I22234b9d99bdebf05309ad79ed3b9233db5cff78
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-15 14:57:45 +01:00
Eike Ziller
236ea9efb9 Merge remote-tracking branch 'origin/3.0'
Conflicts:
	share/qtcreator/debugger/dumper.cpp
	share/qtcreator/debugger/dumper_p.h
	share/qtcreator/debugger/test/main.cpp
	src/plugins/debugger/gdb/classicgdbengine.cpp
	src/plugins/debugger/gdb/pythongdbengine.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.cpp
	src/plugins/debugger/lldblib/guest/lldbengineguest.h
	src/plugins/debugger/lldblib/guest/main.cpp
	src/plugins/debugger/lldblib/ipcengineguest.cpp
	src/plugins/debugger/lldblib/ipcengineguest.h
	src/plugins/debugger/lldblib/ipcenginehost.cpp
	src/plugins/debugger/lldblib/ipcenginehost.h
	src/plugins/debugger/lldblib/lldbenginehost.cpp
	src/plugins/debugger/lldblib/lldboptionspage.cpp
	src/plugins/qbsprojectmanager/qbsstep.cpp
	src/plugins/qbsprojectmanager/qbsstep.h
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecanvas_p.h
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d.cpp
	src/plugins/qmlprofiler/canvas/qdeclarativecontext2d_p.h
	src/plugins/qmlprofiler/canvas/qmlprofilercanvas.cpp
	src/plugins/qnx/blackberrycheckdevmodestep.cpp
	src/plugins/qtsupport/debugginghelper.cpp

Change-Id: Ie9fd0a885fb6264a6a8a72daee071b75bcbd2e9d
2014-01-08 11:01:06 +01:00
Robert Loehning
746c5d8863 Incremented year in copyright info
Change-Id: Ib5423fdd064e4546f848c0b640b0ed0514c26d3a
Reviewed-by: Leena Miettinen <riitta-leena.miettinen@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2014-01-08 08:29:47 +01:00
Thiago Macieira
a60b89bff4 Remove trailing comma in an enum
qmljsconstants.h(53): warning #271: trailing comma is nonstandard
[and many more]

Change-Id: I2224b7fe6ae1954b27d2b2bfebd469e1ca472f7b
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-12-12 10:17:22 +01:00
Thiago Macieira
5fd58a3252 Remove function acceptIndented that is not used anywhere
Found by ICC:
warning #177: function "<unnamed>::Rewriter::acceptIndented" was
declared but never referenced

Change-Id: I37892d021a4ca9886fd35fea00102d44fa99320f
Reviewed-by: Kurt Pattyn <pattyn.kurt@gmail.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-12-06 22:07:02 +01:00
Thomas Hartmann
caff343769 QmlJS: Fixing warnings
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>
2013-11-26 11:34:30 +01:00
Thomas Hartmann
e25f1c5a4c QmlJS: QmlDesigner warnings should be warnings
Task-number: QTCREATORBUG-10898
Change-Id: I6d8a1b1523d72950fad25eb8545c24085552b226
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-11-25 18:59:20 +01:00
Fawzi Mohamed
4bd3f2a69e qmljs: improve suggestion ordering
change matchStrength sp that a contigous prefix is always preferred

    Task-number: QTCREATORBUG-10638
    Change-Id: I532d93eddae1ad39157ff65e96fc6651200264ab

Change-Id: I1001f5f4b78bac84b8df8ddc4c394c68359f7821
Reviewed-by: Mitch Curtis <mitch.curtis@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-11-25 18:45:26 +01:00
Fawzi Mohamed
30d0eb6325 qmljs: fixing tests
Change-Id: I8f2eaa64f3cb923753234de76f3491d4daa034fa
Reviewed-by: Christian Kandeler <christian.kandeler@digia.com>
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-11-22 21:22:34 +01:00
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