forked from qt-creator/qt-creator
ProjectExplorer: Follow up on too-much-magic in IProjectManager
Use a ProjectManager::registerProjectType<Project>(MimeType) function, removing cryptic IProjectManager object ownership. Change-Id: I212cd25bd4ee757022a8cb0decb4b8de3a112d12 Reviewed-by: Tobias Hunger <tobias.hunger@qt.io>
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
#include "jsonwizardscannergenerator.h"
|
||||
|
||||
#include "../projectexplorer.h"
|
||||
#include "../iprojectmanager.h"
|
||||
#include "../projectmanager.h"
|
||||
#include "jsonwizard.h"
|
||||
#include "jsonwizardfactory.h"
|
||||
|
||||
@@ -105,7 +105,7 @@ Core::GeneratedFiles JsonWizardScannerGenerator::fileList(Utils::MacroExpander *
|
||||
for (auto it = result.begin(); it != result.end(); ++it) {
|
||||
const QString relPath = project.relativeFilePath(it->path());
|
||||
it->setBinary(binaryPattern.match(relPath).hasMatch());
|
||||
bool found = IProjectManager::managerForMimeType(Utils::mimeTypeForFile(relPath));
|
||||
bool found = ProjectManager::canOpenProjectForMimeType(Utils::mimeTypeForFile(relPath));
|
||||
if (found && !(onlyFirst && projectCount++))
|
||||
it->setAttributes(it->attributes() | Core::GeneratedFile::OpenProjectAttribute);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user