Commit 37e382b3 authored by dt's avatar dt

Don't use the QtVersionManger::instance() where it isn't needed.

Allows removing getting the instance once.
parent a2b29a5e
......@@ -52,7 +52,7 @@ ProjectLoadWizard::ProjectLoadWizard(Qt4Project *project, QWidget *parent, Qt::W
{
ProjectExplorer::QtVersionManager * vm = ProjectExplorer::QtVersionManager::instance();
QString directory = QFileInfo(project->file()->fileName()).absolutePath();
QString importVersion = vm->findQtVersionFromMakefile(directory);
QString importVersion = ProjectExplorer::QtVersionManager::findQtVersionFromMakefile(directory);
if (!importVersion.isNull()) {
// This also means we have a build in there
......@@ -65,7 +65,7 @@ ProjectLoadWizard::ProjectLoadWizard(Qt4Project *project, QWidget *parent, Qt::W
}
m_importBuildConfig = m_importVersion->defaultBuildConfig();
m_importBuildConfig= vm->scanMakefileForQmakeConfig(directory, m_importBuildConfig);
m_importBuildConfig= ProjectExplorer::QtVersionManager::scanMakefileForQmakeConfig(directory, m_importBuildConfig);
}
// So now we have the version and the configuration for that version
......
......@@ -184,8 +184,7 @@ void Qt4ProjectConfigWidget::updateImportLabel()
{
m_ui->importLabel->setVisible(false);
if (m_ui->shadowBuildCheckBox->isChecked()) {
ProjectExplorer::QtVersionManager *vm = ProjectExplorer::QtVersionManager::instance();
QString qtPath = vm->findQtVersionFromMakefile(m_ui->shadowBuildDirEdit->path());
QString qtPath = ProjectExplorer::QtVersionManager::findQtVersionFromMakefile(m_ui->shadowBuildDirEdit->path());
if (!qtPath.isEmpty()) {
m_ui->importLabel->setVisible(true);
}
......@@ -219,16 +218,16 @@ void Qt4ProjectConfigWidget::importLabelClicked()
if (m_ui->shadowBuildCheckBox->isChecked()) {
QString directory = m_ui->shadowBuildDirEdit->path();
if (!directory.isEmpty()) {
QtVersionManager *vm = QtVersionManager::instance();
QString qtPath = vm->findQtVersionFromMakefile(directory);
QString qtPath = QtVersionManager::findQtVersionFromMakefile(directory);
if (!qtPath.isEmpty()) {
QtVersionManager *vm = QtVersionManager::instance();
QtVersion *version = vm->qtVersionForDirectory(qtPath);
if (!version) {
version = new QtVersion(QFileInfo(qtPath).baseName(), qtPath);
vm->addVersion(version);
}
QtVersion::QmakeBuildConfig qmakeBuildConfig = version->defaultBuildConfig();
qmakeBuildConfig = vm->scanMakefileForQmakeConfig(directory, qmakeBuildConfig);
qmakeBuildConfig = QtVersionManager::scanMakefileForQmakeConfig(directory, qmakeBuildConfig);
// So we got all the information now apply it...
m_pro->setQtVersion(m_buildConfiguration, version->uniqueId());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment