From e294c359657e993709dabfe3d8c09b1c5acd816e Mon Sep 17 00:00:00 2001 From: Robert Knight Date: Tue, 23 Aug 2011 16:34:34 +0100 Subject: [PATCH] Rename UpdaterOptions::script to UpdaterOptions::scriptPath for clarity --- src/UpdaterOptions.cpp | 4 ++-- src/UpdaterOptions.h | 2 +- src/main.cpp | 6 +++--- src/tests/TestUpdaterOptions.cpp | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/UpdaterOptions.cpp b/src/UpdaterOptions.cpp index 996e3a4..869fd06 100644 --- a/src/UpdaterOptions.cpp +++ b/src/UpdaterOptions.cpp @@ -70,7 +70,7 @@ void UpdaterOptions::parseOldFormatArgs(int argc, char** argv) } else if (key == "UpdateScriptFileName") { - script = value; + scriptPath = value; } else if (key == "AppFileName") { @@ -116,7 +116,7 @@ void UpdaterOptions::parse(int argc, char** argv) } if (parser.getValue("script")) { - script = parser.getValue("script"); + scriptPath = parser.getValue("script"); } if (parser.getValue("wait")) { diff --git a/src/UpdaterOptions.h b/src/UpdaterOptions.h index 082ab14..738261c 100644 --- a/src/UpdaterOptions.h +++ b/src/UpdaterOptions.h @@ -12,7 +12,7 @@ class UpdaterOptions UpdateInstaller::Mode mode; std::string installDir; std::string packageDir; - std::string script; + std::string scriptPath; long long waitPid; std::string logFile; diff --git a/src/main.cpp b/src/main.cpp index a777444..aed2f93 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -49,15 +49,15 @@ int main(int argc, char** argv) UpdateInstaller installer; UpdateScript script; - if (!options.script.empty()) + if (!options.scriptPath.empty()) { - script.parse(options.script); + script.parse(options.scriptPath); } LOG(Info,"started updater. install-dir: " + options.installDir + ", package-dir: " + options.packageDir + ", wait-pid: " + intToStr(options.waitPid) - + ", script-path: " + options.script + + ", script-path: " + options.scriptPath + ", mode: " + intToStr(options.mode)); installer.setMode(options.mode); diff --git a/src/tests/TestUpdaterOptions.cpp b/src/tests/TestUpdaterOptions.cpp index 012a551..1d5af1a 100644 --- a/src/tests/TestUpdaterOptions.cpp +++ b/src/tests/TestUpdaterOptions.cpp @@ -20,7 +20,7 @@ void TestUpdaterOptions::testOldFormatArgs() TEST_COMPARE(options.mode,UpdateInstaller::Setup); TEST_COMPARE(options.installDir,"/path/to/app"); TEST_COMPARE(options.packageDir,"/tmp/updater"); - TEST_COMPARE(options.script,"/tmp/updater/file_list.xml"); + TEST_COMPARE(options.scriptPath,"/tmp/updater/file_list.xml"); TEST_COMPARE(options.waitPid,123456); }