OSDN Git Service

RemoteLinux: Don't do timestamp checks for file-by-file deployment.
authorChristian Kandeler <christian.kandeler@nokia.com>
Wed, 10 Aug 2011 07:02:05 +0000 (09:02 +0200)
committerChristian Kandeler <christian.kandeler@nokia.com>
Wed, 10 Aug 2011 07:06:08 +0000 (09:06 +0200)
Rationale: If the device has been re-flashed, for example,
the deployment information will be outdated and every single file
will have to be touched to force re-deployment, which is a hassle
for the user and not very obvious either.

Change-Id: I9c48096eb4bdde4b13212f55c9c9a1bc6f9445fd
Reviewed-on: http://codereview.qt.nokia.com/2811
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
src/plugins/remotelinux/genericdirectuploadservice.cpp

index 144b39a..fc2ac1a 100644 (file)
@@ -259,13 +259,15 @@ void GenericDirectUploadService::stopDeployment()
     handleDeploymentDone();
 }
 
+// Note: time stamp checks disabled for now; it's too much hassle for the user to force
+// deployment in case the device has changed.
 void GenericDirectUploadService::checkDeploymentNeeded(const DeployableFile &deployable) const
 {
     QFileInfo fileInfo(deployable.localFilePath);
     if (fileInfo.isDir()) {
         const QStringList files = QDir(deployable.localFilePath)
             .entryList(QDir::Files | QDir::Dirs | QDir::NoDotAndDotDot);
-        if (files.isEmpty() && hasChangedSinceLastDeployment(deployable))
+        if (files.isEmpty() /* && hasChangedSinceLastDeployment(deployable) */)
             m_d->filesToUpload << deployable;
         foreach (const QString &fileName, files) {
             const QString localFilePath = deployable.localFilePath
@@ -274,7 +276,7 @@ void GenericDirectUploadService::checkDeploymentNeeded(const DeployableFile &dep
                 + fileInfo.fileName();
             checkDeploymentNeeded(DeployableFile(localFilePath, remoteDir));
         }
-    } else if (hasChangedSinceLastDeployment(deployable)) {
+    } else  /* if (hasChangedSinceLastDeployment(deployable)) */ {
         m_d->filesToUpload << deployable;
     }
 }