Madde: Fix some bugs introduced by profiles patch.

- Correctly read the packaging icon.
- Inform of packaging file changes in all cases, not on initial setup.
- Emit signals from debian manager with the right argument.

Change-Id: Id44828b6e581e639acd491923cff8114cb57f6c6
Reviewed-by: Tobias Hunger <tobias.hunger@nokia.com>
This commit is contained in:
Christian Kandeler
2012-08-29 13:09:46 +02:00
parent aa178ebf31
commit 8073ffdffd
2 changed files with 13 additions and 11 deletions

View File

@@ -507,7 +507,8 @@ bool DebianManager::setPackageManagerName(const Utils::FileName &debianDir, Core
QIcon DebianManager::packageManagerIcon(const Utils::FileName &debianDir, QString *error) QIcon DebianManager::packageManagerIcon(const Utils::FileName &debianDir, QString *error)
{ {
const QByteArray &base64Icon = controlFileFieldValue(debianDir, IconFieldName, true); const QByteArray &base64Icon
= controlFileFieldValue(controlFilePath(debianDir), IconFieldName, true);
if (base64Icon.isEmpty()) if (base64Icon.isEmpty())
return QIcon(); return QIcon();
QPixmap pixmap; QPixmap pixmap;
@@ -695,7 +696,7 @@ void DebianManager::controlWasChanged()
WatchableFile *file = qobject_cast<WatchableFile *>(sender()); WatchableFile *file = qobject_cast<WatchableFile *>(sender());
if (!file) if (!file)
return; return;
emit controlChanged(Utils::FileName::fromString(file->fileName())); emit controlChanged(Utils::FileName::fromString(file->fileName()).parentDir());
} }
void DebianManager::changelogWasChanged() void DebianManager::changelogWasChanged()
@@ -703,7 +704,7 @@ void DebianManager::changelogWasChanged()
WatchableFile *file = qobject_cast<WatchableFile *>(sender()); WatchableFile *file = qobject_cast<WatchableFile *>(sender());
if (!file) if (!file)
return; return;
emit changelogChanged(Utils::FileName::fromString(file->fileName())); emit changelogChanged(Utils::FileName::fromString(file->fileName()).parentDir());
} }
Utils::FileName DebianManager::changelogFilePath(const Utils::FileName &debianDir) Utils::FileName DebianManager::changelogFilePath(const Utils::FileName &debianDir)

View File

@@ -165,12 +165,18 @@ void Qt4MaemoDeployConfiguration::setupDebianPackaging()
Utils::FileName debianDir = DebianManager::debianDirectory(target()); Utils::FileName debianDir = DebianManager::debianDirectory(target());
DebianManager::ActionStatus status = DebianManager::createTemplate(bc, debianDir); DebianManager::ActionStatus status = DebianManager::createTemplate(bc, debianDir);
if (status == DebianManager::NoActionRequired || if (status == DebianManager::ActionFailed)
status == DebianManager::ActionFailed) return;
DebianManager * const dm = DebianManager::instance();
dm->monitor(debianDir);
connect(dm, SIGNAL(debianDirectoryChanged(Utils::FileName)), this,
SLOT(debianDirChanged(Utils::FileName)));
if (status == DebianManager::NoActionRequired)
return; return;
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target()->profile()); Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target()->profile());
DebianManager *dm = DebianManager::instance();
QString projectName = target()->project()->displayName(); QString projectName = target()->project()->displayName();
if (!DebianManager::hasPackageManagerIcon(debianDir)) { if (!DebianManager::hasPackageManagerIcon(debianDir)) {
@@ -181,11 +187,6 @@ void Qt4MaemoDeployConfiguration::setupDebianPackaging()
dm->setPackageManagerIcon(debianDir, deviceType, iconPath); dm->setPackageManagerIcon(debianDir, deviceType, iconPath);
} }
dm->monitor(debianDir);
connect(dm, SIGNAL(debianDirectoryChanged(Utils::FileName)), this, SLOT(debianDirChanged(Utils::FileName)));
// Set up aegis manifest on harmattan: // Set up aegis manifest on harmattan:
if (deviceType == HarmattanOsType) { if (deviceType == HarmattanOsType) {
Utils::FileName manifest = debianDir; Utils::FileName manifest = debianDir;