Commit Graph

100 Commits

Author SHA1 Message Date
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
Orgad Shaneh
4442a92729 Braces cleanup
Change-Id: I8413252c90a1487d291f15d92837c30ab697b245
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-11-14 08:13:52 +01:00
Fawzi Mohamed
c32317d198 qml: solve race condition when deleting while indexing
Task-number: QTCREATORBUG-10734

Change-Id: I521ac0881ff83a44846b133de5c292af8cda9d4e
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
2013-11-12 12:45:40 +01: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
hjk
527046acc2 MessageManager: General cleanup.
Apply 'static' pattern, rename 'printToOutputPane' to 'write'

Change-Id: I6f31f1a8c914661e2a2182c0b6256b41ead28de7
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-09-05 12:51:00 +02:00
hjk
aadb6f16af SessionManager: Apply 'static' pattern
Change-Id: I370f72fcf7a24216ee189979ce6b5c8bfc5f4140
Reviewed-by: David Schulz <david.schulz@digia.com>
2013-09-05 12:28:12 +02:00
hjk
98917598d3 ProjectManager: Use Core::Id for progress types
Change-Id: I72993fda50ad70ad2d7c2f449923ac6e34b9e737
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-04 14:59:06 +02:00
hjk
a37589d431 Apply 'static' pattern to MimeDatabase
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>
2013-09-03 11:41:45 +02:00
hjk
df36184371 Core: Static pattern for ProgressManager, clean up all users
Change-Id: I4af8793ca69a3af9e99baeb7c31dad3864266f91
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
2013-09-02 12:41:47 +02:00
Tobias Hunger
95859289b8 KitManager: Use static API as other singletons do
Change-Id: Ia49c6552a5aae72870687ef9c64f2642fbe24155
Reviewed-by: hjk <hjk121@nokiamail.com>
2013-08-21 16:55:16 +02:00
Oswald Buddenhagen
c2e90c360b Merge remote-tracking branch 'origin/2.8'
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
2013-08-21 14:39:18 +02:00
Fawzi Mohamed
e8a709cd4d qmljs: avoid ecessive updating when cxx types might have changed
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>
2013-07-30 10:53:58 +02:00
Eike Ziller
890bb77f82 Update the Qml working copy from the documents, not editors.
Unfortunately the language is still checked by using an editor property.

Change-Id: I3b54624e60b65c48b154c405f66d04b74be5be3e
Reviewed-by: Erik Verbruggen <erik.verbruggen@digia.com>
2013-07-17 12:09:05 +02:00
Eike Ziller
dd43d9908f Rename IDocument::fileName --> filePath
That is what it actually is, wrt how Qt API calls it.

Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-07-09 13:51:42 +02:00
Christian Kandeler
b403732934 QmlJSTools: Fix language detection bug.
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>
2013-07-02 16:38:16 +02:00
Fawzi Mohamed
eb1d87b30f qmljs: coalesce resets of code model triggered by cpp files update
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>
2013-07-02 12:11:58 +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
Fawzi Mohamed
8762dd2ea9 qmljstools: reset code model after update of exported cpp types
Task-number: QTCREATORBUG-9105
Change-Id: Id0021902985da8e5e7faec23766bb37541d041c0
Reviewed-by: Thomas Hartmann <Thomas.Hartmann@digia.com>
2013-05-29 20:13:14 +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
44931c0985 Merge remote-tracking branch 'origin/2.7'
Conflicts:
	src/plugins/pythoneditor/tools/lexical/pythonformattoken.h

Change-Id: I7b921cd975aa755166a80d219ed5e8b69888aeb0
2013-04-18 09:22:19 +02:00
hjk
d3c7220cbc Mime: Use string comparisons instead of regexps for simple globbing
Change-Id: Ia894f3663f43088cdb2d8cb685bcebecaded8146
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
2013-04-17 17:13:35 +02:00
Fawzi Mohamed
a019c4c7a1 qmljs: update qt-creator builtins.qmltypes, and use them for qt<-4.8.5
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>
2013-04-16 09:57:32 +02:00
Tobias Hunger
ddafdf55de CppTools: Rename files to comply with coding standard
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>
2013-04-10 11:43:22 +02:00
Tobias Hunger
ea23948efb CppTools: Use namespace CppTools consistently
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>
2013-04-08 13:21:31 +02:00
Friedemann Kleint
f6017b8dca Clean headers in QmlJsTools.
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>
2013-04-03 11:35:02 +02:00
Daniel Teske
2cc171a0c2 QmlJsTools: Adjust to MessageManager api change
Change-Id: I68e662ea30b9c219e3a21e4f48a83c1ad24e2c58
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
2013-03-25 10:42:59 +01:00
Fawzi Mohamed
942326ae9b qmljs: add infrastructure handling qml dialects better
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>
2013-02-21 17:22:16 +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
Fawzi Mohamed
174baf5ea1 qmljs: differnt language constants for the different qml flavors
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>
2013-01-31 11:50:35 +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
Orgad Shaneh
29a93998df Remove braces for single lines of conditions
#!/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>
2013-01-08 10:48:18 +01:00
Orgad Shaneh
75a3728254 QmlJSTools: Compile with QT_NO_CAST_FROM_ASCII
Change-Id: I370075ce75682ea11790a8f91339a01fb3c247f9
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
2012-11-22 08:53:45 +01: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
Christian Kandeler
3c6f76d16c HostOsInfo: Add some more useful abstractions.
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>
2012-09-05 13:54:48 +02:00
Christian Kandeler
e669f05406 Utils: Introduce HostOsInfo class.
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>
2012-08-27 17:00:03 +02:00
Christian Kamm
a14ed0793c QmlJS: Update to latest QmlJS parser from Qt 5.
Using qtdeclarative revision c9b7582a2e7ad9fcd03dd999c3b7a16b72803238

Change-Id: I9c942fa04c3fab5ef57b38e13471d0a4e2e8a2bf
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-07-31 11:05:03 +02:00
Eike Ziller
e0e8cf3ada Contact -> qt-project.org
Change-Id: I7134d7de30bcf9f9dcfad42520dd45ee083a852d
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
2012-07-19 13:23:21 +02:00
Kai Koehne
aca66125de QmlJSInspector: Remove dependency to QmlJSEditor
Change-Id: I6f90bff623437b25887bdd288987c013a45029be
Reviewed-by: Aurindam Jana <aurindam.jana@nokia.com>
2012-04-16 16:55:54 +02:00
Erik Verbruggen
f1b2100e34 Move the ModelManagerInterface out of the CPlusPlus library.
Change-Id: Iffaa18f848a22f6961b49dff048672b194570df6
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-03-14 11:46:24 +01:00
Eike Ziller
d66acb51d0 Rename IFile->IDocument and FileManager->DocumentManager
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>
2012-02-20 13:32:49 +01:00
Erik Verbruggen
3fa55b7ab9 Removed module names from #include directives.
Getting the #include directives ready for Qt5. This includes the
new-project wizards.

Change-Id: Ia9261f1e8faec06b9285b694d2b7e9a095978d2b
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
2012-02-15 16:24:46 +01:00
Friedemann Kleint
622cac50f4 Move QtConcurrent library into Utils.
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>
2012-02-09 12:33:10 +01:00
Daniel Teske
b8ae31e664 Remove checking for a null sessionmanager.
That can't happen.

Change-Id: I05293e96e7a716fbaf5fd03aa182c723c9858a03
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
2012-01-31 14:15:35 +01:00
hjk
2931a499e6 Long live the king!
Change-Id: I2b72b34c0cfeafc8bdbaf49b83ff723544f2b6e2
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-26 19:55:36 +01:00
hjk
4a21f0c3c8 Use new static ICore interface.
Change-Id: I9b690d9b150c8d162b15370f9f8986267c9128f1
Reviewed-by: Daniel Teske <daniel.teske@nokia.com>
2012-01-24 18:48:47 +01:00
Fawzi Mohamed
b43dade44d qmljs: fix racing condition with importPaths
fixes QTCREATORBUG-6768

Change-Id: I53646df69aa9d0ce97006c68826b02a1452fe4d9
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
2012-01-13 11:26:00 +01:00
Leandro Melo
c287d90604 C++: Rename source/setSource to utf8Source/setUtf8Source
Continuinng a previous commit... This is in order to make
the interface clearer.

Change-Id: Ic1b05217f878578bc84a064927507b75981c47d6
Reviewed-by: Roberto Raggi <roberto.raggi@nokia.com>
2012-01-13 11:22:28 +01:00
Eike Ziller
e2b0835b58 Merge remote-tracking branch 'origin/2.4'
Conflicts:
	qtcreator.pri
	src/libs/qmljs/qmljstypedescriptionreader.cpp
	src/plugins/analyzerbase/startremotedialog.ui
	src/plugins/qmldesigner/designercore/include/rewriterview.h
	src/plugins/qt4projectmanager/makestep.cpp

Change-Id: If9d15a8c8f73106585fd8ce6ac47c253a40af6b1
2011-11-25 09:48:25 +01:00