forked from qt-creator/qt-creator
Maemo: Differentiate between Maemo versions.
Reviewed-by: kh1
This commit is contained in:
@@ -342,6 +342,11 @@ QString MaemoPackageCreationStep::packageFilePath() const
|
||||
% packageFileName(buildConfiguration()->target()->project(), version);
|
||||
}
|
||||
|
||||
bool MaemoPackageCreationStep::isPackagingEnabled() const
|
||||
{
|
||||
return m_packagingEnabled || !maemoToolChain()->allowsPackagingDisabling();
|
||||
}
|
||||
|
||||
QString MaemoPackageCreationStep::versionString(QString *error) const
|
||||
{
|
||||
return MaemoTemplatesManager::instance()
|
||||
|
||||
@@ -68,7 +68,7 @@ public:
|
||||
~MaemoPackageCreationStep();
|
||||
|
||||
QString packageFilePath() const;
|
||||
bool isPackagingEnabled() const { return m_packagingEnabled; }
|
||||
bool isPackagingEnabled() const;
|
||||
void setPackagingEnabled(bool enabled) { m_packagingEnabled = enabled; }
|
||||
|
||||
QString versionString(QString *error) const;
|
||||
|
||||
@@ -80,6 +80,8 @@ void MaemoRemoteMounter::mount()
|
||||
m_stop = false;
|
||||
Q_ASSERT(m_utfsServers.isEmpty());
|
||||
|
||||
if (!m_toolChain->allowsRemoteMounts())
|
||||
m_mountSpecs.clear();
|
||||
if (m_mountSpecs.isEmpty())
|
||||
emit mounted();
|
||||
else
|
||||
|
||||
@@ -282,6 +282,11 @@ MaemoPortList MaemoRunConfiguration::freePorts() const
|
||||
return devConfig.freePorts();
|
||||
}
|
||||
|
||||
bool MaemoRunConfiguration::useRemoteGdb() const
|
||||
{
|
||||
return m_useRemoteGdb && toolchain()->allowsRemoteMounts();
|
||||
}
|
||||
|
||||
void MaemoRunConfiguration::setArguments(const QStringList &args)
|
||||
{
|
||||
m_arguments = args;
|
||||
|
||||
@@ -93,7 +93,7 @@ public:
|
||||
void setArguments(const QStringList &args);
|
||||
MaemoDeviceConfig deviceConfig() const;
|
||||
MaemoPortList freePorts() const;
|
||||
bool useRemoteGdb() const { return m_useRemoteGdb; }
|
||||
bool useRemoteGdb() const;
|
||||
void setUseRemoteGdb(bool useRemoteGdb) { m_useRemoteGdb = useRemoteGdb; }
|
||||
void updateFactoryState() { emit isEnabledChanged(true); }
|
||||
|
||||
|
||||
@@ -113,6 +113,17 @@ QString MaemoToolChain::sysrootRoot() const
|
||||
return m_sysrootRoot;
|
||||
}
|
||||
|
||||
MaemoToolChain::MaemoVersion MaemoToolChain::version() const
|
||||
{
|
||||
const QString &name = targetName();
|
||||
if (name.startsWith(QLatin1String("fremantle")))
|
||||
return Maemo5;
|
||||
if (name.startsWith(QLatin1String("harmattan")))
|
||||
return Maemo6;
|
||||
qWarning("Unknown Maemo version!");
|
||||
return static_cast<MaemoVersion>(-1);
|
||||
}
|
||||
|
||||
void MaemoToolChain::setMaddeRoot() const
|
||||
{
|
||||
QDir dir(targetRoot());
|
||||
|
||||
@@ -52,6 +52,11 @@ public:
|
||||
QString sysrootRoot() const;
|
||||
QString madAdminCommand() const;
|
||||
|
||||
enum MaemoVersion { Maemo5, Maemo6 };
|
||||
MaemoVersion version() const;
|
||||
bool allowsRemoteMounts() const { return version() == Maemo5; }
|
||||
bool allowsPackagingDisabling() const { return version() == Maemo5; }
|
||||
|
||||
protected:
|
||||
bool equals(ToolChain *other) const;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user