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);
|
% packageFileName(buildConfiguration()->target()->project(), version);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MaemoPackageCreationStep::isPackagingEnabled() const
|
||||||
|
{
|
||||||
|
return m_packagingEnabled || !maemoToolChain()->allowsPackagingDisabling();
|
||||||
|
}
|
||||||
|
|
||||||
QString MaemoPackageCreationStep::versionString(QString *error) const
|
QString MaemoPackageCreationStep::versionString(QString *error) const
|
||||||
{
|
{
|
||||||
return MaemoTemplatesManager::instance()
|
return MaemoTemplatesManager::instance()
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ public:
|
|||||||
~MaemoPackageCreationStep();
|
~MaemoPackageCreationStep();
|
||||||
|
|
||||||
QString packageFilePath() const;
|
QString packageFilePath() const;
|
||||||
bool isPackagingEnabled() const { return m_packagingEnabled; }
|
bool isPackagingEnabled() const;
|
||||||
void setPackagingEnabled(bool enabled) { m_packagingEnabled = enabled; }
|
void setPackagingEnabled(bool enabled) { m_packagingEnabled = enabled; }
|
||||||
|
|
||||||
QString versionString(QString *error) const;
|
QString versionString(QString *error) const;
|
||||||
|
|||||||
@@ -80,6 +80,8 @@ void MaemoRemoteMounter::mount()
|
|||||||
m_stop = false;
|
m_stop = false;
|
||||||
Q_ASSERT(m_utfsServers.isEmpty());
|
Q_ASSERT(m_utfsServers.isEmpty());
|
||||||
|
|
||||||
|
if (!m_toolChain->allowsRemoteMounts())
|
||||||
|
m_mountSpecs.clear();
|
||||||
if (m_mountSpecs.isEmpty())
|
if (m_mountSpecs.isEmpty())
|
||||||
emit mounted();
|
emit mounted();
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -282,6 +282,11 @@ MaemoPortList MaemoRunConfiguration::freePorts() const
|
|||||||
return devConfig.freePorts();
|
return devConfig.freePorts();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool MaemoRunConfiguration::useRemoteGdb() const
|
||||||
|
{
|
||||||
|
return m_useRemoteGdb && toolchain()->allowsRemoteMounts();
|
||||||
|
}
|
||||||
|
|
||||||
void MaemoRunConfiguration::setArguments(const QStringList &args)
|
void MaemoRunConfiguration::setArguments(const QStringList &args)
|
||||||
{
|
{
|
||||||
m_arguments = args;
|
m_arguments = args;
|
||||||
|
|||||||
@@ -93,7 +93,7 @@ public:
|
|||||||
void setArguments(const QStringList &args);
|
void setArguments(const QStringList &args);
|
||||||
MaemoDeviceConfig deviceConfig() const;
|
MaemoDeviceConfig deviceConfig() const;
|
||||||
MaemoPortList freePorts() const;
|
MaemoPortList freePorts() const;
|
||||||
bool useRemoteGdb() const { return m_useRemoteGdb; }
|
bool useRemoteGdb() const;
|
||||||
void setUseRemoteGdb(bool useRemoteGdb) { m_useRemoteGdb = useRemoteGdb; }
|
void setUseRemoteGdb(bool useRemoteGdb) { m_useRemoteGdb = useRemoteGdb; }
|
||||||
void updateFactoryState() { emit isEnabledChanged(true); }
|
void updateFactoryState() { emit isEnabledChanged(true); }
|
||||||
|
|
||||||
|
|||||||
@@ -113,6 +113,17 @@ QString MaemoToolChain::sysrootRoot() const
|
|||||||
return m_sysrootRoot;
|
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
|
void MaemoToolChain::setMaddeRoot() const
|
||||||
{
|
{
|
||||||
QDir dir(targetRoot());
|
QDir dir(targetRoot());
|
||||||
|
|||||||
@@ -52,6 +52,11 @@ public:
|
|||||||
QString sysrootRoot() const;
|
QString sysrootRoot() const;
|
||||||
QString madAdminCommand() const;
|
QString madAdminCommand() const;
|
||||||
|
|
||||||
|
enum MaemoVersion { Maemo5, Maemo6 };
|
||||||
|
MaemoVersion version() const;
|
||||||
|
bool allowsRemoteMounts() const { return version() == Maemo5; }
|
||||||
|
bool allowsPackagingDisabling() const { return version() == Maemo5; }
|
||||||
|
|
||||||
protected:
|
protected:
|
||||||
bool equals(ToolChain *other) const;
|
bool equals(ToolChain *other) const;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user