diff options
author | Tobias Hunger <tobias.hunger@digia.com> | 2013-04-05 14:46:38 +0200 |
---|---|---|
committer | Tobias Hunger <tobias.hunger@digia.com> | 2013-04-05 14:56:59 +0200 |
commit | 75691393ec9bf87c290fb8e9d199cbeab7e726f8 (patch) | |
tree | 6a72804605fc2708595536fdd504e1a98ed51d1d /src/plugins/qt4projectmanager/qt4project.cpp | |
parent | ace68297425d5298af9ebfa9f289b4bc69ea3853 (diff) |
Project: Set QML/C++ languages where both are possible
Change-Id: I4bc5bd7a644c48dfa529f9f9f6052e401de76d40
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
Diffstat (limited to 'src/plugins/qt4projectmanager/qt4project.cpp')
-rw-r--r-- | src/plugins/qt4projectmanager/qt4project.cpp | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/src/plugins/qt4projectmanager/qt4project.cpp b/src/plugins/qt4projectmanager/qt4project.cpp index aa1e6487b8..95b3564e14 100644 --- a/src/plugins/qt4projectmanager/qt4project.cpp +++ b/src/plugins/qt4projectmanager/qt4project.cpp @@ -328,7 +328,9 @@ Qt4Project::Qt4Project(Qt4Manager *manager, const QString& fileName) : m_activeTarget(0) { setProjectContext(Core::Context(Qt4ProjectManager::Constants::PROJECT_ID)); - setProjectLanguages(Core::Context(ProjectExplorer::Constants::LANG_CXX)); + Core::Context pl(ProjectExplorer::Constants::LANG_CXX); + pl.add(ProjectExplorer::Constants::LANG_QMLJS); + setProjectLanguages(pl); m_asyncUpdateTimer.setSingleShot(true); m_asyncUpdateTimer.setInterval(3000); @@ -609,15 +611,6 @@ void Qt4Project::updateQmlJSCodeModel() } } - // If the project directory has a pro/pri file that includes a qml or quick or declarative - // library then chances of the project being a QML project is quite high. - // This assumption fails when there are no QDeclarativeEngine/QDeclarativeView (QtQuick 1) - // or QQmlEngine/QQuickView (QtQuick 2) instances. - Core::Context pl(ProjectExplorer::Constants::LANG_CXX); - if (hasQmlLib) - pl.add(ProjectExplorer::Constants::LANG_QMLJS); - setProjectLanguages(pl); - projectInfo.importPaths.removeDuplicates(); modelManager->updateProjectInfo(projectInfo); |