We're setting up targets only after the initial refresh(Everything),
so we need to reconfigure the project after that. This fixes issues
where the QML editor still uses Qt Quick 1 imports from the default
Qt kit when a project is initially loaded.
Change-Id: I15af4a1b90231632303d2fd73db350a9d2aff0ce
Reviewed-by: Christian Stenger <christian.stenger@theqtcompany.com>
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@theqtcompany.com>
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>
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>
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>
Update code model if e.g. the Qt version in the active kit changes.
Task-number: QTCREATORBUG-10656
Change-Id: I4263833c23c2b00035d15faa9725adbb734f8366
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
We can parse the .qmlproject files without using the declarative module.
Change-Id: I78a910c9ec9477f5c6fbcdca23f62ab841ca4368
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
Use it instead of retrieving this information from the document.
Change-Id: I809fcb2daf59021cf503c371a5d40d75d7448796
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
That is what it actually is, wrt how Qt API calls it.
Change-Id: Ied02055debf6aad75556b0d9d22e8ba2f72be555
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Ran script to remove inludes on a trial-and-error basis and
manually corrected it.
Change-Id: I2d1d2ec5a3071de9d2a0a03bc69ec653becc7f85
Reviewed-by: Kai Koehne <kai.koehne@digia.com>
These appear when compiling in release mode.
Change-Id: I76ee3b1b8d728fd839d713ee4f914b6965851b99
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@digia.com>
Find Desktop kit that matches detected QtQuick import, and has
a viewer.
Task-number: QTCREATORBUG-8900
Change-Id: I3d32dbc7a304dbeb36647dd4de9864e665f5a59f
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
Detect the default import (QtQuick 1.x vs QtQuick 2.x) from main
file, and use it to restrict kits + select the right runtime.
Task-number: QTCREATORBUG-8358
Change-Id: Ib8cfd3eb989953f607fee6043c43e588f798c774
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
Reviewed-by: Daniel Teske <daniel.teske@digia.com>
The code is similar to what we do in Qt4Node.
Change-Id: I4f206f8acdb38d7813160a7ecabc1ffd5daedcfb
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
#!/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>
Actually this can lead to crashes if passing the QtQuick1 import
path to qmlscene.
The removed code was introduced in 404186a919. However,
the Qt import path for the code model is also added in
QmlProject::refresh().
Task-number: QTCREATORBUG-8365
Change-Id: I8581ce3d67c83c0f27d7b8aefedf9765935bedbc
Reviewed-by: Fawzi Mohamed <fawzi.mohamed@digia.com>
And implement a tooltip for them
Task-number: QTCREATORBUG-7870
Change-Id: I4975dd24ca2b619ebcbd0393f97311590ed4930f
Reviewed-by: Eike Ziller <eike.ziller@digia.com>
Reviewed-by: hjk <qthjk@ovi.com>
* Rename profiles to kits.
* Update some strings:
* projects mode has a Kits tab, not a Targets tab.
* " Settings" was dropped from the sub-tabs of the Kits tab
* menu entry "Build/Open Build/Run Target Selector" was renamed
to "Build/Open Build and Run Kits Selector".
* Use "Kit" instead of "Target" in miniprojecttargetselector.
(The class was not renamed as it does indeed select targets,
not kits)
Change-Id: I0727e086e2dfa0e8aaaf89fdc6f2e3596c7a4314
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>
* Handle 0 when calling createTarget to avoid the crashes in the first place
* Do not try to create/add targets for 0 profiles to avoid creator writing
a warning to the console
* Fix possible crashes in debugger when no default profile is set.
Task-number: QTCREATORBUG-7695
Change-Id: I9afc8e29c8b859ad078dad794ef5017168daac78
Reviewed-by: Orgad Shaneh <orgads@gmail.com>
Reviewed-by: Eike Ziller <eike.ziller@nokia.com>