diff options
author | Tim Jenssen <tim.jenssen@nokia.com> | 2011-05-10 21:12:21 +0200 |
---|---|---|
committer | Tim Jenssen <tim.jenssen@nokia.com> | 2011-05-10 21:12:21 +0200 |
commit | 8f40a20dd99b94041a6558053ec03bc775ae518d (patch) | |
tree | 5de8182a026a82a2c1bdd78c03dbb9c797382253 /installerbuilder/libinstaller/simplemovefileoperation.cpp | |
parent | 041a6e9345026d7d80434ccdac63dec8cae2af9d (diff) |
remove some un codingstyle spaces from operations
Diffstat (limited to 'installerbuilder/libinstaller/simplemovefileoperation.cpp')
-rw-r--r-- | installerbuilder/libinstaller/simplemovefileoperation.cpp | 54 |
1 files changed, 27 insertions, 27 deletions
diff --git a/installerbuilder/libinstaller/simplemovefileoperation.cpp b/installerbuilder/libinstaller/simplemovefileoperation.cpp index 5abea0437..201746803 100644 --- a/installerbuilder/libinstaller/simplemovefileoperation.cpp +++ b/installerbuilder/libinstaller/simplemovefileoperation.cpp @@ -46,7 +46,7 @@ TRANSLATOR QInstaller::SimpleMoveFileOperation SimpleMoveFileOperation::SimpleMoveFileOperation() { - setName( QLatin1String( "SimpleMoveFile" ) ); + setName(QLatin1String("SimpleMoveFile")); } SimpleMoveFileOperation::~SimpleMoveFileOperation() @@ -60,44 +60,44 @@ void SimpleMoveFileOperation::backup() bool SimpleMoveFileOperation::performOperation() { const QStringList args = arguments(); - if( args.count() != 2 ) { - setError( InvalidArguments ); - setErrorString( tr("Invalid arguments in %0: %1 arguments given, 2 expected.") - .arg(name()).arg( args.count() ) ); + if (args.count() != 2) { + setError(InvalidArguments); + setErrorString(tr("Invalid arguments in %0: %1 arguments given, 2 expected.") + .arg(name()).arg(args.count())); return false; } - const QString source = args.at( 0 ); - const QString target = args.at( 1 ); + const QString source = args.at(0); + const QString target = args.at(1); - if (source.isEmpty() || target.isEmpty() ) { - setError( UserDefinedError ); - setErrorString( tr("None of the arguments can be empty: source(\"%1\"), target(\"%2\")") - .arg(source, target) ); + if (source.isEmpty() || target.isEmpty()) { + setError(UserDefinedError); + setErrorString(tr("None of the arguments can be empty: source(\"%1\"), target(\"%2\")") + .arg(source, target)); return false; } // If destination file exists, then we cannot use QFile::copy() // because it does not overwrite an existing file. So we remove // the destination file. - if( QFile::exists( target ) ) + if (QFile::exists(target)) { - QFile file( target ); - if( !file.remove() ) { - setError( UserDefinedError ); - setErrorString( tr("can not copy source(\"%1\") to target(\"%2\"), because target is existing and not removable.") - .arg(source, target) ); + QFile file(target); + if (!file.remove()) { + setError(UserDefinedError); + setErrorString(tr("can not copy source(\"%1\") to target(\"%2\"), because target is existing and not removable.") + .arg(source, target)); return false; } } - QFile file( source ); - const bool moved = file.rename( target ); - if ( !moved ) { - setError( UserDefinedError ); - setErrorString( tr("can not move source(\"%1\") to target(\"%2\"), %3") - .arg(source, target, file.errorString()) ); + QFile file(source); + const bool moved = file.rename(target); + if (!moved) { + setError(UserDefinedError); + setErrorString(tr("can not move source(\"%1\") to target(\"%2\"), %3") + .arg(source, target, file.errorString())); return false; } return true; @@ -105,10 +105,10 @@ bool SimpleMoveFileOperation::performOperation() bool SimpleMoveFileOperation::undoOperation() { - const QString source = arguments().at( 0 ); - const QString target = arguments().at( 1 ); - QFile file( target ); - file.rename( source ); + const QString source = arguments().at(0); + const QString target = arguments().at(1); + QFile file(target); + file.rename(source); return true; } |