Commit 0a777f26 authored by Christian Kandeler's avatar Christian Kandeler
Browse files

Maemo: Add more debian/control fields to Harmattan target.

parent d99b0e8a
......@@ -820,6 +820,7 @@ bool AbstractDebBasedQt4MaemoTarget::adaptControlFile()
", libqt4-dev");
}
addAdditionalControlFileFields(controlContents);
controlFile.resize(0);
controlFile.write(controlContents);
controlFile.close();
......@@ -836,7 +837,7 @@ bool AbstractDebBasedQt4MaemoTarget::initAdditionalPackagingSettingsFromOtherTar
foreach (const Target * const t, project()->targets()) {
const AbstractDebBasedQt4MaemoTarget *target
= qobject_cast<const AbstractDebBasedQt4MaemoTarget *>(t);
if (target) {
if (target && target != this) {
return setControlFieldValue(IconFieldName,
target->controlFileFieldValue(IconFieldName, true));
}
......@@ -1064,6 +1065,11 @@ QString Qt4Maemo5Target::defaultDisplayName()
"Qt4 Maemo5 target display name");
}
void Qt4Maemo5Target::addAdditionalControlFileFields(QByteArray &controlContents)
{
Q_UNUSED(controlContents);
}
QString Qt4Maemo5Target::debianDirName() const
{
return QLatin1String("debian_fremantle");
......@@ -1089,6 +1095,12 @@ QString Qt4HarmattanTarget::defaultDisplayName()
"Qt4 Harmattan target display name");
}
void Qt4HarmattanTarget::addAdditionalControlFileFields(QByteArray &controlContents)
{
adaptControlFileField(controlContents, "XB-Meego-Desktop-Entry", "");
adaptControlFileField(controlContents, "XB-MeeGo-Desktop-Entry-Filename", "");
}
QString Qt4HarmattanTarget::debianDirName() const
{
return QLatin1String("debian_harmattan");
......@@ -1119,42 +1131,3 @@ QString Qt4MeegoTarget::specFileName() const
{
return QLatin1String("meego.spec");
}
/*
Qt4MeegoArmTarget::Qt4MeegoArmTarget(Qt4Project *parent, const QString &id)
: AbstractRpmBasedQt4MaemoTarget(parent, id)
{
}
Qt4MeegoArmTarget::~Qt4MeegoArmTarget() {}
QString Qt4MeegoArmTarget::defaultDisplayName()
{
return QApplication::translate("Qt4ProjectManager::Qt4Target",
"Meego (ARM)", "Qt4 Meego/ARM target display name");
}
QString Qt4MeegoArmTarget::specFileName() const
{
return QLatin1String("meego-arm");
}
Qt4MeegoIa32Target::Qt4MeegoIa32Target(Qt4Project *parent, const QString &id)
: AbstractRpmBasedQt4MaemoTarget(parent, id)
{
}
Qt4MeegoIa32Target::~Qt4MeegoIa32Target() {}
QString Qt4MeegoIa32Target::defaultDisplayName()
{
return QApplication::translate("Qt4ProjectManager::Qt4Target",
"Meego (IA32)", "Qt4 Meego/IA32 target display name");
}
QString Qt4MeegoIa32Target::specFileName() const
{
return QLatin1String("meego-ia32");
}
*/
......@@ -153,6 +153,10 @@ signals:
void changeLogChanged();
void controlChanged();
protected:
bool adaptControlFileField(QByteArray &document, const QByteArray &fieldName,
const QByteArray &newFieldValue);
private slots:
void handleDebianDirContentsChanged();
void handleDebianFileChanged(const QString &filePath);
......@@ -170,6 +174,7 @@ private:
virtual bool initAdditionalPackagingSettingsFromOtherTarget();
virtual QStringList packagingFilePaths() const;
virtual void addAdditionalControlFileFields(QByteArray &controlContents)=0;
virtual QByteArray packageManagerNameFieldName() const=0;
QString changeLogFilePath() const;
......@@ -177,8 +182,6 @@ private:
QByteArray controlFileFieldValue(const QString &key, bool multiLine) const;
bool setControlFieldValue(const QByteArray &fieldName,
const QByteArray &fieldValue);
bool adaptControlFileField(QByteArray &document, const QByteArray &fieldName,
const QByteArray &newFieldValue);
bool adaptRulesFile();
bool adaptControlFile();
bool setPackageManagerIconInternal(const QString &iconFilePath,
......@@ -243,6 +246,7 @@ public:
static QString defaultDisplayName();
private:
virtual void addAdditionalControlFileFields(QByteArray &controlContents);
virtual QString debianDirName() const;
virtual QByteArray packageManagerNameFieldName() const;
};
......@@ -262,6 +266,7 @@ public:
static QString defaultDisplayName();
private:
virtual void addAdditionalControlFileFields(QByteArray &controlContents);
virtual QString debianDirName() const;
virtual QByteArray packageManagerNameFieldName() const;
};
......@@ -278,28 +283,6 @@ private:
virtual QString specFileName() const;
};
/*
class Qt4MeegoArmTarget : public AbstractRpmBasedQt4MaemoTarget
{
public:
explicit Qt4MeegoArmTarget(Qt4Project *parent, const QString &id);
virtual ~Qt4MeegoArmTarget();
static QString defaultDisplayName();
private:
virtual QString specFileName() const;
};
class Qt4MeegoIa32Target : public AbstractRpmBasedQt4MaemoTarget
{
public:
explicit Qt4MeegoIa32Target(Qt4Project *parent, const QString &id);
virtual ~Qt4MeegoIa32Target();
static QString defaultDisplayName();
private:
virtual QString specFileName() const;
};
*/
} // namespace Internal
} // namespace Qt4ProjectManager
......
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