Maemo: Get rid of two unneeded functions.

This commit is contained in:
ck
2010-07-13 16:49:30 +02:00
parent 3d656df2d7
commit 9bd53be4c9
2 changed files with 4 additions and 14 deletions

View File

@@ -219,16 +219,6 @@ MaemoDeviceConfig MaemoDeployStep::deviceConfig() const
: MaemoDeviceConfig(); : MaemoDeviceConfig();
} }
QString MaemoDeployStep::packageFileName() const
{
return QFileInfo(packageFilePath()).fileName();
}
QString MaemoDeployStep::packageFilePath() const
{
return packagingStep()->packageFilePath();
}
void MaemoDeployStep::start() void MaemoDeployStep::start()
{ {
m_stopped = false; m_stopped = false;
@@ -288,7 +278,7 @@ void MaemoDeployStep::handleSftpChannelInitialized()
const MaemoPackageCreationStep * const pStep = packagingStep(); const MaemoPackageCreationStep * const pStep = packagingStep();
const QString hostName = m_connection->connectionParameters().host; const QString hostName = m_connection->connectionParameters().host;
if (pStep->isPackagingEnabled()) { if (pStep->isPackagingEnabled()) {
const MaemoDeployable d(packageFilePath(), uploadDir()); const MaemoDeployable d(pStep->packageFilePath(), uploadDir());
if (currentlyNeedsDeployment(hostName, d)) { if (currentlyNeedsDeployment(hostName, d)) {
if (!deploy(MaemoDeployable(d))) if (!deploy(MaemoDeployable(d)))
return; return;
@@ -405,8 +395,10 @@ void MaemoDeployStep::handleLinkProcessFinished(int exitStatus)
if (m_linksInProgress.isEmpty() && m_uploadsInProgress.isEmpty()) { if (m_linksInProgress.isEmpty() && m_uploadsInProgress.isEmpty()) {
if (m_needsInstall) { if (m_needsInstall) {
writeOutput(tr("Installing package ...")); writeOutput(tr("Installing package ..."));
const QString packageFileName
= QFileInfo(packagingStep()->packageFilePath()).fileName();
const QByteArray cmd = remoteSudo().toUtf8() + " dpkg -i " const QByteArray cmd = remoteSudo().toUtf8() + " dpkg -i "
+ packageFileName().toUtf8(); + packageFileName.toUtf8();
m_installer = m_connection->createRemoteProcess(cmd); m_installer = m_connection->createRemoteProcess(cmd);
connect(m_installer.data(), SIGNAL(closed(int)), this, connect(m_installer.data(), SIGNAL(closed(int)), this,
SLOT(handleInstallationFinished(int))); SLOT(handleInstallationFinished(int)));

View File

@@ -104,8 +104,6 @@ private:
const MaemoPackageCreationStep *packagingStep() const; const MaemoPackageCreationStep *packagingStep() const;
bool deploy(const MaemoDeployable &deployable); bool deploy(const MaemoDeployable &deployable);
QString uploadDir() const; QString uploadDir() const;
QString packageFileName() const;
QString packageFilePath() const;
static const QLatin1String Id; static const QLatin1String Id;