forked from qt-creator/qt-creator
QtSupport: Simplify use of QtVersionFactory::create()
Use two setters, one already pre-existing, to set autodetection data instead of passing that through the create/contructor chain. Change-Id: I8f9bdf2f82518aae765327a823bdea44210c2f96 Reviewed-by: Christian Kandeler <christian.kandeler@qt.io>
This commit is contained in:
@@ -50,8 +50,8 @@ AndroidQtVersion::AndroidQtVersion()
|
|||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
AndroidQtVersion::AndroidQtVersion(const Utils::FileName &path, bool isAutodetected, const QString &autodetectionSource)
|
AndroidQtVersion::AndroidQtVersion(const Utils::FileName &path)
|
||||||
: QtSupport::BaseQtVersion(path, isAutodetected, autodetectionSource)
|
: QtSupport::BaseQtVersion(path)
|
||||||
{
|
{
|
||||||
setUnexpandedDisplayName(defaultUnexpandedDisplayName(path, false));
|
setUnexpandedDisplayName(defaultUnexpandedDisplayName(path, false));
|
||||||
}
|
}
|
||||||
|
@@ -38,7 +38,7 @@ class AndroidQtVersion : public QtSupport::BaseQtVersion
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
AndroidQtVersion();
|
AndroidQtVersion();
|
||||||
AndroidQtVersion(const Utils::FileName &path, bool isAutodetected = false, const QString &autodetectionSource = QString());
|
explicit AndroidQtVersion(const Utils::FileName &path);
|
||||||
|
|
||||||
AndroidQtVersion *clone() const override;
|
AndroidQtVersion *clone() const override;
|
||||||
QString type() const override;
|
QString type() const override;
|
||||||
|
@@ -40,14 +40,14 @@ AndroidQtVersionFactory::AndroidQtVersionFactory()
|
|||||||
setPriority(90);
|
setPriority(90);
|
||||||
}
|
}
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *AndroidQtVersionFactory::create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource)
|
QtSupport::BaseQtVersion *AndroidQtVersionFactory::create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator)
|
||||||
{
|
{
|
||||||
if (!evaluator->values(QLatin1String("CONFIG")).contains(QLatin1String("android"))
|
if (!evaluator->values(QLatin1String("CONFIG")).contains(QLatin1String("android"))
|
||||||
&& evaluator->value(QLatin1String("QMAKE_PLATFORM")) != QLatin1String("android"))
|
&& evaluator->value(QLatin1String("QMAKE_PLATFORM")) != QLatin1String("android"))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
if (evaluator->values(QLatin1String("CONFIG")).contains(QLatin1String("android-no-sdk")))
|
if (evaluator->values(QLatin1String("CONFIG")).contains(QLatin1String("android-no-sdk")))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
return new AndroidQtVersion(qmakePath, isAutoDetected, autoDetectionSource);
|
return new AndroidQtVersion(qmakePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
|
@@ -35,8 +35,8 @@ class AndroidQtVersionFactory : public QtSupport::QtVersionFactory
|
|||||||
public:
|
public:
|
||||||
AndroidQtVersionFactory();
|
AndroidQtVersionFactory();
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator,
|
QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath,
|
||||||
bool isAutoDetected = false, const QString &autoDetectionSource = QString()) override;
|
ProFileEvaluator *evaluator) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -42,9 +42,8 @@ using namespace ProjectExplorer;
|
|||||||
|
|
||||||
IosQtVersion::IosQtVersion() = default;
|
IosQtVersion::IosQtVersion() = default;
|
||||||
|
|
||||||
IosQtVersion::IosQtVersion(const Utils::FileName &path, bool isAutodetected,
|
IosQtVersion::IosQtVersion(const Utils::FileName &path)
|
||||||
const QString &autodetectionSource)
|
: QtSupport::BaseQtVersion(path)
|
||||||
: QtSupport::BaseQtVersion(path, isAutodetected, autodetectionSource)
|
|
||||||
{
|
{
|
||||||
setUnexpandedDisplayName(defaultUnexpandedDisplayName(path, false));
|
setUnexpandedDisplayName(defaultUnexpandedDisplayName(path, false));
|
||||||
}
|
}
|
||||||
|
@@ -38,8 +38,7 @@ class IosQtVersion : public QtSupport::BaseQtVersion
|
|||||||
|
|
||||||
public:
|
public:
|
||||||
IosQtVersion();
|
IosQtVersion();
|
||||||
IosQtVersion(const Utils::FileName &path, bool isAutodetected = false,
|
explicit IosQtVersion(const Utils::FileName &path);
|
||||||
const QString &autodetectionSource = QString());
|
|
||||||
|
|
||||||
IosQtVersion *clone() const override;
|
IosQtVersion *clone() const override;
|
||||||
QString type() const override;
|
QString type() const override;
|
||||||
|
@@ -40,13 +40,11 @@ IosQtVersionFactory::IosQtVersionFactory()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *IosQtVersionFactory::create(const Utils::FileName &qmakePath,
|
QtSupport::BaseQtVersion *IosQtVersionFactory::create(const Utils::FileName &qmakePath,
|
||||||
ProFileEvaluator *evaluator,
|
ProFileEvaluator *evaluator)
|
||||||
bool isAutoDetected,
|
|
||||||
const QString &autoDetectionSource)
|
|
||||||
{
|
{
|
||||||
if (!(evaluator->values(QLatin1String("QMAKE_PLATFORM")).contains(QLatin1String("ios"))))
|
if (!(evaluator->values(QLatin1String("QMAKE_PLATFORM")).contains(QLatin1String("ios"))))
|
||||||
return nullptr;
|
return nullptr;
|
||||||
return new IosQtVersion(qmakePath, isAutoDetected, autoDetectionSource);
|
return new IosQtVersion(qmakePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
|
@@ -35,9 +35,8 @@ class IosQtVersionFactory : public QtSupport::QtVersionFactory
|
|||||||
public:
|
public:
|
||||||
IosQtVersionFactory();
|
IosQtVersionFactory();
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator,
|
QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath,
|
||||||
bool isAutoDetected = false,
|
ProFileEvaluator *evaluator) override;
|
||||||
const QString &autoDetectionSource = QString()) override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -46,9 +46,8 @@ static char SDP_PATH_KEY[] = "SDKPath";
|
|||||||
|
|
||||||
QnxQtVersion::QnxQtVersion() = default;
|
QnxQtVersion::QnxQtVersion() = default;
|
||||||
|
|
||||||
QnxQtVersion::QnxQtVersion(const Utils::FileName &path, bool isAutoDetected,
|
QnxQtVersion::QnxQtVersion(const Utils::FileName &path) :
|
||||||
const QString &autoDetectionSource) :
|
QtSupport::BaseQtVersion(path)
|
||||||
QtSupport::BaseQtVersion(path, isAutoDetected, autoDetectionSource)
|
|
||||||
{
|
{
|
||||||
setUnexpandedDisplayName(defaultUnexpandedDisplayName(path, false));
|
setUnexpandedDisplayName(defaultUnexpandedDisplayName(path, false));
|
||||||
}
|
}
|
||||||
|
@@ -39,9 +39,8 @@ class QnxQtVersion : public QtSupport::BaseQtVersion
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
QnxQtVersion();
|
QnxQtVersion();
|
||||||
QnxQtVersion(const Utils::FileName &path,
|
explicit QnxQtVersion(const Utils::FileName &path);
|
||||||
bool isAutoDetected = false,
|
|
||||||
const QString &autoDetectionSource = QString());
|
|
||||||
QnxQtVersion *clone() const override;
|
QnxQtVersion *clone() const override;
|
||||||
|
|
||||||
QString type() const override;
|
QString type() const override;
|
||||||
|
@@ -41,12 +41,10 @@ QnxQtVersionFactory::QnxQtVersionFactory()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *QnxQtVersionFactory::create(const Utils::FileName &qmakePath,
|
QtSupport::BaseQtVersion *QnxQtVersionFactory::create(const Utils::FileName &qmakePath,
|
||||||
ProFileEvaluator *evaluator,
|
ProFileEvaluator *evaluator)
|
||||||
bool isAutoDetected,
|
|
||||||
const QString &autoDetectionSource)
|
|
||||||
{
|
{
|
||||||
if (evaluator->contains(QLatin1String("QNX_CPUDIR"))) {
|
if (evaluator->contains(QLatin1String("QNX_CPUDIR"))) {
|
||||||
return new QnxQtVersion(qmakePath, isAutoDetected, autoDetectionSource);
|
return new QnxQtVersion(qmakePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
@@ -36,9 +36,7 @@ public:
|
|||||||
QnxQtVersionFactory();
|
QnxQtVersionFactory();
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath,
|
QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath,
|
||||||
ProFileEvaluator *evaluator,
|
ProFileEvaluator *evaluator) override;
|
||||||
bool isAutoDetected = false,
|
|
||||||
const QString &autoDetectionSource = QString()) override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // namespace Internal
|
} // namespace Internal
|
||||||
|
@@ -193,10 +193,8 @@ bool QtVersionNumber::operator >=(const QtVersionNumber &b) const
|
|||||||
// BaseQtVersion
|
// BaseQtVersion
|
||||||
///////////////
|
///////////////
|
||||||
|
|
||||||
BaseQtVersion::BaseQtVersion(const FileName &qmakeCommand, bool isAutodetected, const QString &autodetectionSource)
|
BaseQtVersion::BaseQtVersion(const FileName &qmakeCommand)
|
||||||
: m_id(QtVersionManager::getUniqueId()),
|
: m_id(QtVersionManager::getUniqueId()),
|
||||||
m_isAutodetected(isAutodetected),
|
|
||||||
m_autodetectionSource(autodetectionSource),
|
|
||||||
m_qmakeCommand(qmakeCommand)
|
m_qmakeCommand(qmakeCommand)
|
||||||
{ }
|
{ }
|
||||||
BaseQtVersion::BaseQtVersion(const BaseQtVersion &other) = default;
|
BaseQtVersion::BaseQtVersion(const BaseQtVersion &other) = default;
|
||||||
@@ -498,6 +496,11 @@ void BaseQtVersion::setId(int id)
|
|||||||
m_id = id;
|
m_id = id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void BaseQtVersion::setIsAutodetected(bool isAutodetected)
|
||||||
|
{
|
||||||
|
m_isAutodetected = isAutodetected;
|
||||||
|
}
|
||||||
|
|
||||||
void BaseQtVersion::fromMap(const QVariantMap &map)
|
void BaseQtVersion::fromMap(const QVariantMap &map)
|
||||||
{
|
{
|
||||||
m_id = map.value(Constants::QTVERSIONID).toInt();
|
m_id = map.value(Constants::QTVERSIONID).toInt();
|
||||||
|
@@ -253,10 +253,12 @@ public:
|
|||||||
const ProjectExplorer::Target *target);
|
const ProjectExplorer::Target *target);
|
||||||
|
|
||||||
QSet<Core::Id> features() const;
|
QSet<Core::Id> features() const;
|
||||||
|
void setIsAutodetected(bool isAutodetected);
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
virtual QSet<Core::Id> availableFeatures() const;
|
virtual QSet<Core::Id> availableFeatures() const;
|
||||||
BaseQtVersion();
|
BaseQtVersion();
|
||||||
BaseQtVersion(const Utils::FileName &path, bool isAutodetected = false, const QString &autodetectionSource = QString());
|
explicit BaseQtVersion(const Utils::FileName &path);
|
||||||
BaseQtVersion(const BaseQtVersion &other);
|
BaseQtVersion(const BaseQtVersion &other);
|
||||||
|
|
||||||
virtual QList<ProjectExplorer::Task> reportIssuesImpl(const QString &proFile, const QString &buildDir) const;
|
virtual QList<ProjectExplorer::Task> reportIssuesImpl(const QString &proFile, const QString &buildDir) const;
|
||||||
|
@@ -46,8 +46,8 @@ DesktopQtVersion::DesktopQtVersion()
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
DesktopQtVersion::DesktopQtVersion(const Utils::FileName &path, bool isAutodetected, const QString &autodetectionSource)
|
DesktopQtVersion::DesktopQtVersion(const Utils::FileName &path)
|
||||||
: BaseQtVersion(path, isAutodetected, autodetectionSource)
|
: BaseQtVersion(path)
|
||||||
{
|
{
|
||||||
setUnexpandedDisplayName(defaultUnexpandedDisplayName(path, false));
|
setUnexpandedDisplayName(defaultUnexpandedDisplayName(path, false));
|
||||||
}
|
}
|
||||||
|
@@ -33,7 +33,7 @@ class QTSUPPORT_EXPORT DesktopQtVersion : public BaseQtVersion
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DesktopQtVersion();
|
DesktopQtVersion();
|
||||||
DesktopQtVersion(const Utils::FileName &path, bool isAutodetected = false, const QString &autodetectionSource = QString());
|
explicit DesktopQtVersion(const Utils::FileName &path);
|
||||||
DesktopQtVersion *clone() const override;
|
DesktopQtVersion *clone() const override;
|
||||||
|
|
||||||
QString type() const override;
|
QString type() const override;
|
||||||
|
@@ -37,9 +37,9 @@ DesktopQtVersionFactory::DesktopQtVersionFactory()
|
|||||||
setPriority(0); // Lowest of all, we want to be the fallback
|
setPriority(0); // Lowest of all, we want to be the fallback
|
||||||
}
|
}
|
||||||
|
|
||||||
BaseQtVersion *DesktopQtVersionFactory::create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource)
|
BaseQtVersion *DesktopQtVersionFactory::create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator)
|
||||||
{
|
{
|
||||||
Q_UNUSED(evaluator);
|
Q_UNUSED(evaluator);
|
||||||
// we are the fallback :) so we don't care what kind of qt it is
|
// we are the fallback :) so we don't care what kind of qt it is
|
||||||
return new DesktopQtVersion(qmakePath, isAutoDetected, autoDetectionSource);
|
return new DesktopQtVersion(qmakePath);
|
||||||
}
|
}
|
||||||
|
@@ -35,8 +35,7 @@ class DesktopQtVersionFactory : public QtVersionFactory
|
|||||||
public:
|
public:
|
||||||
DesktopQtVersionFactory();
|
DesktopQtVersionFactory();
|
||||||
|
|
||||||
BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator,
|
BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator) override;
|
||||||
bool isAutoDetected = false, const QString &autoDetectionSource = QString()) override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
|
@@ -98,8 +98,9 @@ BaseQtVersion *QtVersionFactory::createQtVersionFromQMakePath(const Utils::FileN
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
|
|
||||||
foreach (QtVersionFactory *factory, factories) {
|
foreach (QtVersionFactory *factory, factories) {
|
||||||
BaseQtVersion *ver = factory->create(qmakePath, &evaluator, isAutoDetected, autoDetectionSource);
|
if (BaseQtVersion *ver = factory->create(qmakePath, &evaluator)) {
|
||||||
if (ver) {
|
ver->setAutoDetectionSource(autoDetectionSource);
|
||||||
|
ver->setIsAutodetected(isAutoDetected);
|
||||||
ProFileCacheManager::instance()->decRefCount();
|
ProFileCacheManager::instance()->decRefCount();
|
||||||
return ver;
|
return ver;
|
||||||
}
|
}
|
||||||
|
@@ -55,9 +55,7 @@ public:
|
|||||||
/// the desktop factory claims to handle all paths
|
/// the desktop factory claims to handle all paths
|
||||||
int priority() const { return m_priority; }
|
int priority() const { return m_priority; }
|
||||||
virtual BaseQtVersion *create(const Utils::FileName &qmakePath,
|
virtual BaseQtVersion *create(const Utils::FileName &qmakePath,
|
||||||
ProFileEvaluator *evaluator,
|
ProFileEvaluator *evaluator) = 0;
|
||||||
bool isAutoDetected = false,
|
|
||||||
const QString &autoDetectionSource = QString()) = 0;
|
|
||||||
|
|
||||||
static BaseQtVersion *createQtVersionFromQMakePath(
|
static BaseQtVersion *createQtVersionFromQMakePath(
|
||||||
const Utils::FileName &qmakePath, bool isAutoDetected = false,
|
const Utils::FileName &qmakePath, bool isAutoDetected = false,
|
||||||
|
@@ -35,9 +35,8 @@
|
|||||||
namespace RemoteLinux {
|
namespace RemoteLinux {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
EmbeddedLinuxQtVersion::EmbeddedLinuxQtVersion(const Utils::FileName &path, bool isAutodetected,
|
EmbeddedLinuxQtVersion::EmbeddedLinuxQtVersion(const Utils::FileName &path)
|
||||||
const QString &autodetectionSource)
|
: BaseQtVersion(path)
|
||||||
: BaseQtVersion(path, isAutodetected, autodetectionSource)
|
|
||||||
{
|
{
|
||||||
setUnexpandedDisplayName(defaultUnexpandedDisplayName(path, false));
|
setUnexpandedDisplayName(defaultUnexpandedDisplayName(path, false));
|
||||||
}
|
}
|
||||||
|
@@ -34,8 +34,8 @@ class EmbeddedLinuxQtVersion : public QtSupport::BaseQtVersion
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
EmbeddedLinuxQtVersion() = default;
|
EmbeddedLinuxQtVersion() = default;
|
||||||
EmbeddedLinuxQtVersion(const Utils::FileName &path, bool isAutodetected = false,
|
explicit EmbeddedLinuxQtVersion(const Utils::FileName &path);
|
||||||
const QString &autodetectionSource = QString());
|
|
||||||
EmbeddedLinuxQtVersion *clone() const override;
|
EmbeddedLinuxQtVersion *clone() const override;
|
||||||
|
|
||||||
QString type() const override;
|
QString type() const override;
|
||||||
|
@@ -41,13 +41,11 @@ EmbeddedLinuxQtVersionFactory::EmbeddedLinuxQtVersionFactory()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *EmbeddedLinuxQtVersionFactory::create(const Utils::FileName &qmakePath,
|
QtSupport::BaseQtVersion *EmbeddedLinuxQtVersionFactory::create(const Utils::FileName &qmakePath,
|
||||||
ProFileEvaluator *evaluator,
|
ProFileEvaluator *evaluator)
|
||||||
bool isAutoDetected,
|
|
||||||
const QString &autoDetectionSource)
|
|
||||||
{
|
{
|
||||||
Q_UNUSED(evaluator);
|
Q_UNUSED(evaluator);
|
||||||
|
|
||||||
auto version = new EmbeddedLinuxQtVersion(qmakePath, isAutoDetected, autoDetectionSource);
|
auto version = new EmbeddedLinuxQtVersion(qmakePath);
|
||||||
|
|
||||||
QList<ProjectExplorer::Abi> abis = version->qtAbis();
|
QList<ProjectExplorer::Abi> abis = version->qtAbis();
|
||||||
// Note: This fails for e.g. intel/meego cross builds on x86 linux machines.
|
// Note: This fails for e.g. intel/meego cross builds on x86 linux machines.
|
||||||
|
@@ -35,9 +35,8 @@ class EmbeddedLinuxQtVersionFactory : public QtSupport::QtVersionFactory
|
|||||||
public:
|
public:
|
||||||
EmbeddedLinuxQtVersionFactory();
|
EmbeddedLinuxQtVersionFactory();
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator,
|
QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath,
|
||||||
bool isAutoDetected = false,
|
ProFileEvaluator *evaluator) override;
|
||||||
const QString &autoDetectionSource = QString()) override;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
|
@@ -35,9 +35,8 @@
|
|||||||
namespace WinRt {
|
namespace WinRt {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
WinRtPhoneQtVersion::WinRtPhoneQtVersion(const Utils::FileName &path, bool isAutodetected,
|
WinRtPhoneQtVersion::WinRtPhoneQtVersion(const Utils::FileName &path)
|
||||||
const QString &autodetectionSource)
|
: WinRtQtVersion(path)
|
||||||
: WinRtQtVersion(path, isAutodetected, autodetectionSource)
|
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -35,8 +35,7 @@ class WinRtPhoneQtVersion : public WinRtQtVersion
|
|||||||
Q_DECLARE_TR_FUNCTIONS(WinRt::Internal::WinRtQtVersion)
|
Q_DECLARE_TR_FUNCTIONS(WinRt::Internal::WinRtQtVersion)
|
||||||
public:
|
public:
|
||||||
WinRtPhoneQtVersion() = default;
|
WinRtPhoneQtVersion() = default;
|
||||||
WinRtPhoneQtVersion(const Utils::FileName &path, bool isAutodetected,
|
explicit WinRtPhoneQtVersion(const Utils::FileName &path);
|
||||||
const QString &autodetectionSource);
|
|
||||||
|
|
||||||
QString description() const override;
|
QString description() const override;
|
||||||
BaseQtVersion *clone() const override;
|
BaseQtVersion *clone() const override;
|
||||||
|
@@ -33,9 +33,8 @@
|
|||||||
namespace WinRt {
|
namespace WinRt {
|
||||||
namespace Internal {
|
namespace Internal {
|
||||||
|
|
||||||
WinRtQtVersion::WinRtQtVersion(const Utils::FileName &path, bool isAutodetected,
|
WinRtQtVersion::WinRtQtVersion(const Utils::FileName &path)
|
||||||
const QString &autodetectionSource)
|
: BaseQtVersion(path)
|
||||||
: BaseQtVersion(path, isAutodetected, autodetectionSource)
|
|
||||||
{
|
{
|
||||||
setUnexpandedDisplayName(defaultUnexpandedDisplayName(path, false));
|
setUnexpandedDisplayName(defaultUnexpandedDisplayName(path, false));
|
||||||
}
|
}
|
||||||
|
@@ -35,8 +35,7 @@ class WinRtQtVersion : public QtSupport::BaseQtVersion
|
|||||||
Q_DECLARE_TR_FUNCTIONS(WinRt::Internal::WinRtQtVersion)
|
Q_DECLARE_TR_FUNCTIONS(WinRt::Internal::WinRtQtVersion)
|
||||||
public:
|
public:
|
||||||
WinRtQtVersion() = default;
|
WinRtQtVersion() = default;
|
||||||
WinRtQtVersion(const Utils::FileName &path, bool isAutodetected,
|
explicit WinRtQtVersion(const Utils::FileName &path);
|
||||||
const QString &autodetectionSource);
|
|
||||||
|
|
||||||
BaseQtVersion *clone() const override;
|
BaseQtVersion *clone() const override;
|
||||||
QString type() const override;
|
QString type() const override;
|
||||||
|
@@ -41,11 +41,11 @@ WinRtQtVersionFactory::WinRtQtVersionFactory()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *WinRtQtVersionFactory::create(const Utils::FileName &qmakePath,
|
QtSupport::BaseQtVersion *WinRtQtVersionFactory::create(const Utils::FileName &qmakePath,
|
||||||
ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource)
|
ProFileEvaluator *evaluator)
|
||||||
{
|
{
|
||||||
foreach (const QString &value, evaluator->values(QLatin1String("QMAKE_PLATFORM"))) {
|
foreach (const QString &value, evaluator->values(QLatin1String("QMAKE_PLATFORM"))) {
|
||||||
if (value == QStringLiteral("winrt"))
|
if (value == QStringLiteral("winrt"))
|
||||||
return new WinRtQtVersion(qmakePath, isAutoDetected, autoDetectionSource);
|
return new WinRtQtVersion(qmakePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
@@ -61,11 +61,11 @@ WinRtPhoneQtVersionFactory::WinRtPhoneQtVersionFactory()
|
|||||||
}
|
}
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *WinRtPhoneQtVersionFactory::create(const Utils::FileName &qmakePath,
|
QtSupport::BaseQtVersion *WinRtPhoneQtVersionFactory::create(const Utils::FileName &qmakePath,
|
||||||
ProFileEvaluator *evaluator, bool isAutoDetected, const QString &autoDetectionSource)
|
ProFileEvaluator *evaluator)
|
||||||
{
|
{
|
||||||
foreach (const QString &value, evaluator->values(QLatin1String("QMAKE_PLATFORM"))) {
|
foreach (const QString &value, evaluator->values(QLatin1String("QMAKE_PLATFORM"))) {
|
||||||
if (value == QStringLiteral("winphone"))
|
if (value == QStringLiteral("winphone"))
|
||||||
return new WinRtPhoneQtVersion(qmakePath, isAutoDetected, autoDetectionSource);
|
return new WinRtPhoneQtVersion(qmakePath);
|
||||||
}
|
}
|
||||||
|
|
||||||
return nullptr;
|
return nullptr;
|
||||||
|
@@ -35,8 +35,8 @@ class WinRtQtVersionFactory : public QtSupport::QtVersionFactory
|
|||||||
public:
|
public:
|
||||||
WinRtQtVersionFactory();
|
WinRtQtVersionFactory();
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator,
|
QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath,
|
||||||
bool isAutoDetected = false, const QString &autoDetectionSource = QString());
|
ProFileEvaluator *evaluator) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
class WinRtPhoneQtVersionFactory : public QtSupport::QtVersionFactory
|
class WinRtPhoneQtVersionFactory : public QtSupport::QtVersionFactory
|
||||||
@@ -44,8 +44,8 @@ class WinRtPhoneQtVersionFactory : public QtSupport::QtVersionFactory
|
|||||||
public:
|
public:
|
||||||
WinRtPhoneQtVersionFactory();
|
WinRtPhoneQtVersionFactory();
|
||||||
|
|
||||||
QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath, ProFileEvaluator *evaluator,
|
QtSupport::BaseQtVersion *create(const Utils::FileName &qmakePath,
|
||||||
bool isAutoDetected = false, const QString &autoDetectionSource = QString());
|
ProFileEvaluator *evaluator) override;
|
||||||
};
|
};
|
||||||
|
|
||||||
} // Internal
|
} // Internal
|
||||||
|
Reference in New Issue
Block a user