aboutsummaryrefslogtreecommitdiffstats
path: root/src/plugins/remotelinux/tarpackagecreationstep.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <[email protected]>2012-08-22 16:52:38 +0200
committerChristian Kandeler <[email protected]>2012-08-24 15:44:03 +0200
commitc7ebfd47a49c8cc2cfb8cb34ada73e32a8611bb0 (patch)
tree6045564559d9cb0a485016997616bd1a1ba14e0f /src/plugins/remotelinux/tarpackagecreationstep.cpp
parentb80205c592cd3ecc768baba246b5e8df9a34c995 (diff)
RemoteLinux: Remove dependency on Qt4ProjectManager.
Instead use the newly added abstractions from ProjectExplorer. This makes the plugin qmake-independent in principle; any build system can be used as long as the respective QtCreator plugin provides a way to set up the required deployment information. As a side effect of this patch, two features are lost: (1) The ability to add a remote directory automatically for a RemoteLinux based target. This was rarely ever useful, because any non- trivial project requires more files to be deployed than just one binary. (2) The ability to add Desktop files and icons for Fremantle and Harmattan projects. Similar points as above apply here as well; such projects should be set up via QtCreator's wizards or manually by users who know what they are doing. Change-Id: I2d7e621256f01143aafe3b191b04a120f053e672 Reviewed-by: Tobias Hunger <[email protected]>
Diffstat (limited to 'src/plugins/remotelinux/tarpackagecreationstep.cpp')
-rw-r--r--src/plugins/remotelinux/tarpackagecreationstep.cpp20
1 files changed, 7 insertions, 13 deletions
diff --git a/src/plugins/remotelinux/tarpackagecreationstep.cpp b/src/plugins/remotelinux/tarpackagecreationstep.cpp
index f649fa7272a..1151c551ea3 100644
--- a/src/plugins/remotelinux/tarpackagecreationstep.cpp
+++ b/src/plugins/remotelinux/tarpackagecreationstep.cpp
@@ -28,10 +28,9 @@
**************************************************************************/
#include "tarpackagecreationstep.h"
-#include "deployablefile.h"
-#include "deploymentinfo.h"
#include "remotelinuxdeployconfiguration.h"
+#include <projectexplorer/deploymentdata.h>
#include <projectexplorer/project.h>
#include <projectexplorer/target.h>
@@ -112,13 +111,8 @@ bool TarPackageCreationStep::init()
if (!AbstractPackagingStep::init())
return false;
m_packagingNeeded = isPackagingNeeded();
- if (!m_packagingNeeded)
- return true;
-
- const DeploymentInfo * const deploymentInfo = deployConfiguration()->deploymentInfo();
- for (int i = 0; i < deploymentInfo->deployableCount(); ++i)
- m_files.append(deploymentInfo->deployableAt(i));
-
+ if (m_packagingNeeded)
+ m_files = target()->deploymentData().allFiles();
return true;
}
@@ -152,13 +146,13 @@ bool TarPackageCreationStep::doPackage(QFutureInterface<bool> &fi)
}
foreach (const DeployableFile &d, m_files) {
- if (d.remoteDir.isEmpty()) {
+ if (d.remoteDirectory().isEmpty()) {
emit addOutput(tr("No remote path specified for file '%1', skipping.")
- .arg(QDir::toNativeSeparators(d.localFilePath)), ErrorMessageOutput);
+ .arg(d.localFilePath().toUserOutput()), ErrorMessageOutput);
continue;
}
- QFileInfo fileInfo(d.localFilePath);
- if (!appendFile(tarFile, fileInfo, d.remoteDir + QLatin1Char('/')
+ QFileInfo fileInfo = d.localFilePath().toFileInfo();
+ if (!appendFile(tarFile, fileInfo, d.remoteDirectory() + QLatin1Char('/')
+ fileInfo.fileName(), fi)) {
return false;
}