forked from qt-creator/qt-creator
Revert "Project: Set QML/C++ languages where both are possible"
This reverts commit 75691393ec. Otherwise
we'd enable QML debugging for virtually all projects.
Change-Id: I5518624a9973a9f61fbef6c680b5a83c74d0b4a9
Reviewed-by: Aurindam Jana <aurindam.jana@digia.com>
Reviewed-by: Tobias Hunger <tobias.hunger@digia.com>
This commit is contained in:
@@ -353,9 +353,7 @@ Qt4Project::Qt4Project(Qt4Manager *manager, const QString& fileName) :
|
||||
m_activeTarget(0)
|
||||
{
|
||||
setProjectContext(Core::Context(Qt4ProjectManager::Constants::PROJECT_ID));
|
||||
Core::Context pl(ProjectExplorer::Constants::LANG_CXX);
|
||||
pl.add(ProjectExplorer::Constants::LANG_QMLJS);
|
||||
setProjectLanguages(pl);
|
||||
setProjectLanguages(Core::Context(ProjectExplorer::Constants::LANG_CXX));
|
||||
|
||||
m_asyncUpdateTimer.setSingleShot(true);
|
||||
m_asyncUpdateTimer.setInterval(3000);
|
||||
@@ -637,6 +635,15 @@ 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();
|
||||
|
||||
setProjectLanguage(ProjectExplorer::Constants::LANG_QMLJS, !projectInfo.sourceFiles.isEmpty());
|
||||
|
||||
Reference in New Issue
Block a user