forked from qt-creator/qt-creator
Qmake: Allow removing QMLJS from project languages
E.g. when the last use of the libraries was removed from .pro files. This also makes the use more similar to the other build systems and allows making Project::{add,remove}ProjectLanguage private. Change-Id: Ib23d83f2fb5aab728b344c164a1331429b44e345 Reviewed-by: Artem Sokolovskii <artem.sokolovskii@qt.io> Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -174,7 +174,6 @@ public:
|
||||
|
||||
void setDisplayName(const QString &name);
|
||||
void setProjectLanguage(Utils::Id id, bool enabled);
|
||||
void addProjectLanguage(Utils::Id id);
|
||||
|
||||
void setExtraData(const QString &key, const QVariant &data);
|
||||
QVariant extraData(const QString &key) const;
|
||||
@@ -221,7 +220,6 @@ protected:
|
||||
|
||||
void setId(Utils::Id id);
|
||||
void setProjectLanguages(Core::Context language);
|
||||
void removeProjectLanguage(Utils::Id id);
|
||||
void setHasMakeInstallEquivalent(bool enabled);
|
||||
|
||||
void setNeedsBuildConfigurations(bool value);
|
||||
@@ -235,6 +233,9 @@ protected:
|
||||
private:
|
||||
void addTarget(std::unique_ptr<Target> &&target);
|
||||
|
||||
void addProjectLanguage(Utils::Id id);
|
||||
void removeProjectLanguage(Utils::Id id);
|
||||
|
||||
void handleSubTreeChanged(FolderNode *node);
|
||||
void setActiveTarget(Target *target);
|
||||
|
||||
|
@@ -454,8 +454,7 @@ void QmakeBuildSystem::updateQmlJSCodeModel()
|
||||
// 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.
|
||||
if (hasQmlLib)
|
||||
project()->addProjectLanguage(ProjectExplorer::Constants::QMLJS_LANGUAGE_ID);
|
||||
project()->setProjectLanguage(ProjectExplorer::Constants::QMLJS_LANGUAGE_ID, hasQmlLib);
|
||||
|
||||
projectInfo.activeResourceFiles.removeDuplicates();
|
||||
projectInfo.allResourceFiles.removeDuplicates();
|
||||
|
Reference in New Issue
Block a user