Commit 16e9d050 authored by ck's avatar ck
Browse files

Maemo: Always show correct package path.

We now react to the build directory being changed.

Reviewed-by: kh1
parent f1253b7f
...@@ -78,6 +78,7 @@ MaemoPackageCreationStep::MaemoPackageCreationStep(BuildConfiguration *buildConf ...@@ -78,6 +78,7 @@ MaemoPackageCreationStep::MaemoPackageCreationStep(BuildConfiguration *buildConf
m_packagingEnabled(true), m_packagingEnabled(true),
m_versionString(DefaultVersionNumber) m_versionString(DefaultVersionNumber)
{ {
ctor();
} }
MaemoPackageCreationStep::MaemoPackageCreationStep(BuildConfiguration *buildConfig, MaemoPackageCreationStep::MaemoPackageCreationStep(BuildConfiguration *buildConfig,
...@@ -86,12 +87,19 @@ MaemoPackageCreationStep::MaemoPackageCreationStep(BuildConfiguration *buildConf ...@@ -86,12 +87,19 @@ MaemoPackageCreationStep::MaemoPackageCreationStep(BuildConfiguration *buildConf
m_packagingEnabled(other->m_packagingEnabled), m_packagingEnabled(other->m_packagingEnabled),
m_versionString(other->m_versionString) m_versionString(other->m_versionString)
{ {
ctor();
} }
MaemoPackageCreationStep::~MaemoPackageCreationStep() MaemoPackageCreationStep::~MaemoPackageCreationStep()
{ {
} }
void MaemoPackageCreationStep::ctor()
{
connect(buildConfiguration(), SIGNAL(buildDirectoryChanged()), this,
SIGNAL(packageFilePathChanged()));
}
bool MaemoPackageCreationStep::init() bool MaemoPackageCreationStep::init()
{ {
return true; return true;
...@@ -367,6 +375,7 @@ QString MaemoPackageCreationStep::versionString() const ...@@ -367,6 +375,7 @@ QString MaemoPackageCreationStep::versionString() const
void MaemoPackageCreationStep::setVersionString(const QString &version) void MaemoPackageCreationStep::setVersionString(const QString &version)
{ {
m_versionString = version; m_versionString = version;
emit packageFilePathChanged();
} }
QString MaemoPackageCreationStep::nativePath(const QFile &file) const QString MaemoPackageCreationStep::nativePath(const QFile &file) const
......
...@@ -75,6 +75,9 @@ public: ...@@ -75,6 +75,9 @@ public:
QString versionString() const; QString versionString() const;
void setVersionString(const QString &version); void setVersionString(const QString &version);
signals:
void packageFilePathChanged();
private slots: private slots:
void handleBuildOutput(); void handleBuildOutput();
...@@ -82,6 +85,7 @@ private: ...@@ -82,6 +85,7 @@ private:
MaemoPackageCreationStep(ProjectExplorer::BuildConfiguration *buildConfig, MaemoPackageCreationStep(ProjectExplorer::BuildConfiguration *buildConfig,
MaemoPackageCreationStep *other); MaemoPackageCreationStep *other);
void ctor();
virtual bool init(); virtual bool init();
virtual void run(QFutureInterface<bool> &fi); virtual void run(QFutureInterface<bool> &fi);
virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget(); virtual ProjectExplorer::BuildStepConfigWidget *createConfigWidget();
......
...@@ -66,6 +66,8 @@ MaemoPackageCreationWidget::MaemoPackageCreationWidget(MaemoPackageCreationStep ...@@ -66,6 +66,8 @@ MaemoPackageCreationWidget::MaemoPackageCreationWidget(MaemoPackageCreationStep
m_ui->minor->setValue(list.value(1, QLatin1String("0")).toInt()); m_ui->minor->setValue(list.value(1, QLatin1String("0")).toInt());
m_ui->patch->setValue(list.value(2, QLatin1String("0")).toInt()); m_ui->patch->setValue(list.value(2, QLatin1String("0")).toInt());
versionInfoChanged(); versionInfoChanged();
connect(m_step, SIGNAL(packageFilePathChanged()), this,
SIGNAL(updateSummary()));
} }
void MaemoPackageCreationWidget::init() void MaemoPackageCreationWidget::init()
...@@ -94,7 +96,6 @@ void MaemoPackageCreationWidget::versionInfoChanged() ...@@ -94,7 +96,6 @@ void MaemoPackageCreationWidget::versionInfoChanged()
{ {
m_step->setVersionString(m_ui->major->text() + QLatin1Char('.') m_step->setVersionString(m_ui->major->text() + QLatin1Char('.')
+ m_ui->minor->text() + QLatin1Char('.') + m_ui->patch->text()); + m_ui->minor->text() + QLatin1Char('.') + m_ui->patch->text());
emit updateSummary();
} }
} // namespace Internal } // namespace Internal
......
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