Commit 5476bcf5 authored by Daniel Molkentin's avatar Daniel Molkentin

Find Qt installation by specification of qmake rather than a "Qt dir".

Rationale: The concept of a "Qt Dir" is dead ever since Qt can be
installed. Specifying the qmake location otoh makes it possible to
unambigously detect all parts of a Qt installation.
parent 267ef8ec
......@@ -62,10 +62,10 @@ bool DebuggingHelperLibrary::hasDebuggingHelperLibrary(const QString &qmakePath)
return !debuggingHelperLibrary(qmakePath).isNull();
}
QStringList DebuggingHelperLibrary::debuggingHelperLibraryDirectories(const QString &qtInstallData, const QString &qtpath)
QStringList DebuggingHelperLibrary::debuggingHelperLibraryDirectories(const QString &qtInstallData)
{
const QChar slash = QLatin1Char('/');
const uint hash = qHash(qtpath);
const uint hash = qHash(qtInstallData);
QStringList directories;
directories
<< (qtInstallData + QLatin1String("/qtc-debugging-helper/"))
......@@ -76,12 +76,12 @@ QStringList DebuggingHelperLibrary::debuggingHelperLibraryDirectories(const QStr
QStringList DebuggingHelperLibrary::debuggingHelperLibraryLocations(const QString &qmakePath)
{
return debuggingHelperLibraryLocations(qtInstallDataDir(qmakePath), qtDir(qmakePath));
return debuggingHelperLibraryLocationsByInstallData(qtInstallDataDir(qmakePath));
}
QString DebuggingHelperLibrary::debuggingHelperLibrary(const QString &qmakePath)
{
return debuggingHelperLibrary(qtInstallDataDir(qmakePath), qtDir(qmakePath));
return debuggingHelperLibraryByInstallData(qtInstallDataDir(qmakePath));
}
QString DebuggingHelperLibrary::qtInstallDataDir(const QString &qmakePath)
......@@ -113,17 +113,17 @@ static inline QString helperFilePath(const QString &directory)
#endif
}
QStringList DebuggingHelperLibrary::debuggingHelperLibraryLocations(const QString &qtInstallData, const QString &qtpath)
QStringList DebuggingHelperLibrary::debuggingHelperLibraryLocationsByInstallData(const QString &qtInstallData)
{
QStringList result;
foreach(const QString &directory, debuggingHelperLibraryDirectories(qtInstallData, qtpath))
foreach(const QString &directory, debuggingHelperLibraryDirectories(qtInstallData))
result << QFileInfo(helperFilePath(directory)).filePath();
return result;
}
QString DebuggingHelperLibrary::debuggingHelperLibrary(const QString &qtInstallData, const QString &qtpath)
QString DebuggingHelperLibrary::debuggingHelperLibraryByInstallData(const QString &qtInstallData)
{
foreach(const QString &directory, debuggingHelperLibraryDirectories(qtInstallData, qtpath)) {
foreach(const QString &directory, debuggingHelperLibraryDirectories(qtInstallData)) {
const QFileInfo fi(helperFilePath(directory));
if (fi.exists())
return fi.filePath();
......@@ -134,7 +134,7 @@ QString DebuggingHelperLibrary::debuggingHelperLibrary(const QString &qtInstallD
QString DebuggingHelperLibrary::buildDebuggingHelperLibrary(const QString &qmakePath, const QString &make, const Environment &env)
{
QString errorMessage;
const QString directory = copyDebuggingHelperLibrary(qtInstallDataDir(qmakePath), qtDir(qmakePath), &errorMessage);
const QString directory = copyDebuggingHelperLibrary(qtInstallDataDir(qmakePath), &errorMessage);
if (directory.isEmpty())
return errorMessage;
return buildDebuggingHelperLibrary(directory, make, qmakePath, QString::null, env);
......@@ -171,14 +171,13 @@ static bool copyDebuggingHelperFiles(const QStringList &files,
}
QString DebuggingHelperLibrary::copyDebuggingHelperLibrary(const QString &qtInstallData,
const QString &qtdir,
QString *errorMessage)
{
// Locations to try:
// $QTDIR/qtc-debugging-helper
// $APPLICATION-DIR/qtc-debugging-helper/$hash
// $USERDIR/qtc-debugging-helper/$hash
const QStringList directories = DebuggingHelperLibrary::debuggingHelperLibraryDirectories(qtInstallData, qtdir);
const QStringList directories = DebuggingHelperLibrary::debuggingHelperLibraryDirectories(qtInstallData);
QStringList files;
files << QLatin1String("gdbmacros.cpp") << QLatin1String("gdbmacros_p.h") << QLatin1String("gdbmacros.h") << QLatin1String("gdbmacros.pro")
......@@ -241,13 +240,18 @@ QString DebuggingHelperLibrary::buildDebuggingHelperLibrary(const QString &direc
}
return output;
}
#include <QDebug>
QString DebuggingHelperLibrary::qtVersionForQMake(const QString &qmakePath)
{
QString binary = qmakePath.mid(qmakePath.lastIndexOf('/')+1);
qDebug() << qmakePath << binary;
if (!possibleQMakeCommands().contains(binary))
return QString();
QProcess qmake;
qmake.start(qmakePath, QStringList(QLatin1String("--version")));
if (!qmake.waitForFinished())
return false;
return QString::null;
QString output = qmake.readAllStandardOutput();
QRegExp regexp(QLatin1String("(QMake version|QMake version:)[\\s]*([\\d.]*)"), Qt::CaseInsensitive);
regexp.indexIn(output);
......
......@@ -51,20 +51,20 @@ public:
static bool hasDebuggingHelperLibrary(const QString &qmakePath);
static QString debuggingHelperLibrary(const QString &qmakePath);
static QString debuggingHelperLibrary(const QString &qtInstallData, const QString &qtpath);
static QString debuggingHelperLibraryByInstallData(const QString &qtInstallData);
static QString buildDebuggingHelperLibrary(const QString &qmakePath, const QString &make, const Environment &env);
static QString buildDebuggingHelperLibrary(const QString &directory, const QString &makeCommand, const QString &qmakeCommand, const QString &mkspec, const Environment &env);
// Build the helpers and return the output log/errormessage.
static QStringList debuggingHelperLibraryLocations(const QString &qmakePath);
static QStringList debuggingHelperLibraryLocations(const QString &qtInstallData, const QString &qtpath);
static QStringList debuggingHelperLibraryLocationsByInstallData(const QString &qtInstallData);
// Copy the source files to a target location and return the chosen target location.
static QString copyDebuggingHelperLibrary(const QString &qtInstallData, const QString &qtdir, QString *errorMessage);
static QString copyDebuggingHelperLibrary(const QString &qtInstallData, QString *errorMessage);
private:
static QStringList debuggingHelperLibraryDirectories(const QString &qtInstallData, const QString &qtpath);
static QStringList debuggingHelperLibraryDirectories(const QString &qtInstallData);
static QString qtInstallDataDir(const QString &qmakePath);
static QString qtDir(const QString &qmakePath);
};
......
......@@ -50,15 +50,15 @@ ProjectLoadWizard::ProjectLoadWizard(Qt4Project *project, QWidget *parent, Qt::W
{
QtVersionManager * vm = QtVersionManager::instance();
QString directory = QFileInfo(project->file()->fileName()).absolutePath();
QString importVersion = QtVersionManager::findQtVersionFromMakefile(directory);
QString importVersion = QtVersionManager::findQMakeBinaryFromMakefile(directory);
if (!importVersion.isNull()) {
// This also means we have a build in there
// First get the qt version
m_importVersion = vm->qtVersionForDirectory(importVersion);
m_importVersion = vm->qtVersionForQMakeBinary(importVersion);
// Okay does not yet exist, create
if (!m_importVersion) {
m_importVersion = new QtVersion(QFileInfo(importVersion).baseName(), importVersion);
m_importVersion = new QtVersion(importVersion);
m_temporaryVersion = true;
}
......@@ -209,7 +209,7 @@ void ProjectLoadWizard::setupImportPage(QtVersion *version, QtVersion::QmakeBuil
QVBoxLayout *importLayout = new QVBoxLayout(importPage);
importLabel = new QLabel(importPage);
QString versionString = version->name() + " (" + QDir::toNativeSeparators(version->path()) + ")";
QString versionString = version->name() + " (" + QDir::toNativeSeparators(version->qmakeCommand()) + ")";
QString buildConfigString = (buildConfig & QtVersion::BuildAll) ? QLatin1String("debug_and_release ") : QLatin1String("");
buildConfigString.append((buildConfig & QtVersion::DebugBuild) ? QLatin1String("debug") : QLatin1String("release"));
importLabel->setTextFormat(Qt::RichText);
......@@ -231,8 +231,8 @@ void ProjectLoadWizard::setupImportPage(QtVersion *version, QtVersion::QmakeBuil
import2Label = new QLabel(importPage);
import2Label->setTextFormat(Qt::RichText);
if (m_temporaryVersion)
import2Label->setText(tr("<b>Note:</b> Importing the settings will automatically add the Qt Version from:<br><b>%1</b> to the list of Qt versions.")
.arg(QDir::toNativeSeparators(m_importVersion->path())));
import2Label->setText(tr("<b>Note:</b> Importing the settings will automatically add the Qt Version identified by <br><b>%1</b> to the list of Qt versions.")
.arg(QDir::toNativeSeparators(m_importVersion->qmakeCommand())));
importLayout->addWidget(import2Label);
addPage(importPage);
}
......
......@@ -114,8 +114,8 @@ bool QMakeStep::init(const QString &name)
// Check wheter we need to run qmake
bool needToRunQMake = true;
if (QDir(workingDirectory).exists(QLatin1String("Makefile"))) {
QString qtPath = QtVersionManager::findQtVersionFromMakefile(workingDirectory);
if (qtVersion->path() == qtPath) {
QString qmakePath = QtVersionManager::findQMakeBinaryFromMakefile(workingDirectory);
if (qtVersion->qmakeCommand() == qmakePath) {
needToRunQMake = !m_pro->compareBuildConfigurationToImportFrom(name, workingDirectory);
}
}
......
......@@ -552,7 +552,7 @@ void S60DeviceRunControl::start()
m_targetName = rc->targetName();
m_baseFileName = rc->basePackageFilePath();
m_workingDirectory = QFileInfo(m_baseFileName).absolutePath();
m_qtDir = project->qtVersion(project->activeBuildConfiguration())->path();
m_qtDir = project->qtVersion(project->activeBuildConfiguration())->versionInfo().value("QT_INSTALL_DATA");
m_useCustomSignature = (rc->signingMode() == S60DeviceRunConfiguration::SignCustom);
m_customSignaturePath = rc->customSignaturePath();
m_customKeyPath = rc->customKeyPath();
......
......@@ -124,7 +124,7 @@ void S60Manager::updateQtVersions()
}
if (deviceVersion) {
deviceVersion->setName(QString("%1 (Qt %2)").arg(device.id, deviceVersion->qtVersionString()));
deviceVersion->setPath(device.qt);
deviceVersion->setQMakeCommand(device.qt+"/bin/qmake.exe");
handledVersions.append(deviceVersion);
} else {
deviceVersion = new QtVersion(QString("%1 (Qt %2)").arg(device.id), device.qt,
......@@ -171,8 +171,9 @@ S60Devices::Device S60Manager::deviceForQtVersion(const Qt4ProjectManager::QtVer
deviceId = deviceIdFromDetectionSource(version->autodetectionSource());
if (deviceId.isEmpty()) { // it's not an s60 autodetected version
// have a look if we find the device root anyhow
if (QFile::exists(QString::fromLatin1("%1/epoc32").arg(version->path()))) {
device.epocRoot = version->path();
QString qtPath = version->versionInfo().value("QT_INSTALL_DATA");
if (QFile::exists(QString::fromLatin1("%1/epoc32").arg(qtPath))) {
device.epocRoot = qtPath;
device.toolsRoot = device.epocRoot;
device.qt = device.epocRoot;
device.isDefault = false;
......
......@@ -831,7 +831,7 @@ QString Qt4Project::qtDir(const QString &buildConfiguration) const
{
QtVersion *version = qtVersion(buildConfiguration);
if (version)
return version->path();
return version->versionInfo().value("QT_INSTALL_DATA");
return QString::null;
}
......@@ -1151,9 +1151,9 @@ bool Qt4Project::compareBuildConfigurationToImportFrom(const QString &buildConfi
{
QMakeStep *qs = qmakeStep();
if (QDir(workingDirectory).exists(QLatin1String("Makefile")) && qs) {
QString qtPath = QtVersionManager::findQtVersionFromMakefile(workingDirectory);
QString qmakePath = QtVersionManager::findQMakeBinaryFromMakefile(workingDirectory);
QtVersion *version = qtVersion(buildConfiguration);
if (version->path() == qtPath) {
if (version->qmakeCommand() == qmakePath) {
// same qtversion
QPair<QtVersion::QmakeBuildConfig, QStringList> result =
QtVersionManager::scanMakeFile(workingDirectory, version->defaultBuildConfig());
......
......@@ -257,12 +257,12 @@ void Qt4ProjectConfigWidget::updateImportLabel()
// we only show if we actually have a qmake and makestep
if (m_pro->qmakeStep() && m_pro->makeStep()) {
QString qtPath = QtVersionManager::findQtVersionFromMakefile(m_pro->buildDirectory(m_buildConfiguration));
QString qmakePath = QtVersionManager::findQMakeBinaryFromMakefile(m_pro->buildDirectory(m_buildConfiguration));
QtVersion *version = m_pro->qtVersion(m_buildConfiguration);
// check that there's a makefile
if (!qtPath.isEmpty()) {
// and that the makefile path is different from the current version
if (qtPath != (version ? version->path() : QString())) {
if (!qmakePath.isEmpty()) {
// and that the qmake path is different from the current version
if (qmakePath != (version ? version->qmakeCommand() : QString())) {
// import enable
visible = true;
} else {
......@@ -297,12 +297,12 @@ void Qt4ProjectConfigWidget::importLabelClicked()
return;
QString directory = m_pro->buildDirectory(m_buildConfiguration);
if (!directory.isEmpty()) {
QString qtPath = QtVersionManager::findQtVersionFromMakefile(directory);
if (!qtPath.isEmpty()) {
QString qmakePath = QtVersionManager::findQMakeBinaryFromMakefile(directory);
if (!qmakePath.isEmpty()) {
QtVersionManager *vm = QtVersionManager::instance();
QtVersion *version = vm->qtVersionForDirectory(qtPath);
QtVersion *version = vm->qtVersionForQMakeBinary(qmakePath);
if (!version) {
version = new QtVersion(QFileInfo(qtPath).baseName(), qtPath);
version = new QtVersion(qmakePath);
vm->addVersion(version);
}
......
......@@ -4,6 +4,7 @@
#include "qt4projectmanagerconstants.h"
#include "qtversionmanager.h"
#include <projectexplorer/debugginghelper.h>
#include <coreplugin/coreconstants.h>
#include <coreplugin/icore.h>
#include <coreplugin/progressmanager/progressmanager.h>
......@@ -102,7 +103,7 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent, QList<QtVersion *> ver
, m_debuggingHelperOkIcon(m_debuggingHelperOkPixmap)
, m_debuggingHelperErrorIcon(m_debuggingHelperErrorPixmap)
, m_specifyNameString(tr("<specify a name>"))
, m_specifyPathString(tr("<specify a path>"))
, m_specifyPathString(tr("<specify a qmake location>"))
, m_ui(new Internal::Ui::QtVersionManager())
, m_defaultVersion(versions.indexOf(defaultVersion))
{
......@@ -111,10 +112,10 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent, QList<QtVersion *> ver
m_versions.push_back(QSharedPointerQtVersion(new QtVersion(*version)));
m_ui->setupUi(this);
m_ui->qtPath->setExpectedKind(Core::Utils::PathChooser::Directory);
m_ui->qtPath->setPromptDialogTitle(tr("Select QTDIR"));
m_ui->qmakePath->setExpectedKind(Core::Utils::PathChooser::File);
m_ui->qmakePath->setPromptDialogTitle(tr("Select QMake Executable"));
m_ui->mingwPath->setExpectedKind(Core::Utils::PathChooser::Directory);
m_ui->qtPath->setPromptDialogTitle(tr("Select the Qt Directory"));
m_ui->mingwPath->setPromptDialogTitle(tr("Select the MinGW Directory"));
m_ui->mwcPath->setExpectedKind(Core::Utils::PathChooser::Directory);
m_ui->mwcPath->setPromptDialogTitle(tr("Select \"x86build\" Directory from Carbide Install"));
......@@ -136,7 +137,7 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent, QList<QtVersion *> ver
const QtVersion * const version = m_versions.at(i).data();
QTreeWidgetItem *item = new QTreeWidgetItem(version->isAutodetected()? autoItem : manualItem);
item->setText(0, version->name());
item->setText(1, QDir::toNativeSeparators(version->path()));
item->setText(1, QDir::toNativeSeparators(version->qmakeCommand()));
item->setData(0, Qt::UserRole, version->uniqueId());
if (version->isValid()) {
......@@ -155,8 +156,8 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent, QList<QtVersion *> ver
this, SLOT(updateCurrentQtName()));
connect(m_ui->qtPath, SIGNAL(changed(QString)),
this, SLOT(updateCurrentQtPath()));
connect(m_ui->qmakePath, SIGNAL(changed(QString)),
this, SLOT(updateCurrentQMakeLocation()));
connect(m_ui->mingwPath, SIGNAL(changed(QString)),
this, SLOT(updateCurrentMingwDirectory()));
#ifdef QTCREATOR_WITH_S60
......@@ -169,7 +170,7 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent, QList<QtVersion *> ver
connect(m_ui->delButton, SIGNAL(clicked()),
this, SLOT(removeQtDir()));
connect(m_ui->qtPath, SIGNAL(browsingFinished()),
connect(m_ui->qmakePath, SIGNAL(browsingFinished()),
this, SLOT(onQtBrowsed()));
connect(m_ui->mingwPath, SIGNAL(browsingFinished()),
this, SLOT(onMingwBrowsed()));
......@@ -284,14 +285,14 @@ void QtOptionsPageWidget::addQtDir()
QTreeWidgetItem *item = new QTreeWidgetItem(m_ui->qtdirList->topLevelItem(1));
item->setText(0, newVersion->name());
item->setText(1, QDir::toNativeSeparators(newVersion->path()));
item->setText(1, QDir::toNativeSeparators(newVersion->qmakeCommand()));
item->setData(0, Qt::UserRole, newVersion->uniqueId());
item->setData(2, Qt::DecorationRole, QIcon());
m_ui->qtdirList->setCurrentItem(item);
m_ui->nameEdit->setText(newVersion->name());
m_ui->qtPath->setPath(newVersion->path());
m_ui->qmakePath->setPath(newVersion->qmakeCommand());
m_ui->defaultCombo->addItem(newVersion->name());
m_ui->nameEdit->setFocus();
m_ui->nameEdit->selectAll();
......@@ -355,7 +356,7 @@ void QtOptionsPageWidget::updateState()
const bool isAutodetected = enabled && version->isAutodetected();
m_ui->delButton->setEnabled(enabled && !isAutodetected);
m_ui->nameEdit->setEnabled(enabled && !isAutodetected);
m_ui->qtPath->setEnabled(enabled && !isAutodetected);
m_ui->qmakePath->setEnabled(enabled && !isAutodetected);
m_ui->mingwPath->setEnabled(enabled);
const bool hasLog = enabled && !m_ui->qtdirList->currentItem()->data(2, Qt::UserRole).toString().isEmpty();
......@@ -433,10 +434,10 @@ void QtOptionsPageWidget::showEnvironmentPage(QTreeWidgetItem *item)
makeMingwVisible(false);
makeMWCVisible(false);
if (!m_versions.at(index)->isInstalled())
m_ui->errorLabel->setText(tr("The Qt Version %1 is not installed. Run make install")
.arg(QDir::toNativeSeparators(m_versions.at(index)->path())));
m_ui->errorLabel->setText(tr("The Qt Version identified by %1 is not installed. Run make install")
.arg(QDir::toNativeSeparators(m_versions.at(index)->qmakeCommand())));
else
m_ui->errorLabel->setText(tr("%1 is not a valid Qt directory").arg(QDir::toNativeSeparators(m_versions.at(index)->path())));
m_ui->errorLabel->setText(tr("%1 does not specify a valid Qt installation").arg(QDir::toNativeSeparators(m_versions.at(index)->qmakeCommand())));
} else { //ProjectExplorer::ToolChain::GCC
makeMSVCVisible(false);
makeMingwVisible(false);
......@@ -487,10 +488,10 @@ void QtOptionsPageWidget::versionChanged(QTreeWidgetItem *item, QTreeWidgetItem
int itemIndex = indexForTreeItem(item);
if (itemIndex >= 0) {
m_ui->nameEdit->setText(item->text(0));
m_ui->qtPath->setPath(item->text(1));
m_ui->qmakePath->setPath(item->text(1));
} else {
m_ui->nameEdit->clear();
m_ui->qtPath->setPath(QString()); // clear()
m_ui->qmakePath->setPath(QString()); // clear()
}
showEnvironmentPage(item);
updateState();
......@@ -498,15 +499,15 @@ void QtOptionsPageWidget::versionChanged(QTreeWidgetItem *item, QTreeWidgetItem
void QtOptionsPageWidget::onQtBrowsed()
{
const QString dir = m_ui->qtPath->path();
const QString dir = m_ui->qmakePath->path();
if (dir.isEmpty())
return;
updateCurrentQtPath();
updateCurrentQMakeLocation();
if (m_ui->nameEdit->text().isEmpty() || m_ui->nameEdit->text() == m_specifyNameString) {
QStringList dirSegments = dir.split(QDir::separator(), QString::SkipEmptyParts);
if (!dirSegments.isEmpty())
m_ui->nameEdit->setText(dirSegments.last());
QString name = ProjectExplorer::DebuggingHelperLibrary::qtVersionForQMake(QDir::cleanPath(dir));
if (!name.isEmpty())
m_ui->nameEdit->setText(name);
updateCurrentQtName();
}
updateState();
......@@ -587,7 +588,7 @@ void QtOptionsPageWidget::fixQtVersionName(int index)
}
}
void QtOptionsPageWidget::updateCurrentQtPath()
void QtOptionsPageWidget::updateCurrentQMakeLocation()
{
QTreeWidgetItem *currentItem = m_ui->qtdirList->currentItem();
Q_ASSERT(currentItem);
......@@ -595,10 +596,10 @@ void QtOptionsPageWidget::updateCurrentQtPath()
if (currentItemIndex < 0)
return;
QtVersion *version = m_versions.at(currentItemIndex).data();
if (version->path() == m_ui->qtPath->path())
if (version->qmakeCommand() == m_ui->qmakePath->path())
return;
version->setPath(m_ui->qtPath->path());
currentItem->setText(1, QDir::toNativeSeparators(version->path()));
version->setQMakeCommand(m_ui->qmakePath->path());
currentItem->setText(1, QDir::toNativeSeparators(version->qmakeCommand()));
showEnvironmentPage(currentItem);
if (version->isValid()) {
......
......@@ -113,7 +113,7 @@ private slots:
void onMingwBrowsed();
void defaultChanged(int index);
void updateCurrentQtName();
void updateCurrentQtPath();
void updateCurrentQMakeLocation();
void updateCurrentMingwDirectory();
#ifdef QTCREATOR_WITH_S60
void updateCurrentMwcDirectory();
......
......@@ -50,11 +50,14 @@ class QtVersion
public:
QtVersion(const QString &name, const QString &path,
bool isAutodetected = false, const QString &autodetectionSource = QString());
QtVersion(const QString &path, bool isAutodetected = false, const QString &autodetectionSource = QString());
QtVersion(const QString &name, const QString &path, int id,
bool isAutodetected = false, const QString &autodetectionSource = QString());
QtVersion()
:m_name(QString::null), m_id(-1)
{ setPath(QString::null); }
{ setQMakeCommand(QString::null); }
~QtVersion();
bool isValid() const; //TOOD check that the dir exists and the name is non empty
......@@ -63,7 +66,6 @@ public:
QString autodetectionSource() const { return m_autodetectionSource; }
QString name() const;
QString path() const;
QString sourcePath() const;
QString mkspecPath() const;
QString qmakeCommand() const;
......@@ -77,7 +79,7 @@ public:
ProjectExplorer::ToolChain *createToolChain(ProjectExplorer::ToolChain::ToolChainType type) const;
void setName(const QString &name);
void setPath(const QString &path);
void setQMakeCommand(const QString &path);
QString qtVersionString() const;
// Returns the PREFIX, BINPREFIX, DOCPREFIX and similar information
......@@ -132,7 +134,6 @@ private:
QString qmakeCXX() const;
QString findQtBinary(const QStringList &possibleName) const;
QString m_name;
QString m_path;
QString m_sourcePath;
QString m_mingwDirectory;
QString m_msvcVersion;
......@@ -190,14 +191,14 @@ public:
QtVersion *version(int id) const;
QtVersion *defaultVersion() const;
QtVersion *qtVersionForDirectory(const QString &directory);
QtVersion *qtVersionForQMakeBinary(const QString &qmakePath);
// Used by the projectloadwizard
void addVersion(QtVersion *version);
void removeVersion(QtVersion *version);
// Static Methods
static QPair<QtVersion::QmakeBuildConfig, QStringList> scanMakeFile(const QString &directory, QtVersion::QmakeBuildConfig defaultBuildConfig);
static QString findQtVersionFromMakefile(const QString &directory);
static QString findQMakeBinaryFromMakefile(const QString &directory);
signals:
void defaultQtVersionChanged();
void qtVersionsChanged();
......
......@@ -146,7 +146,7 @@ p, li { white-space: pre-wrap; }
</column>
<column>
<property name="text">
<string>Path</string>
<string>QMake Location</string>
</property>
</column>
<column>
......@@ -169,12 +169,12 @@ p, li { white-space: pre-wrap; }
<item row="2" column="0">
<widget class="QLabel" name="pathLabel">
<property name="text">
<string>Path:</string>
<string>Path to QMake:</string>
</property>
</widget>
</item>
<item row="2" column="1">
<widget class="Core::Utils::PathChooser" name="qtPath"/>
<widget class="Core::Utils::PathChooser" name="qmakePath" native="true"/>
</item>
<item row="3" column="0">
<widget class="QLabel" name="mingwLabel">
......@@ -184,7 +184,7 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="3" column="1">
<widget class="Core::Utils::PathChooser" name="mingwPath"/>
<widget class="Core::Utils::PathChooser" name="mingwPath" native="true"/>
</item>
<item row="4" column="0">
<widget class="QLabel" name="msvcLabel">
......@@ -215,21 +215,9 @@ p, li { white-space: pre-wrap; }
</widget>
</item>
<item row="5" column="1">
<widget class="Core::Utils::PathChooser" name="mwcPath"/>
<widget class="Core::Utils::PathChooser" name="mwcPath" native="true"/>
</item>
</layout>
<zorder>qtdirList</zorder>
<zorder>versionNameLabel</zorder>
<zorder>nameEdit</zorder>
<zorder>pathLabel</zorder>
<zorder>qtPath</zorder>
<zorder>mingwLabel</zorder>
<zorder>mingwPath</zorder>
<zorder>msvcLabel</zorder>
<zorder>debuggingHelperLabel</zorder>
<zorder>errorLabel</zorder>
<zorder>mwcLabel</zorder>
<zorder>mwcPath</zorder>
</widget>
</item>
<item>
......@@ -268,7 +256,7 @@ p, li { white-space: pre-wrap; }
<tabstop>addButton</tabstop>
<tabstop>delButton</tabstop>
<tabstop>nameEdit</tabstop>
<tabstop>qtPath</tabstop>
<tabstop>qmakePath</tabstop>
<tabstop>mingwPath</tabstop>
<tabstop>msvcComboBox</tabstop>
<tabstop>showLogButton</tabstop>
......
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