Commit 8073ffdf authored by Christian Kandeler's avatar Christian Kandeler
Browse files

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: default avatarTobias Hunger <tobias.hunger@nokia.com>
parent aa178ebf
......@@ -507,7 +507,8 @@ bool DebianManager::setPackageManagerName(const Utils::FileName &debianDir, Core
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())
return QIcon();
QPixmap pixmap;
......@@ -695,7 +696,7 @@ void DebianManager::controlWasChanged()
WatchableFile *file = qobject_cast<WatchableFile *>(sender());
if (!file)
return;
emit controlChanged(Utils::FileName::fromString(file->fileName()));
emit controlChanged(Utils::FileName::fromString(file->fileName()).parentDir());
}
void DebianManager::changelogWasChanged()
......@@ -703,7 +704,7 @@ void DebianManager::changelogWasChanged()
WatchableFile *file = qobject_cast<WatchableFile *>(sender());
if (!file)
return;
emit changelogChanged(Utils::FileName::fromString(file->fileName()));
emit changelogChanged(Utils::FileName::fromString(file->fileName()).parentDir());
}
Utils::FileName DebianManager::changelogFilePath(const Utils::FileName &debianDir)
......
......@@ -165,12 +165,18 @@ void Qt4MaemoDeployConfiguration::setupDebianPackaging()
Utils::FileName debianDir = DebianManager::debianDirectory(target());
DebianManager::ActionStatus status = DebianManager::createTemplate(bc, debianDir);
if (status == DebianManager::NoActionRequired ||
status == DebianManager::ActionFailed)
if (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;
Core::Id deviceType = ProjectExplorer::DeviceTypeProfileInformation::deviceTypeId(target()->profile());
DebianManager *dm = DebianManager::instance();
QString projectName = target()->project()->displayName();
if (!DebianManager::hasPackageManagerIcon(debianDir)) {
......@@ -181,11 +187,6 @@ void Qt4MaemoDeployConfiguration::setupDebianPackaging()
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:
if (deviceType == HarmattanOsType) {
Utils::FileName manifest = debianDir;
......
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