RemoteLinux: Move generic Dir/File functions into Utils.

- Make error parameter an optional pointer
  for consistency with DirUtils::copyRecursively()
- Add documentation

Change-Id: I6671142341dbdcf2c8ca1118c35ea05548920609
Reviewed-on: http://codereview.qt.nokia.com/1090
Reviewed-by: Qt Sanity Bot <qt_sanity_bot@ovi.com>
Reviewed-by: Christian Kandeler <christian.kandeler@nokia.com>
This commit is contained in:
Daniel Molkentin
2011-07-05 12:59:14 +02:00
parent 1ea75f0cbf
commit 15732d1bd2
8 changed files with 162 additions and 104 deletions

View File

@@ -38,6 +38,8 @@
#include "maemoqtversion.h"
#include "qt4maemodeployconfiguration.h"
#include <utils/fileutils.h>
#include <qt4projectmanager/qt4buildconfiguration.h>
#include <qt4projectmanager/qt4target.h>
#include <qtsupport/baseqtversion.h>
@@ -323,8 +325,8 @@ void MaemoCopyToSysrootStep::run(QFutureInterface<bool> &fi)
+ deployable.remoteDir + sep + localFileInfo.fileName();
sysrootDir.mkpath(deployable.remoteDir.mid(1));
QString errorMsg;
MaemoGlobal::removeRecursively(targetFilePath, errorMsg);
if (!MaemoGlobal::copyRecursively(deployable.localFilePath,
Utils::FileUtils::removeRecursively(targetFilePath, &errorMsg);
if (!Utils::FileUtils::copyRecursively(deployable.localFilePath,
targetFilePath, &errorMsg)) {
emit addOutput(tr("Sysroot installation failed: %1\n"
" Continuing anyway.").arg(errorMsg), ErrorMessageOutput);