Commit Graph

491 Commits

Author SHA1 Message Date
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
Oswald Buddenhagen
cf5937a8ef remove redundant INCLUDEPATHs
src/plugins and src/libs are included by qtcreator.pri

Change-Id: I15ec19856366661bfa74d00e6278f4eb3854acb2
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-02 17:10:07 +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
Robert Loehning
a040424d2a Incremented year in copyright info
Change-Id: Ia11f4d7a94465de7f12cc390855e54e3256e5455
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-02-01 09:19:26 +01:00
Oswald Buddenhagen
1fda2111d4 Merge remote-tracking branch 'origin/2.6'
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
2013-01-31 16:25:33 +01:00
Robert Loehning
298531e370 Incremented year in copyright info
Change-Id: Ic6a9ff0359625021ebc061d22db6811814534205
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-01-29 16:27:03 +01:00
Fawzi Mohamed
285bffd99b tests/qmlproject: adding utils lib
Change-Id: I80c952ef8571229893adc6002b39812d6b738b9e
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-01-16 15:46:35 +01:00
Fawzi Mohamed
7ae32b1331 qmldesigner: fixing tests
Change-Id: I2d98ea04860dfab083234904aa83f96cf6790472
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-01-16 15:46:10 +01:00
Fawzi Mohamed
82a8e9bb86 qmljs: added persistent trie
Add a presistent trie to store imports, and provide a better (IMHO)
completion algorithm.
The trie is quite generic and it might be worth while to move it to utils.

Change-Id: I4081346af6215b1ee8ff14bd063c2a021d7c8218
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-12-06 12:57:48 +01:00
Fawzi Mohamed
f3a5a60762 qmljs: fix tst_qmlcodeformatter for qt5
qt5 needs a QGuiApp to access fonts (as TextDocument does).

Change-Id: I2779501532ada817dc22f48b5eb9f5af1bb9c3aa
Reviewed-by: Christian Kamm <kamm@incasoftware.de>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2012-12-03 13:41:44 +01:00
Fawzi Mohamed
66eb27e687 qmljs: indent expression in if condition and indent lambda expressions
* indent expressions (like function defs) in if condition
  fixes QTCREATORBUG-7243

Change-Id: I61197317a8dcba72a45b660600711748e2e2b962
Reviewed-by: Christian Kamm <kamm@incasoftware.de>
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2012-12-03 13:41:22 +01:00
Thomas Hartmann
5e243dabd9 QmlDesigner: export core functionality
We export the core functionality of the model allowing
other plugins to use it.

The general functionality was already there, but I had
to rename the macro to avoid name clashes.

Also I renamed the .pri file to avoid confusion.

Change-Id: I88203ce9dbfddc8d734e5e232ff71bc0e244e5b8
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-11-21 16:00:24 +01:00
Thomas Hartmann
d19d254df6 QmlJS::SimpleReader: adding unit test
Change-Id: Iff063bc8037fe11e7f7dd1662408c5a2d0e381cd
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-11-21 13:59:04 +01:00
Thomas Hartmann
6cf321a316 QmlJS:SimpleReader: adding support for arrays
Also adding test.

Change-Id: Idaf0aeacbb6f78e5c8404db740c2a8b7b297dad2
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-11-21 13:58:58 +01:00
Eike Ziller
fe74a9a722 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	qtcreator.pri
	qtcreator.qbs
	src/plugins/fakevim/fakevimhandler.cpp
	src/plugins/qtsupport/baseqtversion.cpp
	tests/auto/cplusplus/cxx11/cxx11.pro
	tests/auto/cplusplus/cxx11/tst_cxx11.cpp
	tests/auto/icheckbuild/icheckbuild.pro

Change-Id: I3c8351ad35617f56d15b788c8a46d8a6f453ef70
2012-11-09 11:20:10 +01:00
Thomas Hartmann
5debabc410 QmlJS: adding SimpleReader
SimpleReader is a !simple! parser for json like qml files.
SimpleReader only parses literal properties for e.g. configuration
files.

SimpleAbstractStreamReader allows event based parsing and SimpleReader
stores the parsed data in a reference counted tree structure.

Change-Id: I0f6422a97f5c356149c516f227f8bbd7b736a6d0
Reviewed-by: Joerg Bornemann <joerg.bornemann@digia.com>
2012-11-07 16:42:28 +01:00
Nikolai Kosjar
fb61be5ed6 Qt5: Correct usage of testlib.
This corrects commit 112f80. $$QTESTLIB is not needed since both Qt4 and
Qt5 support "QT += testlib".

Change-Id: I776b44825295c86d2d85e9b8dc6a422da6f36ab6
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2012-11-05 12:58:53 +01:00
Eike Ziller
0a1bdf4257 Merge remote-tracking branch 'origin/2.6'
Conflicts:
	share/share.qbs
	tests/auto/icheckbuild/icheckbuild.pro

Change-Id: I13bc737c981aaeb615ab1a3571cc8a18f60a7cd6
2012-10-25 10:45:58 +02:00
Nikolai Kosjar
112f80c6c6 Qt5: Fix warning "qtestlib is deprecated".
"Project WARNING: CONFIG+=qtestlib is deprecated. Use QT+=testlib
instead."

Change-Id: Ia6dcce078736cac0f0b05e0f621a25f97c9dac87
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2012-10-24 13:51:16 +02:00
Eike Ziller
e6623754e8 One more Nokia replacement.
Change-Id: Ic0a3718d0f1f12e8894c532d5cc034574e26ebeb
Reviewed-by: Christian Stenger <christian.stenger@digia.com>
2012-10-09 15:49:48 +02:00
Thomas Hartmann
13d4972e67 QmlDesigner.MetaInfo: meta info fix for versions
Version numbers were not respected in all cases in the meta system.
If we (just) have a QtQuick 2.0 import Rectangle 1.0 is not valid.

Also adding a test.

Change-Id: I2e1dc174aaa180ad1750f0eca04c6879ef6e304d
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-10-09 14:39:44 +02:00
Eike Ziller
086dd684ab Merge remote-tracking branch 'origin/2.6'
Conflicts:
	src/plugins/coreplugin/fileiconprovider.cpp
	src/plugins/cppeditor/cppplugin.cpp
	tests/auto/qml/qmldesigner/coretests/coretests.pro

Change-Id: I0e83becf661ded9316ce6766786c9ef4c2f897a7
2012-10-09 14:27:29 +02:00
Eike Ziller
1504ca67fb More Nokia -> Digia/QtProject changes
Change-Id: If52505dbc95ee48ac3467cdfbbea91629c11089c
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2012-10-09 12:24:24 +02:00
Thomas Hartmann
ac8f94a8d2 Test.QmlDesigner: removing declarative dependency
Change-Id: Ib15120c846187bd37cf22fae88ae6ece20d2417a
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-10-08 14:30:52 +02:00
Eike Ziller
6fd252b0a5 Merge remote-tracking branch 'origin/2.6'
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
2012-10-05 21:20:50 +02:00
hjk
386ca7c8dd Adjust license headers
Change-Id: Ice592c6de9951ee3b2c4cb52ed0bb3b6770e0825
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2012-10-05 17:12:56 +02:00
Thomas Hartmann
7fee2d7a34 Tests:QmlDesigner: fixing changeGradientId
Attaching a second RewriterView is not allowed.

Change-Id: I54055b36f86cd1cff0313edfd405c128c5783705
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-25 12:58:13 +02:00
Thomas Hartmann
2f0f887acc Tests.QmlDesigner: fixing testStatesBaseState
We have to process events to ensure that the correct
data is actually delivered by qmlpuppet.

Change-Id: I5a8b18d20ced5c7b9279868c53fbee698a752b74
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-25 12:58:02 +02:00
Thomas Hartmann
facd24c6b5 Tests.QmlDesigner: fixing defaultPropertyValues
Image does not exist have a revision 1.1.

Change-Id: I012cf4e3636239665b45369717fba8c3c61c0352
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-25 12:57:49 +02:00
Thomas Hartmann
c620ea67f0 Tests.QmlDesigner: compile fix
This header file is not needed and was moved
by recent refactoring.

Change-Id: I0899de93be4e6f03c42d94e128feaa203a12063d
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-24 12:23:48 +02:00
Thomas Hartmann
102f915463 Tests.QmlDesigner: adding testBasicStatesQtQuick20
Testing basic states for Qt Quick 2.0.

Change-Id: I86b4dbaffa3ec340eb175a1cd687eef465d87efe
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-24 12:21:42 +02:00
Thomas Hartmann
3c42ca4138 Tests.QmlDesigner: adding testQtQuick20BasicRectangle
Basic test for Qt Quick 2.0.
This time using Rectangle (different prototype chain).

Change-Id: I5500fa5d1a6e2d049404944be81f0b5657cefe3c
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2012-09-24 12:21:30 +02:00
Thomas Hartmann
3c5b64a722 Tests.QmlDesigner: adding basic test for Qt Quick 2.0
Change-Id: Id98be8ec130eb5adfcbd490600369e8353f168b8
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-24 11:47:07 +02:00
Thomas Hartmann
e4114505ee QmlDesigner: fix regression uncovered by tests
Fixing a regression in the meta info system.

We follow now Qthe Declarative1StateOperation convention (note the 1).
Since this data is provided by Qt Creator it is independent from any Qt
version. (4.8/5.1)

Also the type comparison was broken in NodeMetaInfo for <cpp> types.
PackageName() does retrieve the package name of the cpp type which might
be different from the one used in qualfiedTypeName().

Change-Id: I5cdae37c2024cdc89824e68168c16e2050051d06
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-20 12:01:20 +02:00
Thomas Hartmann
6fb9e90920 Tests.QmlDesigner: adding some QApplication::processEvents();
This is needed process all the events created by NodeInstanceView.

Change-Id: Ia2df51f5aafdc670e60a47064092123a1a100049
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-19 16:31:45 +02:00
Thomas Hartmann
96a41678c8 Tests.QmlDesigner: remove QSkip for working tests
Change-Id: I85f61ff4b0ff5abcbff4ef766c4ca7706069bdbc
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-19 16:31:35 +02:00
Thomas Hartmann
4cc46ef904 Tests.QmlDesigner: fix testSubComponentManager()
Types names changed.

Change-Id: Ide7cc23289ab490ff272ca99ee048ccc6c99d335
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-19 16:31:29 +02:00
Thomas Hartmann
55b7759a93 Tests.QmlDesigner: fix loadEmptyCoreModel()
Attaching more then one rewriter is not a good idea.

Change-Id: I3ec000836dc21029b43003c4636927086f267d10
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-19 16:31:22 +02:00
Thomas Hartmann
7b3b3adaff Tests.QmlDesigner: fix testModelBasicOperations
We have to respect the meta info. So we create a Flipable.

Change-Id: I427cce93e1cb6fea7ac1c70b0c1020234af3494d
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-19 16:31:14 +02:00
Thomas Hartmann
8a6c2a6001 Tests.QmlDesigner: fix testRewriterErrors
Error {} was not an Error anymore since we ignore unknown types.
Rectangle does not have the property test. This triggers an error.

Change-Id: I838b12ba15c394a34f6f9176e5eb5826d54b0f2b
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-19 16:31:01 +02:00
Thomas Hartmann
838a16d7c6 Tests.QmlDesigner: fix testModelResolveIds()
We have to respect the meta info. "test" is replaced by
"acnhors.fill" for that reason.

Change-Id: I7b3c9784de0d9d5cbaf2cd811ebb427ffbbf4b70
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-19 16:29:37 +02:00
Thomas Hartmann
32c38a158e Tests.QmlDesigner: fix testRewriterChangeImports
Qt 4.7 is no more. The test was broken for the alias import.

Change-Id: Ia642907802d03d379d6ea3bdeb9745241b6bc7fc
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-19 16:29:31 +02:00
Thomas Hartmann
2057892bd4 Tests.QmlDesigner: testBasicOperationsWithView
We do not set the size of the root item to 100x100.
Since "out of process" the instanceValue of a node has no specfic
meaning anymore.

Change-Id: I953fb32816548a74631fcee8ae50a550514758c0
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-19 16:29:23 +02:00
Thomas Hartmann
bd04f2edbf Tests.QmlDesigner: Qt 4.7 is obsolete
Change-Id: If8cde21be29e2fe1a524171d98a2e6410391145a
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-19 11:27:52 +02:00
Thomas Hartmann
c596151d7e Tests.QmlDesigner: Outdated test - we skip the "Component" node
Change-Id: I41950436ff9db77e50cfb1601f63af401f7e2364
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-19 11:27:46 +02:00
Thomas Hartmann
6e0cfe39b1 Tests.QmlDesigner: NodeInstanceView has to run in TestModus
Change-Id: I3f0710050c3010f74e6b9c67dec463b9f9e96625
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-19 11:27:39 +02:00
Thomas Hartmann
6d26d349c9 Test.qmlDesigner: add batch file to setup path
Without qtcreator\plugins\Nokia\ in the path the plugin .dlls
are not found (qmljstools).

Change-Id: If63e6350d8b2e10cc754b914246031dcce47d2bb
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-18 16:33:48 +02:00
Thomas Hartmann
4897839b6e Test.qmlDesigner: fixes meta info tests
Some tests were broken. Most just worked.

Change-Id: I085d30b44ff2ecb2afa63233fe883657fdf2134b
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-18 16:33:41 +02:00
Thomas Hartmann
deed11f392 Tests.QmlDesigner: fixing more meta info tests
The tests were outdated.

Change-Id: I92bf43b32c3a81dedec405ac57f1a73412a4e100
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-18 15:46:34 +02:00
Thomas Hartmann
e024877e7a Tests: fix warnings
Change-Id: Ib26931ba6d951ad36ca93758d8f5bfeb22d42179
Reviewed-by: Marco Bubke <marco.bubke@digia.com>
2012-09-18 12:45:18 +02:00