summaryrefslogtreecommitdiff
path: root/src/plugins/remotelinux/genericdirectuploadservice.cpp
diff options
context:
space:
mode:
authorChristian Kandeler <christian.kandeler@nokia.com>2011-09-29 15:00:15 +0200
committerChristian Kandeler <christian.kandeler@nokia.com>2011-09-29 15:13:41 +0200
commit7fa56b08cf4b4a251c90cfb3437ef692a1fc5c39 (patch)
tree1f2b7538a87611b0eb8d73ba60f3686bac927e60 /src/plugins/remotelinux/genericdirectuploadservice.cpp
parentb9002dc7633a0da84fb456b0299dda1bd89c200b (diff)
downloadqt-creator-7fa56b08cf4b4a251c90cfb3437ef692a1fc5c39.tar.gz
RemoteLinux: Make missing target path non-fatal.
There might be e.g. subprojects in a SUBDIRS project that are not supposed to be deployed. Let's support this without forcing people to use CONFIG variables, but emit a big fat warning. Change-Id: I17c9337cecbf68c632ce925fa9a53655dcfaba64 Reviewed-on: http://codereview.qt-project.org/5801 Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
Diffstat (limited to 'src/plugins/remotelinux/genericdirectuploadservice.cpp')
-rw-r--r--src/plugins/remotelinux/genericdirectuploadservice.cpp25
1 files changed, 8 insertions, 17 deletions
diff --git a/src/plugins/remotelinux/genericdirectuploadservice.cpp b/src/plugins/remotelinux/genericdirectuploadservice.cpp
index 27d338d4f5..16f5e7dcd2 100644
--- a/src/plugins/remotelinux/genericdirectuploadservice.cpp
+++ b/src/plugins/remotelinux/genericdirectuploadservice.cpp
@@ -86,23 +86,6 @@ void GenericDirectUploadService::setIncrementalDeployment(bool incremental)
d->incremental = incremental;
}
-bool GenericDirectUploadService::isDeploymentPossible(QString *whyNot) const
-{
- if (!AbstractRemoteLinuxDeployService::isDeploymentPossible(whyNot))
- return false;
- foreach (const DeployableFile &df, d->deployableFiles) {
- if (df.remoteDir.isEmpty()) { // Can happen with targets.
- if (whyNot) {
- *whyNot = tr("Don't know where to deploy local file '%1'.")
- .arg(QFileInfo(df.localFilePath).fileName());
- }
- return false;
- }
- }
-
- return true;
-}
-
bool GenericDirectUploadService::isDeploymentNecessary() const
{
d->filesToUpload.clear();
@@ -328,6 +311,14 @@ void GenericDirectUploadService::uploadNextFile()
const DeployableFile &df = d->filesToUpload.first();
QString dirToCreate = df.remoteDir;
+ if (dirToCreate.isEmpty()) {
+ emit warningMessage(tr("Warning: No remote path set for local file '%1'. Skipping upload.")
+ .arg(QDir::toNativeSeparators(df.localFilePath)));
+ d->filesToUpload.takeFirst();
+ uploadNextFile();
+ return;
+ }
+
QFileInfo fi(df.localFilePath);
if (fi.isDir())
dirToCreate += QLatin1Char('/') + fi.fileName();