Commit f5d42871 authored by Daniel Teske's avatar Daniel Teske
Browse files

Use Utils::FileName for various bits in QtVersion



Change-Id: I3afc3a4f2e0dd2671279c2d071779f1d7b277849
Reviewed-by: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent c6936d9e
......@@ -35,6 +35,8 @@
#include "qtsupport_global.h"
#include <utils/fileutils.h>
#include <projectexplorer/abi.h>
#include <projectexplorer/headerpath.h>
#include <projectexplorer/task.h>
......@@ -132,7 +134,7 @@ public:
virtual QHash<QString,QString> versionInfo() const;
virtual void addToEnvironment(Utils::Environment &env) const;
virtual QString sourcePath() const;
virtual Utils::FileName sourcePath() const;
// used by QtUiCodeModelSupport
virtual QString uicCommand() const;
virtual QString designerCommand() const;
......@@ -155,16 +157,16 @@ public:
virtual QString frameworkInstallPath() const;
// former local functions
QString qmakeCommand() const;
Utils::FileName qmakeCommand() const;
virtual QString systemRoot() const;
/// @returns the name of the mkspec
QString mkspec() const;
Utils::FileName mkspec() const;
/// @returns the full path to the default directory
/// specifally not the directory the symlink/ORIGINAL_QMAKESPEC points to
QString mkspecPath() const;
Utils::FileName mkspecPath() const;
bool hasMkspec(const QString &) const;
bool hasMkspec(const Utils::FileName &spec) const;
enum QmakeBuildConfig
{
......@@ -186,9 +188,9 @@ public:
virtual ProjectExplorer::IOutputParser *createOutputParser() const;
static bool queryQMakeVariables(const QString &binary, QHash<QString, QString> *versionInfo);
static bool queryQMakeVariables(const QString &binary, QHash<QString, QString> *versionInfo, bool *qmakeIsExecutable);
static QString mkspecFromVersionInfo(const QHash<QString, QString> &versionInfo);
static bool queryQMakeVariables(const Utils::FileName &binary, QHash<QString, QString> *versionInfo);
static bool queryQMakeVariables(const Utils::FileName &binary, QHash<QString, QString> *versionInfo, bool *qmakeIsExecutable);
static Utils::FileName mkspecFromVersionInfo(const QHash<QString, QString> &versionInfo);
virtual bool supportsBinaryDebuggingHelper() const;
......@@ -208,12 +210,12 @@ public:
virtual QtConfigWidget *createConfigurationWidget() const;
static QString defaultDisplayName(const QString &versionString,
const QString &qmakePath,
const Utils::FileName &qmakePath,
bool fromPath = false);
protected:
BaseQtVersion();
BaseQtVersion(const QString &path, bool isAutodetected = false, const QString &autodetectionSource = QString());
BaseQtVersion(const Utils::FileName &path, bool isAutodetected = false, const QString &autodetectionSource = QString());
virtual QList<ProjectExplorer::Task> reportIssuesImpl(const QString &proFile, const QString &buildDir);
......@@ -226,7 +228,7 @@ protected:
private:
void setAutoDetectionSource(const QString &autodetectionSource);
static int getUniqueId();
void ctor(const QString &qmakePath);
void ctor(const Utils::FileName &qmakePath);
void updateSourcePath() const;
void updateVersionInfo() const;
enum Binaries { QmlViewer, Designer, Linguist, Uic };
......@@ -239,15 +241,15 @@ private:
bool m_isAutodetected;
QString m_autodetectionSource;
mutable QString m_sourcePath;
mutable Utils::FileName m_sourcePath;
mutable bool m_hasDebuggingHelper; // controlled by m_versionInfoUpToDate
mutable bool m_hasQmlDump; // controlled by m_versionInfoUpToDate
mutable bool m_hasQmlDebuggingLibrary; // controlled by m_versionInfoUpdate
mutable bool m_hasQmlObserver; // controlled by m_versionInfoUpToDate
mutable bool m_mkspecUpToDate;
mutable QString m_mkspec;
mutable QString m_mkspecFullPath;
mutable Utils::FileName m_mkspec;
mutable Utils::FileName m_mkspecFullPath;
mutable bool m_mkspecReadUpToDate;
mutable bool m_defaultConfigIsDebug;
......@@ -261,7 +263,7 @@ private:
mutable bool m_hasDemos;
mutable bool m_hasDocumentation;
mutable QString m_qmakeCommand;
mutable Utils::FileName m_qmakeCommand;
mutable QString m_qtVersionString;
mutable QString m_uicCommand;
mutable QString m_designerCommand;
......
......@@ -111,8 +111,8 @@ DebuggingHelperBuildTask::DebuggingHelperBuildTask(const BaseQtVersion *version,
m_mkspec = version->mkspec();
// Make sure QtVersion cache is invalidated
connect(this, SIGNAL(updateQtVersions(QString)),
QtVersionManager::instance(), SLOT(updateDumpFor(QString)),
connect(this, SIGNAL(updateQtVersions(Utils::FileName)),
QtVersionManager::instance(), SLOT(updateDumpFor(Utils::FileName)),
Qt::QueuedConnection);
}
......
......@@ -35,6 +35,7 @@
#include "qtsupport_global.h"
#include <utils/environment.h>
#include <utils/fileutils.h>
#include <projectexplorer/toolchain.h>
#include <QtCore/QObject>
......@@ -77,7 +78,7 @@ signals:
// used internally
void logOutput(const QString &output, bool bringToForeground);
void updateQtVersions(const QString &qmakeCommand);
void updateQtVersions(const Utils::FileName &qmakeCommand);
private:
bool buildDebuggingHelper(QFutureInterface<void> &future);
......@@ -88,10 +89,10 @@ private:
int m_qtId;
QString m_qtInstallData;
QString m_target;
QString m_qmakeCommand;
Utils::FileName m_qmakeCommand;
QString m_makeCommand;
QStringList m_makeArguments;
QString m_mkspec;
Utils::FileName m_mkspec;
Utils::Environment m_environment;
QString m_log;
bool m_invalidQt;
......
......@@ -174,7 +174,7 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent, QList<BaseQtVersion *>
BaseQtVersion *version = m_versions.at(i);
QTreeWidgetItem *item = new QTreeWidgetItem(version->isAutodetected()? autoItem : manualItem);
item->setText(0, version->displayName());
item->setText(1, QDir::toNativeSeparators(version->qmakeCommand()));
item->setText(1, version->qmakeCommand().toUserOutput());
item->setData(0, VersionIdRole, version->uniqueId());
item->setData(0, ToolChainIdRole, defaultToolChainId(version));
const ValidityInfo info = validInformation(version);
......@@ -216,8 +216,8 @@ QtOptionsPageWidget::QtOptionsPageWidget(QWidget *parent, QList<BaseQtVersion *>
userChangedCurrentVersion();
updateCleanUpButton();
connect(QtVersionManager::instance(), SIGNAL(dumpUpdatedFor(QString)),
this, SLOT(qtVersionsDumpUpdated(QString)));
connect(QtVersionManager::instance(), SIGNAL(dumpUpdatedFor(Utils::FileName)),
this, SLOT(qtVersionsDumpUpdated(Utils::FileName)));
connect(ProjectExplorer::ToolChainManager::instance(), SIGNAL(toolChainsChanged()),
this, SLOT(toolChainsUpdated()));
......@@ -359,7 +359,7 @@ void QtOptionsPageWidget::selectedToolChainChanged(int comboIndex)
item->setData(0, ToolChainIdRole, toolChainId);
}
void QtOptionsPageWidget::qtVersionsDumpUpdated(const QString &qmakeCommand)
void QtOptionsPageWidget::qtVersionsDumpUpdated(const Utils::FileName &qmakeCommand)
{
foreach (BaseQtVersion *version, m_versions) {
if (version->qmakeCommand() == qmakeCommand)
......@@ -592,9 +592,11 @@ static QString filterForQmakeFileDialog()
void QtOptionsPageWidget::addQtDir()
{
QString qtVersion = QFileDialog::getOpenFileName(this,
tr("Select a qmake executable"),
QString(), filterForQmakeFileDialog());
Utils::FileName qtVersion = Utils::FileName::fromString(
QFileDialog::getOpenFileName(this,
tr("Select a qmake executable"),
QString(),
filterForQmakeFileDialog()));
if (qtVersion.isNull())
return;
if (QtVersionManager::instance()->qtVersionForQMakeBinary(qtVersion)) {
......@@ -607,7 +609,7 @@ void QtOptionsPageWidget::addQtDir()
QTreeWidgetItem *item = new QTreeWidgetItem(m_ui->qtdirList->topLevelItem(1));
item->setText(0, version->displayName());
item->setText(1, QDir::toNativeSeparators(version->qmakeCommand()));
item->setText(1, version->qmakeCommand().toUserOutput());
item->setData(0, VersionIdRole, version->uniqueId());
item->setData(0, ToolChainIdRole, defaultToolChainId(version));
item->setIcon(0, version->isValid()? m_validVersionIcon : m_invalidVersionIcon);
......@@ -636,10 +638,11 @@ void QtOptionsPageWidget::removeQtDir()
void QtOptionsPageWidget::editPath()
{
BaseQtVersion *current = currentVersion();
QString dir = QFileInfo(currentVersion()->qmakeCommand()).absolutePath();
QString qtVersion = QFileDialog::getOpenFileName(this,
tr("Select a qmake executable"),
dir, filterForQmakeFileDialog());
QString dir = currentVersion()->qmakeCommand().toFileInfo().absolutePath();
Utils::FileName qtVersion = Utils::FileName::fromString(
QFileDialog::getOpenFileName(this,
tr("Select a qmake executable"),
dir, filterForQmakeFileDialog()));
if (qtVersion.isNull())
return;
BaseQtVersion *version = QtVersionFactory::createQtVersionFromQMakePath(qtVersion);
......@@ -665,7 +668,7 @@ void QtOptionsPageWidget::editPath()
userChangedCurrentVersion();
QTreeWidgetItem *item = m_ui->qtdirList->currentItem();
item->setText(0, version->displayName());
item->setText(1, QDir::toNativeSeparators(version->qmakeCommand()));
item->setText(1, version->qmakeCommand().toUserOutput());
item->setData(0, VersionIdRole, version->uniqueId());
item->setData(0, ToolChainIdRole, defaultToolChainId(version));
item->setIcon(0, version->isValid()? m_validVersionIcon : m_invalidVersionIcon);
......@@ -934,7 +937,7 @@ void QtOptionsPageWidget::updateWidgets()
BaseQtVersion *version = currentVersion();
if (version) {
m_versionUi->nameEdit->setText(version->displayName());
m_versionUi->qmakePath->setText(QDir::toNativeSeparators(version->qmakeCommand()));
m_versionUi->qmakePath->setText(version->qmakeCommand().toUserOutput());
m_configurationWidget = version->createConfigurationWidget();
if (m_configurationWidget) {
m_versionUi->formLayout->addRow(m_configurationWidget);
......
......@@ -117,7 +117,7 @@ private slots:
void toolChainsUpdated();
void selectedToolChainChanged(int index);
void qtVersionsDumpUpdated(const QString &qmakeCommand);
void qtVersionsDumpUpdated(const Utils::FileName &qmakeCommand);
void handleDebuggingHelperExpanded(bool expanded);
private:
......
......@@ -57,7 +57,7 @@ bool sortByPriority(QtVersionFactory *a, QtVersionFactory *b)
return a->priority() > b->priority();
}
BaseQtVersion *QtVersionFactory::createQtVersionFromLegacySettings(const QString &qmakePath, int id, QSettings *s)
BaseQtVersion *QtVersionFactory::createQtVersionFromLegacySettings(const Utils::FileName &qmakePath, int id, QSettings *s)
{
BaseQtVersion *v = createQtVersionFromQMakePath(qmakePath);
if (!v)
......@@ -68,13 +68,13 @@ BaseQtVersion *QtVersionFactory::createQtVersionFromLegacySettings(const QString
return v;
}
BaseQtVersion *QtVersionFactory::createQtVersionFromQMakePath(const QString &qmakePath, bool isAutoDetected, const QString &autoDetectionSource)
BaseQtVersion *QtVersionFactory::createQtVersionFromQMakePath(const Utils::FileName &qmakePath, bool isAutoDetected, const QString &autoDetectionSource)
{
QHash<QString, QString> versionInfo;
bool success = BaseQtVersion::queryQMakeVariables(qmakePath, &versionInfo);
if (!success)
return 0;
QString mkspec = BaseQtVersion::mkspecFromVersionInfo(versionInfo);
Utils::FileName mkspec = BaseQtVersion::mkspecFromVersionInfo(versionInfo);
ProFileOption option;
option.properties = versionInfo;
......@@ -82,7 +82,7 @@ BaseQtVersion *QtVersionFactory::createQtVersionFromQMakePath(const QString &qma
ProFileCacheManager::instance()->incRefCount();
ProFileParser parser(ProFileCacheManager::instance()->cache(), &msgHandler);
ProFileEvaluator evaluator(&option, &parser, &msgHandler);
if (ProFile *pro = parser.parsedProFile(mkspec + "/qmake.conf")) {
if (ProFile *pro = parser.parsedProFile(mkspec.toString() + "/qmake.conf")) {
evaluator.setCumulative(false);
evaluator.accept(pro, ProFileEvaluator::LoadProOnly);
pro->deref();
......
......@@ -35,6 +35,7 @@
#include "qtsupport_global.h"
#include <utils/fileutils.h>
#include <QtCore/QObject>
#include <QtCore/QVariantMap>
......@@ -59,10 +60,10 @@ public:
/// a qtversion, the priority of the desktop factory is 0 and
/// the desktop factory claims to handle all paths
virtual int priority() const = 0;
virtual BaseQtVersion *create(const QString &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString()) = 0;
virtual BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected = false, const QString &autoDetectionSource = QString()) = 0;
static BaseQtVersion *createQtVersionFromQMakePath(const QString &qmakePath, bool isAutoDetected = false, const QString &autoDetectionSource = QString());
static BaseQtVersion *createQtVersionFromLegacySettings(const QString &qmakePath, int id, QSettings *s);
static BaseQtVersion *createQtVersionFromQMakePath(const Utils::FileName &qmakePath, bool isAutoDetected = false, const QString &autoDetectionSource = QString());
static BaseQtVersion *createQtVersionFromLegacySettings(const Utils::FileName &qmakePath, int id, QSettings *s);
};
}
......
......@@ -118,6 +118,8 @@ QtVersionManager::QtVersionManager()
{
m_self = this;
m_idcount = 1;
qRegisterMetaType<Utils::FileName>();
}
void QtVersionManager::extensionsInitialized()
......@@ -213,7 +215,7 @@ void QtVersionManager::updateFromInstaller()
if (debug) {
qDebug()<< "======= Existing Qt versions =======";
foreach (BaseQtVersion *version, m_versions) {
qDebug() << version->qmakeCommand() << "id:"<<version->uniqueId();
qDebug() << version->qmakeCommand().toString() << "id:"<<version->uniqueId();
qDebug() << " autodetection source:"<< version->autodetectionSource();
qDebug() << "";
}
......@@ -225,10 +227,7 @@ void QtVersionManager::updateFromInstaller()
if (!data.contains(key))
break;
QVariantMap map = data.value(key).toMap();
QString path = map.value(OLDQTVERSION_PATH).toString();
#ifdef Q_OS_WIN
path = path.toLower();
#endif
Utils::FileName path = Utils::FileName::fromString(map.value(OLDQTVERSION_PATH).toString());
QString autodetectionSource = map.value(OLDQTVERSION_SDKSOURCE).toString();
foreach (BaseQtVersion *v, m_versions) {
if (v->qmakeCommand() == path) {
......@@ -236,7 +235,7 @@ void QtVersionManager::updateFromInstaller()
v->setAutoDetectionSource(autodetectionSource);
} else {
if (debug)
qDebug() << "## Conflicting autodetictonSource for"<<path<<"\n"
qDebug() << "## Conflicting autodetictonSource for"<<path.toString()<<"\n"
<<" version retains"<<v->autodetectionSource();
}
// No break, we want to mark all qt versions matching that path
......@@ -251,7 +250,7 @@ void QtVersionManager::updateFromInstaller()
if (debug) {
qDebug()<< "======= After using OLD QtVersion data to mark versions =======";
foreach (BaseQtVersion *version, m_versions) {
qDebug() << version->qmakeCommand() << "id:"<<version->uniqueId();
qDebug() << version->qmakeCommand().toString() << "id:"<<version->uniqueId();
qDebug() << " autodetection source:"<< version->autodetectionSource();
qDebug() << "";
}
......@@ -317,7 +316,7 @@ void QtVersionManager::updateFromInstaller()
if (debug) {
qDebug() << "======= Before removing outdated sdk versions =======";
foreach (BaseQtVersion *version, m_versions) {
qDebug() << version->qmakeCommand() << "id:"<<version->uniqueId();
qDebug() << version->qmakeCommand().toString() << "id:"<<version->uniqueId();
qDebug() << " autodetection source:"<< version->autodetectionSource();
qDebug() << "";
}
......@@ -335,7 +334,7 @@ void QtVersionManager::updateFromInstaller()
if (debug) {
qDebug()<< "======= End result =======";
foreach (BaseQtVersion *version, m_versions) {
qDebug() << version->qmakeCommand() << "id:"<<version->uniqueId();
qDebug() << version->qmakeCommand().toString() << "id:"<<version->uniqueId();
qDebug() << " autodetection source:"<< version->autodetectionSource();
qDebug() << "";
}
......@@ -363,7 +362,7 @@ void QtVersionManager::saveQtVersions()
void QtVersionManager::findSystemQt()
{
QString systemQMakePath = ProjectExplorer::DebuggingHelperLibrary::findSystemQt(Utils::Environment::systemEnvironment());
Utils::FileName systemQMakePath = ProjectExplorer::DebuggingHelperLibrary::findSystemQt(Utils::Environment::systemEnvironment());
if (systemQMakePath.isNull())
return;
......@@ -390,7 +389,7 @@ bool QtVersionManager::legacyRestore()
else if (m_idcount < id)
m_idcount = id + 1;
QString qmakePath = s->value("QMakePath").toString();
Utils::FileName qmakePath = Utils::FileName::fromString(s->value("QMakePath").toString());
if (qmakePath.isEmpty())
continue; //skip this version
......@@ -501,7 +500,7 @@ void QtVersionManager::updateDocumentation()
helpManager->registerDocumentation(files);
}
void QtVersionManager::updateDumpFor(const QString &qmakeCommand)
void QtVersionManager::updateDumpFor(const Utils::FileName &qmakeCommand)
{
foreach (BaseQtVersion *v, versions()) {
if (v->qmakeCommand() == qmakeCommand)
......@@ -525,17 +524,15 @@ void QtVersionManager::updateSettings()
// in SDKs, we want to prefer the Qt version shipping with the SDK
QSettings *settings = Core::ICore::instance()->settings();
QString preferred = settings->value(QLatin1String("PreferredQMakePath")).toString();
preferred = QDir::fromNativeSeparators(preferred);
Utils::FileName preferred = Utils::FileName::fromUserInput(settings->value(QLatin1String("PreferredQMakePath")).toString());
if (!preferred.isEmpty()) {
#ifdef Q_OS_WIN
preferred = preferred.toLower();
if (!preferred.endsWith(QLatin1String(".exe")))
preferred.append(QLatin1String(".exe"));
if (!preferred.endsWith(".exe"))
preferred.append(".exe");
#endif
foreach (version, candidates) {
if (version->qmakeCommand() == preferred) {
emit updateExamples(version->examplesPath(), version->demosPath(), version->sourcePath());
emit updateExamples(version->examplesPath(), version->demosPath(), version->sourcePath().toString());
return;
}
}
......@@ -544,14 +541,14 @@ void QtVersionManager::updateSettings()
// prefer versions with declarative examples
foreach (version, candidates) {
if (QDir(version->examplesPath()+"/declarative").exists()) {
emit updateExamples(version->examplesPath(), version->demosPath(), version->sourcePath());
emit updateExamples(version->examplesPath(), version->demosPath(), version->sourcePath().toString());
return;
}
}
if (!candidates.isEmpty()) {
version = candidates.first();
emit updateExamples(version->examplesPath(), version->demosPath(), version->sourcePath());
emit updateExamples(version->examplesPath(), version->demosPath(), version->sourcePath().toString());
return;
}
return;
......@@ -690,7 +687,7 @@ void QtVersionManager::setNewQtVersions(QList<BaseQtVersion *> newVersions)
// That is returns the directory
// To find out whether we already have a qtversion for that directory call
// QtVersion *QtVersionManager::qtVersionForDirectory(const QString directory);
QString QtVersionManager::findQMakeBinaryFromMakefile(const QString &makefile)
Utils::FileName QtVersionManager::findQMakeBinaryFromMakefile(const QString &makefile)
{
bool debugAdding = false;
QFile fi(makefile);
......@@ -711,19 +708,15 @@ QString QtVersionManager::findQMakeBinaryFromMakefile(const QString &makefile)
// Is qmake still installed?
QFileInfo fi(qmakePath);
if (fi.exists()) {
qmakePath = fi.absoluteFilePath();
#ifdef Q_OS_WIN
qmakePath = qmakePath.toLower();
#endif
return qmakePath;
return Utils::FileName(fi);
}
}
}
}
return QString();
return Utils::FileName();
}
BaseQtVersion *QtVersionManager::qtVersionForQMakeBinary(const QString &qmakePath)
BaseQtVersion *QtVersionManager::qtVersionForQMakeBinary(const Utils::FileName &qmakePath)
{
foreach (BaseQtVersion *version, versions()) {
if (version->qmakeCommand() == qmakePath) {
......
......@@ -84,7 +84,7 @@ public:
// need to get a new pointer by calling this method again!
BaseQtVersion *version(int id) const;
BaseQtVersion *qtVersionForQMakeBinary(const QString &qmakePath);
BaseQtVersion *qtVersionForQMakeBinary(const Utils::FileName &qmakePath);
// Used by the projectloadwizard
void addVersion(BaseQtVersion *version);
......@@ -105,7 +105,7 @@ public:
static MakefileCompatible makefileIsFor(const QString &makefile, const QString &proFile);
static QPair<BaseQtVersion::QmakeBuildConfigs, QString> scanMakeFile(const QString &makefile,
BaseQtVersion::QmakeBuildConfigs defaultBuildConfig);
static QString findQMakeBinaryFromMakefile(const QString &directory);
static Utils::FileName findQMakeBinaryFromMakefile(const QString &directory);
bool isValidId(int id) const;
// Compatibility with pre-2.2:
......@@ -113,12 +113,12 @@ public:
QString popPendingGcceUpdate();
signals:
// content of BaseQtVersion objects with qmake path might have changed
void dumpUpdatedFor(const QString &qmakeCommand);
void dumpUpdatedFor(const Utils::FileName &qmakeCommand);
void qtVersionsChanged(const QList<int> &uniqueIds);
void updateExamples(QString, QString, QString);
public slots:
void updateDumpFor(const QString &qmakeCommand);
void updateDumpFor(const Utils::FileName &qmakeCommand);
private slots:
void updateSettings();
......
......@@ -43,7 +43,7 @@ EmbeddedLinuxQtVersion::EmbeddedLinuxQtVersion()
: BaseQtVersion()
{ }
EmbeddedLinuxQtVersion::EmbeddedLinuxQtVersion(const QString &path, bool isAutodetected, const QString &autodetectionSource)
EmbeddedLinuxQtVersion::EmbeddedLinuxQtVersion(const Utils::FileName &path, bool isAutodetected, const QString &autodetectionSource)
: BaseQtVersion(path, isAutodetected, autodetectionSource)
{ }
......
......@@ -42,7 +42,7 @@ class EmbeddedLinuxQtVersion : public QtSupport::BaseQtVersion
{
public:
EmbeddedLinuxQtVersion();
EmbeddedLinuxQtVersion(const QString &path, bool isAutodetected = false, const QString &autodetectionSource = QString());
EmbeddedLinuxQtVersion(const Utils::FileName &path, bool isAutodetected = false, const QString &autodetectionSource = QString());
~EmbeddedLinuxQtVersion();
EmbeddedLinuxQtVersion *clone() const;
......
......@@ -65,14 +65,14 @@ int EmbeddedLinuxQtVersionFactory::priority() const
return 10;
}
QtSupport::BaseQtVersion *EmbeddedLinuxQtVersionFactory::create(const QString &qmakePath,
QtSupport::BaseQtVersion *EmbeddedLinuxQtVersionFactory::create(const Utils::FileName &qmakePath,
ProFileEvaluator *evaluator,
bool isAutoDetected,
const QString &autoDetectionSource)
{
Q_UNUSED(evaluator);
QFileInfo fi(qmakePath);
QFileInfo fi = qmakePath.toFileInfo();
if (!fi.exists() || !fi.isExecutable() || !fi.isFile())
return 0;
......
......@@ -48,7 +48,7 @@ public:
QtSupport::BaseQtVersion *restore(const QString &type, const QVariantMap &data);
int priority() const;
QtSupport::BaseQtVersion *create(const QString &qmakePath, ProFileEvaluator *evaluator,
QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator,
bool isAutoDetected = false,
const QString &autoDetectionSource = QString());
};
......
......@@ -73,11 +73,11 @@ QList<ProjectExplorer::RunConfiguration *> EmbeddedLinuxTarget::runConfiguration
return result;
}
QString EmbeddedLinuxTarget::mkspec(const Qt4ProjectManager::Qt4BuildConfiguration *bc) const
Utils::FileName EmbeddedLinuxTarget::mkspec(const Qt4ProjectManager::Qt4BuildConfiguration *bc) const
{
QtSupport::BaseQtVersion *version = bc->qtVersion();
if (!version)
return QString();
return Utils::FileName();
return version->mkspec();
}
......
......@@ -55,7 +55,7 @@ public:
QList<ProjectExplorer::RunConfiguration *> runConfigurationsForNode(ProjectExplorer::Node *n);
QString mkspec(const Qt4ProjectManager::Qt4BuildConfiguration *bc) const;
Utils::FileName mkspec(const Qt4ProjectManager::Qt4BuildConfiguration *bc) const;
private:
Qt4ProjectManager::Qt4BuildConfigurationFactory *m_buildConfigurationFactory;
......
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